:root {
    --dark-bg: #111826;
    --dark-surface: rgba(31, 42, 56, 0.7);
    --primary-accent: #9a7cff;
    --light-text: #e0e0e0;
    --medium-text: #a0a0c0;
    --dark-border: rgba(148, 124, 255, 0.2);
}

/* --- Original Header Styles --- */
.main-header {
    margin: 0 5px 5px 5px;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    position: relative; /* Needed for z-index context */
    z-index: 100;
}

.main-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.main-header .logo a {
    color: inherit;
    text-decoration: none;
}

.main-header .logo img {
    height: 2rem;
    width: auto;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-header .nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-header .desktop-nav a {
    color: var(--medium-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-header .desktop-nav a:hover {
    color: var(--primary-accent);
}

.main-footer {
    text-align: center;
    margin-top: auto;
    padding: 20px;
    color: var(--medium-text);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.balance-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 12px; 
    background-color: rgba(154, 124, 255, 0.2); 
    border: 1px solid var(--primary-accent);
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, background-color 0.2s ease;
    color: var(--light-text);
}

.balance-container:hover {
    transform: translateY(-2px);
    background-color: rgba(154, 124, 255, 0.3);
}

.balance-icon {
    font-size: 1.2em;
}

/* --- Mobile Navigation & Hamburger Styles --- */

/* Hamburger Menu Button */
.hamburger-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-menu span {
    width: 30px;
    height: 3px;
    background-color: var(--light-text);
    border-radius: 5px;
    transition: all 0.3s linear;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 38, 0.95); /* A slightly transparent dark background */
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-overlay nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mobile-nav-overlay nav a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-nav-overlay nav a:hover {
    color: var(--primary-accent);
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 3rem;
    cursor: pointer;
}

.notification-center {
    position: relative;
    display: flex;
    align-items: center;
}
.notification-bell {
    background: none;
    border: none;
    color: #a0a0c0;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 0 10px;
}
.notification-bell:hover { color: #e0e0e0; }
.notification-badge {
    position: absolute;
    top: -4px;
    right: 4px;
    background-color: #ef4444; /* red-500 */
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #111826;
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
}
.notification-badge.active { transform: scale(1); }
.notification-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 15px;
    width: 320px;
    background-color: #1f2937; /* gray-800 */
    border: 1px solid #374151; /* gray-700 */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 100;
    overflow: hidden;
}
.notification-panel.active { display: block; }
.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid #374151;
}
.panel-header h3 { font-weight: 600; color: #f9fafb; }
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}
.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #374151;
    font-size: 14px;
}
.notification-item:last-child { border-bottom: none; }
.notification-item .icon { color: #93c5fd; font-size: 16px; } /* blue-300 */
.notification-item .icon.error { color: #f87171; } /* red-400 */
.notification-item .content { flex: 1; color: #d1d5db; } /* gray-300 */
.notification-list .empty-state {
    text-align: center;
    color: #6b7280; /* gray-500 */
    padding: 40px 20px;
    font-size: 14px;
}

/* Ensure mobile menu styles also apply */
.mobile-nav-overlay .balance-container {
    background-color: transparent;
    color: inherit;
    box-shadow: none;
    padding: 0;
    justify-content: center; /* Center the balance in the mobile view */
}

.mobile-nav-overlay .balance-container .balance-amount {
    font-size: 1em;
}

/* --- Media Query for Responsiveness --- */
@media (max-width: 768px) {
    .main-header .desktop-nav {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .main-header {
        padding: 5px 12px;
        margin-top: 3px;
    }

    .main-header .logo img {
        height: 1.5rem;
        width: auto;
    }
}