/* ==============================
   App Layout — New Design
   ============================== */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

/* ===== Top Bar ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(27, 15, 35, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(157, 0, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
}
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-mat-icon {
    color: var(--purple-400);
    font-size: 1.8rem;
}
.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(157, 0, 255, 0.6);
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.system-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.system-status-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--purple-400);
    line-height: 1;
}
.system-status-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: #00f0ff;
}
.top-bar-divider {
    width: 2px;
    height: 24px;
    background: rgba(157, 0, 255, 0.3);
}
.top-bar-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}
.top-icon-gold {
    color: #fbbf24;
    font-size: 1.3rem;
}
.top-icon-streak {
    color: #f97316;
    font-size: 1.3rem;
    margin-left: 8px;
}
.gold-val {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fbbf24;
}
.streak-val {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f97316;
}

/* ===== Profile Button & Dropdown ===== */
.profile-wrapper {
    position: relative;
}
.profile-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(157, 0, 255, 0.1);
    border: 1px solid rgba(157, 0, 255, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Space Grotesk', sans-serif;
}
.profile-btn:hover {
    background: rgba(157, 0, 255, 0.2);
    border-color: var(--purple-400);
}
.profile-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid rgba(157, 0, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.2s ease;
    overflow: hidden;
}
.profile-dropdown-header {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.9rem;
}
.profile-dropdown-divider {
    height: 1px;
    background: rgba(157, 0, 255, 0.2);
}
.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Space Grotesk', sans-serif;
    text-align: left;
}
.profile-dropdown-item:hover {
    background: rgba(157, 0, 255, 0.1);
}
.profile-dropdown-item.danger {
    color: var(--red-400);
}
.profile-dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.12);
}
.profile-dropdown-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: auto;
}

/* ===== Navigation Bar ===== */
.nav-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 10px 16px;
    background: rgba(10, 10, 26, 0.9);
    border-bottom: 1px solid rgba(157, 0, 255, 0.15);
    flex-wrap: wrap;
    backdrop-filter: blur(8px);
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.nav-mat-icon {
    font-size: 1.1rem;
}
.nav-item:hover {
    color: var(--text-primary);
    background: rgba(157, 0, 255, 0.1);
}
.nav-item.active {
    color: var(--purple-400);
    background: rgba(157, 0, 255, 0.12);
    border: 1px solid rgba(157, 0, 255, 0.3);
}
.nav-item.active .nav-mat-icon {
    color: var(--purple-400);
}

/* ===== Page Container ===== */
.page-container {
    flex: 1;
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}
.page {
    display: none;
    animation: fadeIn 0.4s ease;
}
.page.active {
    display: block;
}
.page-title {
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}
.column-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 5px;
}

/* ===== God Reset Modal ===== */
.god-reset-modal {
    max-width: 420px;
    text-align: center;
    border: 2px solid var(--red-500);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), var(--bg-card));
}
.god-reset-icon {
    font-size: 3.5rem;
    margin-bottom: 8px;
    animation: pulse 2s infinite;
}
.god-reset-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--red-400);
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.god-reset-warn {
    font-size: 0.95rem;
    color: var(--orange-400);
    margin-bottom: 12px;
}
.god-reset-list {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}
.god-reset-list li {
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.god-reset-list li::before {
    content: '✕ ';
    color: var(--red-400);
}
.god-reset-list li strong {
    color: var(--red-400);
}
.god-reset-confirm-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.god-reset-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 16px;
    transition: border-color var(--transition-fast);
}
.god-reset-input:focus {
    outline: none;
    border-color: var(--red-400);
}
.god-reset-actions {
    display: flex;
    gap: 12px;
}
.god-reset-actions .btn {
    flex: 1;
}
.god-reset-actions .btn-danger:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .top-bar {
        padding: 8px 12px;
    }
    .system-status {
        display: none;
    }
    .top-bar-divider:first-of-type {
        display: none;
    }
    .nav-bar {
        padding: 6px 8px;
        gap: 2px;
    }
    .nav-item {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    .nav-label {
        display: none;
    }
    .page-container {
        padding: 16px;
    }
}
