/* ============================================
   NAVBAR
   ============================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1E2329;
    z-index: 10000;
    border-bottom: 2px solid #D4AF37;
    box-sizing: border-box;
}

/* LOGO */
.nav-logo img {
    width: 48px;
    height: 48px;
}

/* LINKS CONTAINER */
.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-right: 5%;
}

/* LINK STYLE */
.nav-links a {
    font-size: 20px;
    letter-spacing: 0.15em;
    color: #D4AF37;
    text-decoration: none;
    transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
    color: #8B6A18;
}

.comm-auth-gate {
    background: rgba(255,255,255,0.05);
    border: 2px solid #D4AF37;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    text-align: center;
}

.comm-auth-title {
    font-family: 'Cinzel', serif;
    color: #D4AF37;
    font-size: 16px;
    margin-bottom: 6px;
}

.comm-auth-text {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 10px;
}

.comm-auth-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #D4AF37;
    color: black;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
}

/* ============================================
   DROPDOWN
   ============================================ */
.dropdown { position: relative; }

.dropdown-content {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #1E2329;
    min-width: 200px;
    border: 2px solid #D4AF37;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,215,0,0.05);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    overflow: hidden;
    z-index: 10001;
}

/* Arrow pointer */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #1E2329;
    border-left: 2px solid #D4AF37;
    border-top: 2px solid #D4AF37;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 14px;
    letter-spacing: 0.1em;
    color: #D4AF37;
    text-decoration: none;
    border-bottom: 2px solid #D4AF37;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
    white-space: nowrap;
}
.dropdown-content a:last-child { border-bottom: none; }

.dropdown-content a:hover {
    background: rgba(255,215,0,0.07);
    color: #D4AF37;
    padding-left: 24px;
    font-weight: 600;
}

/* Dropdown toggle arrow — base style so it doesn't fall back to a default button on desktop */
.dropdown-toggle {
    background: none;
    border: none;
    color: #D4AF37;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-left: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.dropdown-toggle:hover {
    color: #8B6A18;
}

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   NOTIFICATION BELL
   ============================================ */
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-bell {
    background: none;
    border: none;
    cursor: pointer;
    color: #D4AF37;
    padding: 4px;
    position: relative;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.notif-bell:hover { color: #8B6A18; }

/* Unread badge */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #ff4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #D4AF37;
    line-height: 1;
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 16px);
    right: -10px;
    width: 320px;
    background: #1E2329;
    border: 2px solid #D4AF37;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    z-index: 10001;
    overflow: hidden;
}
.notif-dropdown.open { display: block; }

/* Arrow pointer */
.notif-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #111;
    border-left: 2px solid #D4AF37;
    border-top: 2px solid #D4AF37;
    transform: rotate(45deg);
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 2px solid #D4AF37;
}
.notif-dropdown-header h4 {
    margin: 0;
    color: #D4AF37;
    font-size: 13px;
    letter-spacing: 1px;
}
.notif-mark-all {
    background: none;
    border: 2px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.notif-mark-all:hover { border-color: #D4AF37; color: #D4AF37; }

/* Scrollable list */
.notif-list {
    max-height: 360px;
    overflow-y: auto;
}
.notif-list::-webkit-scrollbar       { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: #8B6A18; border-radius: 4px; }

.notif-empty {
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    text-align: center;
    padding: 24px 16px;
    margin: 0;
}

/* Individual notification */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 2px solid #D4AF37;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover      { background: rgba(255,215,0,0.05); }

.notif-item.notif-unread {
    background: rgba(255,215,0,0.04);
    border-left: 2px solid #d4af37;
}

.notif-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.notif-content { flex: 1; overflow: hidden; }

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #D4AF37;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-body {
    font-size: 12px;
    color: #F8F9FA;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-time {
    font-size: 10px;
    color: #F8F9FA;
    margin-top: 4px;
}

/* Unread dot */
.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4af37;
    flex-shrink: 0;
    margin-top: 4px;
}

/* ============================================
   MOBILE NAV
   ============================================ */

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #D4AF37;
}

@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        background: #1E2329;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 20px 0;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .dropdown {
        width: 100%;
        text-align: center;
    }

    .dropdown-title-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .dropdown-toggle {
        font-size: 18px;
        padding: 6px 10px;
    }

    .dropdown-content {
        display: none;
        width: 100%;
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        border: none;
        border-top: 2px solid #D4AF37;
        background: #1E2329;
        box-shadow: none;
    }

    .dropdown.active .dropdown-content {
        display: block !important;
    }

    .dropdown-content a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 32px;
    width: 100%;
    text-align: left;
   }

    .notif-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 90vw;
    }

    .notif-dropdown::before {
        display: none;
    }

}

.notif-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.notif-clear-all {
    /* match .notif-mark-all styles, but red tint */
    font-size: 11px;
    color: #f87171;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: 'Cinzel', serif;
}
.notif-clear-all:hover { text-decoration: underline; }
