/* ============================================================
   ENGINE GUILD &mdash; Global Menu & Header Styles
   Location: /ui/menu.css
   Requires: engine_auth.css to be loaded first for :root variables
   ============================================================ */

/* Force consistent font for the header across all game portals */
.main-header, .main-header button, .main-header a {
    font-family: 'Raleway', sans-serif !important;
}

/* Base Header Layout */
.main-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 2rem; 
    background: var(--bg-deep); /* Uses core deep background */
    border-bottom: 1px solid var(--border); 
    height: 70px; 
}

.nav-brand-title a, .logo a { 
    font-family: 'Cinzel', serif !important; 
    color: var(--gold); /* Uses core gold */
    font-size: 1.2rem; 
    font-weight: bold; 
    text-decoration: none; 
}

.main-nav { 
    display: flex; 
    gap: 1rem; 
    align-items: center; 
    height: 100%; 
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Dropdowns */
.dropdown { 
    position: relative; 
    height: 100%; 
    display: flex; 
    align-items: center; 
}

.dropbtn { 
    background: transparent; 
    border: none; 
    color: var(--text); 
    font-size: 0.95rem; 
    cursor: pointer; 
    padding: 0 1rem; 
    height: 100%; 
    font-weight: 500; 
    transition: color 0.2s; 
    display: flex; 
    align-items: center; 
    gap: 0.4rem; 
}

.dropdown:hover .dropbtn { 
    color: var(--gold); 
    background: rgba(197, 160, 89, 0.05); /* Soft gold hover */
}

.dropdown-content { 
    display: none; 
    position: absolute; 
    top: 70px; 
    left: 0; 
    background-color: var(--bg-card); /* Matches auth cards */
    min-width: 220px; 
    box-shadow: var(--shadow); 
    z-index: 1001; 
    border: 1px solid var(--border); 
    border-top: 2px solid var(--gold); 
    border-radius: 0 0 var(--radius) var(--radius); 
}

.dropdown:hover .dropdown-content { 
    display: block; 
}

.dropdown-content a { 
    color: var(--muted); 
    padding: 12px 16px; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.85rem; 
    border-bottom: 1px solid var(--border); 
    transition: all 0.2s;
}

.dropdown-content a:last-child { 
    border-bottom: none; 
}

.dropdown-content a:hover { 
    background-color: var(--bg-panel); 
    color: var(--gold-light); 
}

/* Right side actions */
.user-actions { 
    display: flex; 
    align-items: center; 
    gap: 1.2rem; 
}

.greeting { 
    color: var(--text); 
    font-size: 0.9rem; 
    font-weight: 600; 
}

/* Notifications System */
.notif-dropdown { 
    position: relative; 
    display: flex; 
    align-items: center; 
}

.nav-notification { 
    position: relative; 
    cursor: pointer; 
    color: var(--muted); 
    font-size: 1.2rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: color 0.2s; 
}

.nav-notification:hover { 
    color: var(--gold); 
}

.badge-count { 
    position: absolute; 
    top: -8px; 
    right: -10px; 
    background: #8250df; 
    color: white; 
    font-size: 0.65rem; 
    font-weight: bold; 
    padding: 2px 6px; 
    border-radius: 10px; 
    border: 2px solid var(--bg-deep); 
}

.notif-content { 
    display: none; 
    position: absolute; 
    top: 40px; 
    right: 0; 
    background-color: var(--bg-card); 
    min-width: 280px; 
    box-shadow: var(--shadow); 
    z-index: 1001; 
    border: 1px solid var(--border); 
    border-top: 2px solid var(--gold); 
    border-radius: var(--radius); 
    padding: 0; 
    cursor: default; 
}

.notif-content.show { 
    display: block; 
}

.notif-header { 
    padding: 12px 15px; 
    border-bottom: 1px solid var(--border); 
    font-weight: bold; 
    color: var(--text); 
    font-size: 0.9rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.notif-item { 
    padding: 12px 15px; 
    display: flex; 
    align-items: flex-start; 
    gap: 12px; 
    border-bottom: 1px solid var(--border); 
    text-decoration: none; 
    color: var(--text); 
    font-size: 0.85rem; 
    transition: background 0.2s; 
}

.notif-item:hover { 
    background: var(--bg-panel); 
    color: var(--gold-light); 
}

.notif-item:last-child { 
    border-bottom: none; 
}

.notif-empty { 
    padding: 20px 15px; 
    text-align: center; 
    color: var(--muted); 
    font-size: 0.85rem; 
    font-style: italic; 
}

/* Achievement Toast Popup */
.ach-toast-container { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    z-index: 9999; 
    pointer-events: none; 
}

.ach-toast { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-left: 4px solid var(--gold); 
    border-radius: var(--radius); 
    padding: 15px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    box-shadow: var(--shadow); 
    transform: translateX(120%); 
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); 
    width: 300px; 
    pointer-events: auto; 
}

.ach-toast.show { 
    transform: translateX(0); 
}

.ach-toast-icon { 
    width: 40px; 
    height: 40px; 
    border-radius: 4px; 
    background: var(--bg-deep); 
    border: 1px solid var(--border); 
    object-fit: cover; 
}

.ach-toast-content { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
}

.ach-toast-title { 
    color: var(--text); 
    font-size: 0.9rem; 
    font-weight: bold; 
    margin: 0; 
}

.ach-toast-sub { 
    color: var(--muted); 
    font-size: 0.75rem; 
    margin: 0; 
}

/* Action Buttons */
.btn-dev-studio { 
    background: rgba(197, 160, 89, 0.1); 
    color: var(--gold); 
    border: 1px solid var(--border); 
    padding: 0.4rem 0.8rem; 
    border-radius: var(--radius); 
    font-size: 0.8rem; 
    text-decoration: none; 
    font-weight: bold; 
    transition: all 0.2s; 
}

.btn-dev-studio:hover { 
    background: rgba(197, 160, 89, 0.2); 
    border-color: var(--border-focus);
}

.btn-logout { 
    color: var(--danger-light); 
    font-size: 0.8rem; 
    text-decoration: none; 
    border: 1px solid rgba(231, 76, 60, 0.4); 
    padding: 0.4rem 0.8rem; 
    border-radius: var(--radius); 
    transition: all 0.2s; 
}

.btn-logout:hover { 
    background: rgba(231, 76, 60, 0.1); 
    border-color: var(--danger-light);
}

/* ============================================================
   Theme-Aware Portal Buttons
   Dynamically inherits the game's primary color if available.
   ============================================================ */
.btn-theme-primary, .btn-theme-secondary {
    border-radius: var(--border-radius, 4px);
    padding: 12px 24px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    transition: filter 0.2s, transform 0.2s;
    text-align: center;
}

.btn-theme-primary {
    background-color: var(--primary-color, #c5a059);
    color: #000;
    font-weight: bold;
    border: none;
}

.btn-theme-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-theme-secondary {
    background-color: transparent;
    border: 1px solid var(--primary-color, #c5a059);
    color: var(--primary-color, var(--eg-gold));
}

.btn-theme-secondary:hover {
    background-color: rgba(var(--eg-ink-rgb), 0.05);
}