/* Theme Tokens */
:root {
    --background-dark: #050505;
    --background-panel: #0B0F0C;
    --neon-green: #39FF14;
    --accent-green: #00FF7F;
    --primary-text: #EDEDED;
    --secondary-text: #D0D0D0;
    --muted-text: #9CA3AF;
    --card-radius: 18px;
    --neon-glow: 0 0 10px #39FF14, 0 0 18px rgba(57,255,20,0.6);
    --neon-glow-strong: 0 0 12px #39FF14, 0 0 24px rgba(57,255,20,0.7);
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--background-panel);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(57, 255, 20, 0.2);
}

.notification-panel.active {
    right: 0;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(8, 13, 8, 0.8);
    backdrop-filter: blur(10px);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

/* Glassmorphism Notification Card */
.notification-item {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border-radius: var(--card-radius);
    margin: 0.75rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.notification-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--muted-text);
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: rgba(57, 255, 20, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--neon-glow);
}

.notification-item.unread {
    background: rgba(57, 255, 20, 0.08);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
}

.notification-item.unread::before {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(57, 255, 20, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.notification-icon i {
    color: var(--neon-green);
    font-size: 1.1rem;
}

/* Notification Types */
.notification-item.tournament .notification-icon {
    background: rgba(57, 255, 20, 0.15);
    border-color: rgba(57, 255, 20, 0.4);
}

.notification-item.tournament .notification-icon i {
    color: var(--neon-green);
}

.notification-item.wallet .notification-icon {
    background: rgba(0, 255, 127, 0.15);
    border-color: rgba(0, 255, 127, 0.4);
}

.notification-item.wallet .notification-icon i {
    color: var(--accent-green);
}

.notification-item.system .notification-icon {
    background: rgba(100, 100, 100, 0.15);
    border-color: rgba(100, 100, 100, 0.4);
}

.notification-item.system .notification-icon i {
    color: var(--muted-text);
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--primary-text);
    font-weight: 600;
}

.notification-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: var(--secondary-text);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--muted-text);
    margin-top: 0.25rem;
}

.notification-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--muted-text);
}

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

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

.btn-mark-read {
    align-self: center;
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--neon-green);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-mark-read:hover {
    background: rgba(57, 255, 20, 0.2);
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

.notification-actions {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    background: rgba(8, 13, 8, 0.8);
    backdrop-filter: blur(10px);
}

.notification-count {
    background: var(--neon-green);
    color: #000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* Active navigation highlight */
.nav-link[href="notifications.html"] {
    color: var(--neon-green) !important;
    background: rgba(57, 255, 20, 0.1);
    box-shadow: var(--neon-glow-strong);
}

.nav-link[href="notifications.html"]::after {
    width: 60%;
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .notification-panel {
        max-width: 100%;
    }
    
    .notification-item {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
    }
    
    /* Reduce glow intensity on mobile */
    .notification-item:hover {
        box-shadow: 0 0 5px rgba(57, 255, 20, 0.4);
    }
    
    .notification-item.unread {
        box-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
    }
}

/* Performance optimizations - only use transform and opacity */
.notification-item {
    will-change: transform, opacity;
}

/* Touch action for mobile */
body {
    touch-action: pan-x pan-y;
}