:root {
    --knolix-teal: #45c4c6;
    --knolix-light-teal: #cceced;
    --bg-grey: #f9f9f9;
    --text-grey: #8e8e8e;
    --karma-gold: #f39c12;
    --heart-red: #ff4d4d;
    --border-color: #efefef;
}

body { 
    background-color: var(--bg-grey); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    color: #262626; 
    margin: 0; 
}

/* Navigation */
.knol-nav {
    background: #fff; height: 50px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100;
}
.knol-nav .logo { font-weight: bold; font-size: 18px; letter-spacing: -1px; color: var(--knolix-teal); text-decoration: none; }

.main-content { max-width: 600px; margin: 0 auto; padding: 10px; }

/* Profile Section */
.profile-card { text-align: center; background: #fff; padding: 20px; border-radius: 15px; margin-bottom: 10px; border: 1px solid var(--border-color); }
.avatar-container {
    width: 90px; height: 90px; margin: 0 auto 15px;
    border: 3px solid var(--knolix-teal); border-radius: 12px;
    overflow: hidden; padding: 2px; background: #fff;
}
.avatar-container img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.username { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.handle { color: var(--text-grey); font-size: 13px; margin-bottom: 15px; }

.stats-grid { display: flex; justify-content: center; gap: 30px; margin-bottom: 20px; }
.stat-item { text-align: center; }
.stat-num { font-weight: 700; font-size: 16px; display: block; }
.stat-label { font-size: 12px; color: var(--text-grey); }

/* Tabs for Inbox */
.inbox-tabs {
    display: flex; background: #fff; border-bottom: 1px solid var(--border-color);
    position: sticky; top: 50px; z-index: 99;
}
.tab-item {
    flex: 1; text-align: center; padding: 15px 0; font-size: 14px; font-weight: 600;
    color: var(--text-grey); cursor: pointer; border-bottom: 2px solid transparent;
}
.tab-item.active { color: var(--knolix-teal); border-bottom: 2px solid var(--knolix-teal); }

/* Cards (Knols) */
.knol-card, .knol-item { 
    background: #fff; border-radius: 15px; padding: 20px; margin-top: 15px; 
    border: 1px solid var(--border-color); position: relative;
}
.knol-header { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-grey); margin-bottom: 10px; }
.question-text { border-left: 3px solid #dbdbdb; padding-left: 15px; margin-bottom: 15px; font-size: 15px; font-weight: 500; }
.answer-text { font-size: 15px; line-height: 1.4; color: #262626; }

/* Ask Box & Inputs */
.ask-box-container { background: #fff; border-radius: 15px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--border-color); }
.ask-area { background: #fffafa; border-radius: 10px; padding: 15px; min-height: 100px; border: 1px solid #f0f0f0; margin-bottom: 15px; }
.ask-area textarea, .reply-input {
    width: 100%; border: none; background: transparent; outline: none;
    resize: none; font-size: 14px; color: #444;
}
.reply-input { background: #fafafa; border: 1px solid var(--border-color); border-radius: 10px; padding: 10px; margin-top: 10px; }

/* Buttons */
.btn-send, .btn-follow, .btn-send-reply {
    background: var(--knolix-light-teal); color: var(--knolix-teal); border: none;
    padding: 8px 25px; border-radius: 20px; font-size: 13px; cursor: pointer; font-weight: bold; transition: 0.2s;
}
.btn-send-reply { background: var(--knolix-teal); color: #fff; }
.btn-follow { background: transparent; border: 1px solid var(--knolix-teal); }
.btn-follow:hover { background: var(--knolix-light-teal); }

/* Toggles & Bounties */
.toggle-container { display: flex; align-items: center; font-size: 12px; color: #444; cursor: pointer; user-select: none; }
.toggle-switch {
    width: 38px; height: 20px; background: #ccc; border-radius: 10px; margin-right: 8px; position: relative; transition: 0.3s;
}
.toggle-switch::after {
    content: ''; position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: 0.3s;
}
.toggle-container.active .toggle-switch { background: var(--knolix-teal); }
.toggle-container.active .toggle-switch::after { left: 20px; }
.bounty-badge { color: var(--karma-gold); font-weight: bold; font-size: 12px; }

/* Toast Notification Style */
#toast-notice {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 12px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#toast-notice.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

#toast-notice i {
    color: var(--knolix-teal);
    margin-right: 10px;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

.handle { 
    color: var(--text-grey); 
    font-size: 13px; 
    margin-bottom: 15px; 
}

.profile-actions { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px; 
}

.btn-donate {
    background: var(--knolix-light-teal);
    border: 1px solid var(--knolix-teal);
    color: var(--knolix-teal);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.btn-donate:hover {
    background: #ff4d4d; /* Heart Red */
    border-color: #ff4d4d;
    color: white;
    transform: scale(1.1);
}

.btn-donate:active {
    transform: scale(0.9);
}
/* PWA Banner Styling */
.pwa-banner {
    position: fixed;
    bottom: -100px; /* Hidden by default */
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #efefef;
    padding: 15px 20px;
    z-index: 10000;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    transition: bottom 0.5s ease-in-out;
}

.pwa-banner.show {
    bottom: 0;
}

.pwa-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.pwa-text {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.pwa-text b { color: #262626; }
.pwa-text span { color: #8e8e8e; font-size: 11px; }

.btn-pwa-install {
    background: #45c4c6;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    margin-right: 30px;
}

.pwa-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #ccc;
    cursor: pointer;
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
}