/* ================================================
   AUTH & FRIENDS SYSTEM - NEON CYBERPUNK WARFARE
   ================================================ */

/* Import base fonts if not already done */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

/* ================================================
   CSS CUSTOM PROPERTIES - AUTH THEME
   ================================================ */
:root {
    --auth-bg-gradient: linear-gradient(135deg, #050810 0%, #0c1225 50%, #0a0f1e 100%);
    --auth-card-bg: rgba(12, 18, 35, 0.95);
    --auth-border: rgba(0, 255, 136, 0.15);
    --auth-border-hover: rgba(0, 255, 136, 0.4);
    --auth-glow: 0 0 40px rgba(0, 255, 136, 0.15);
    --auth-input-bg: rgba(5, 10, 20, 0.8);
    --auth-accent: #00ff88;
    --auth-accent-dark: #00cc66;
    --auth-danger: #ff3366;
    --auth-warning: #ffaa00;
    --auth-text-muted: rgba(160, 160, 192, 0.7);
    --friend-online: #00ff88;
    --friend-offline: #666688;
    --friend-ingame: #ffaa00;
}

/* ================================================
   AUTH SCREEN CONTAINER
   ================================================ */
#auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--auth-bg-gradient);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 10000;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 20px;
}

#auth-screen.hidden {
    display: none !important;
}

/* Animated Background Particles */
.auth-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.auth-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--auth-accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 8s infinite ease-in-out;
}

.auth-particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 10s; }
.auth-particle:nth-child(2) { left: 20%; animation-delay: 1s; animation-duration: 12s; }
.auth-particle:nth-child(3) { left: 30%; animation-delay: 2s; animation-duration: 8s; }
.auth-particle:nth-child(4) { left: 40%; animation-delay: 0.5s; animation-duration: 14s; }
.auth-particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 11s; }
.auth-particle:nth-child(6) { left: 60%; animation-delay: 1.5s; animation-duration: 9s; }
.auth-particle:nth-child(7) { left: 70%; animation-delay: 2.5s; animation-duration: 13s; }
.auth-particle:nth-child(8) { left: 80%; animation-delay: 0.3s; animation-duration: 10s; }
.auth-particle:nth-child(9) { left: 90%; animation-delay: 1.8s; animation-duration: 7s; }
.auth-particle:nth-child(10) { left: 95%; animation-delay: 2.2s; animation-duration: 15s; }

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(100vh) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0;
    }
}

/* Scan Lines Overlay */
.auth-scanlines {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 136, 0.02) 2px,
        rgba(0, 255, 136, 0.02) 4px
    );
    pointer-events: none;
    animation: scanlineScroll 10s linear infinite;
}

@keyframes scanlineScroll {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

/* Grid Background */
.auth-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* ================================================
   AUTH CARD (Main Container)
   ================================================ */
.auth-card {
    position: relative;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(20px);
    box-shadow: 
        var(--auth-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 25px 50px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Card Glow Effect */
.auth-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(0, 255, 136, 0.1) 50%, 
        transparent 70%);
    border-radius: 22px;
    z-index: -1;
    animation: cardGlow 3s ease-in-out infinite;
}

@keyframes cardGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ================================================
   AUTH HEADER
   ================================================ */
.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.auth-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(180deg, #fff 0%, #a0a0c0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: var(--auth-text-muted);
    margin: 0;
    letter-spacing: 1px;
}

/* ================================================
   AUTH TAB SWITCHER
   ================================================ */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 5px;
}

.auth-tab {
    flex: 1;
    padding: 14px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--auth-text-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.auth-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--auth-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.auth-tab:hover {
    color: #fff;
}

.auth-tab.active {
    color: #fff;
    background: rgba(0, 255, 136, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.1);
}

.auth-tab.active::before {
    width: 60%;
}

/* ================================================
   AUTH FORMS
   ================================================ */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: formFadeIn 0.4s ease;
}

.auth-form.active {
    display: flex;
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Input Groups */
.auth-input-group {
    position: relative;
}

.auth-input-label {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--auth-input-bg);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.auth-input::placeholder {
    color: rgba(160, 160, 192, 0.5);
}

.auth-input:focus {
    border-color: var(--auth-accent);
    background: rgba(0, 255, 136, 0.05);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.auth-input:focus + .auth-input-icon,
.auth-input:not(:placeholder-shown) + .auth-input-icon {
    opacity: 1;
    color: var(--auth-accent);
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.3s ease;
}

.auth-password-toggle:hover {
    color: var(--auth-accent);
}

/* ================================================
   AUTH BUTTONS
   ================================================ */
.auth-btn {
    position: relative;
    padding: 18px 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
    color: #000;
    box-shadow: 
        0 6px 0 #008855,
        0 10px 30px rgba(0, 255, 136, 0.3);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 0 #008855,
        0 15px 40px rgba(0, 255, 136, 0.4);
}

.auth-btn-primary:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #008855,
        0 5px 20px rgba(0, 255, 136, 0.2);
}

/* Ripple Effect */
.auth-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* Guest Button */
.auth-btn-guest {
    background: transparent;
    color: var(--auth-text-muted);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.auth-btn-guest:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

/* ================================================
   PLAY NOW BUTTON - Most Prominent CTA
   ================================================ */
.auth-btn-play-now {
    background: linear-gradient(135deg, #ff0055 0%, #ff3377 50%, #ff0055 100%);
    background-size: 200% 200%;
    color: #fff;
    font-size: 1.3rem;
    padding: 22px 40px;
    letter-spacing: 3px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 0 #990033,
        0 0 40px rgba(255, 0, 85, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: playNowPulse 2s ease-in-out infinite, playNowGradient 3s ease infinite;
}

@keyframes playNowPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 8px 0 #990033,
            0 0 40px rgba(255, 0, 85, 0.4),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 
            0 8px 0 #990033,
            0 0 60px rgba(255, 0, 85, 0.6),
            inset 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

@keyframes playNowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-btn-play-now:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 0 #990033,
        0 0 70px rgba(255, 0, 85, 0.7),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
    animation: none;
}

.auth-btn-play-now:active {
    transform: translateY(4px);
    box-shadow: 
        0 4px 0 #990033,
        0 0 30px rgba(255, 0, 85, 0.3);
}

/* Guest Hint Text */
.auth-guest-hint {
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: var(--auth-text-muted);
    margin: 10px 0 15px;
    letter-spacing: 0.5px;
}

/* ================================================
   AUTH DIVIDER
   ================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent);
}

.auth-divider-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    color: var(--auth-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ================================================
   AUTH ERROR MESSAGE
   ================================================ */
.auth-error {
    display: none;
    padding: 14px 18px;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    border-radius: 10px;
    color: var(--auth-danger);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    animation: errorShake 0.4s ease;
}

.auth-error.visible {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-error-icon {
    font-size: 1.2rem;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* ================================================
   AUTH SUCCESS MESSAGE
   ================================================ */
.auth-success {
    display: none;
    padding: 14px 18px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    color: var(--auth-accent);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-success.visible {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================================================
   LOADING SPINNER
   ================================================ */
.auth-loading {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 18, 35, 0.95);
    border-radius: 20px;
    z-index: 10;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.auth-loading.visible {
    display: flex;
}

.auth-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 136, 0.1);
    border-top-color: var(--auth-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-loading-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: var(--auth-text-muted);
    letter-spacing: 1px;
}

/* ================================================
   FRIENDS SYSTEM - OVERLAY MODAL
   ================================================ */
.friends-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.9);
    backdrop-filter: blur(10px);
    z-index: 15000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.friends-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.friends-modal {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 
        0 0 60px rgba(0, 255, 136, 0.15),
        0 30px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.friends-overlay.visible .friends-modal {
    transform: scale(1) translateY(0);
}

/* Friends Header */
.friends-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.friends-header-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.friends-header-title span {
    font-size: 1.3rem;
}

.friends-close-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--auth-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friends-close-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--auth-danger);
    color: var(--auth-danger);
}

/* Friends Tabs */
.friends-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.friends-tab {
    flex: 1;
    padding: 14px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--auth-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.friends-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--auth-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.friends-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.friends-tab.active {
    color: var(--auth-accent);
}

.friends-tab.active::after {
    transform: scaleX(1);
}

.friends-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--auth-danger);
    border-radius: 9px;
    font-size: 0.7rem;
    color: #fff;
    margin-left: 6px;
}

/* Friends Content */
.friends-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--auth-accent) rgba(0, 0, 0, 0.2);
}

.friends-content::-webkit-scrollbar {
    width: 6px;
}

.friends-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.friends-content::-webkit-scrollbar-thumb {
    background: var(--auth-accent);
    border-radius: 3px;
}

/* Friends Panel (Tab Content) */
.friends-panel {
    display: none;
}

.friends-panel.active {
    display: block;
    animation: panelFadeIn 0.3s ease;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Input */
.friends-search {
    position: relative;
    margin-bottom: 20px;
}

.friends-search-input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--auth-input-bg);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.friends-search-input::placeholder {
    color: rgba(160, 160, 192, 0.5);
}

.friends-search-input:focus {
    border-color: var(--auth-accent);
    background: rgba(0, 255, 136, 0.05);
}

.friends-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.friends-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #000;
    background: var(--auth-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.friends-search-btn:hover {
    background: var(--auth-accent-dark);
    transform: translateY(-50%) scale(1.02);
}

/* Friend Item */
.friend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.friend-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 255, 136, 0.2);
}

.friend-item:last-child {
    margin-bottom: 0;
}

/* Friend Avatar */
.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1f3d 0%, #0d1225 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    flex-shrink: 0;
}

.friend-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--auth-card-bg);
}

.friend-status-dot.online {
    background: var(--friend-online);
    box-shadow: 0 0 8px var(--friend-online);
}

.friend-status-dot.offline {
    background: var(--friend-offline);
}

.friend-status-dot.ingame {
    background: var(--friend-ingame);
    box-shadow: 0 0 8px var(--friend-ingame);
    animation: ingamePulse 1.5s ease-in-out infinite;
}

@keyframes ingamePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Friend Info */
.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-status {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    color: var(--auth-text-muted);
    margin: 0;
}

.friend-status.online {
    color: var(--friend-online);
}

.friend-status.ingame {
    color: var(--friend-ingame);
}

/* Friend Actions */
.friend-actions {
    display: flex;
    gap: 8px;
}

.friend-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: var(--auth-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-action-btn:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

.friend-action-btn.invite {
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
    border: none;
    color: #000;
}

.friend-action-btn.invite:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.friend-action-btn.accept {
    background: rgba(0, 255, 136, 0.15);
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

.friend-action-btn.reject {
    background: rgba(255, 51, 102, 0.15);
    border-color: var(--auth-danger);
    color: var(--auth-danger);
}

/* Empty State */
.friends-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--auth-text-muted);
}

.friends-empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.friends-empty-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    margin: 0;
}

/* ================================================
   GAME INVITE MODAL
   ================================================ */
.invite-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.95);
    backdrop-filter: blur(15px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.invite-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.invite-modal {
    background: var(--auth-card-bg);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    max-width: 380px;
    box-shadow: 
        0 0 80px rgba(0, 255, 136, 0.2),
        0 40px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: invitePulse 2s ease-in-out infinite;
}

@keyframes invitePulse {
    0%, 100% {
        box-shadow: 
            0 0 80px rgba(0, 255, 136, 0.2),
            0 40px 80px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow: 
            0 0 100px rgba(0, 255, 136, 0.3),
            0 40px 80px rgba(0, 0, 0, 0.5);
    }
}

.invite-overlay.visible .invite-modal {
    transform: scale(1);
}

.invite-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
    animation: inviteIconBounce 1s ease-in-out infinite;
}

@keyframes inviteIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.invite-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-accent);
    margin: 0 0 10px;
    text-transform: uppercase;
}

.invite-from {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    margin: 0 0 25px;
}

.invite-from strong {
    color: var(--auth-accent);
    font-weight: 700;
}

.invite-timer {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--auth-text-muted);
    margin-bottom: 25px;
}

.invite-timer-value {
    color: var(--auth-warning);
    font-weight: 700;
}

.invite-buttons {
    display: flex;
    gap: 15px;
}

.invite-btn {
    flex: 1;
    padding: 16px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.invite-btn-accept {
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
    color: #000;
    box-shadow: 0 4px 0 #008855;
}

.invite-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #008855, 0 10px 25px rgba(0, 255, 136, 0.3);
}

.invite-btn-accept:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #008855;
}

.invite-btn-decline {
    background: rgba(255, 51, 102, 0.15);
    color: var(--auth-danger);
    border: 2px solid var(--auth-danger);
}

.invite-btn-decline:hover {
    background: rgba(255, 51, 102, 0.25);
    transform: translateY(-2px);
}

/* ================================================
   LOBBY FRIENDS BUTTON
   ================================================ */
.lobby-friends-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, rgba(21, 25, 50, 0.95) 0%, rgba(12, 18, 35, 0.98) 100%);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 15px;
    color: var(--auth-accent);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.lobby-friends-btn:hover {
    border-color: var(--auth-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.2);
}

.lobby-friends-btn .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--auth-danger);
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    animation: badgePop 0.3s ease;
}

.lobby-friends-btn .notification-badge.visible {
    display: flex;
}

@keyframes badgePop {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ================================================
   USER PROFILE HEADER (Logged In State)
   ================================================ */
.user-profile-header {
    display: none;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 15px;
    margin-bottom: 25px;
}

.user-profile-header.visible {
    display: flex;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1f3d 0%, #0d1225 100%);
    border: 2px solid var(--auth-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 3px;
}

.user-email {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    color: var(--auth-text-muted);
    margin: 0;
}

.user-logout-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    border-radius: 10px;
    color: var(--auth-danger);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-logout-btn:hover {
    background: rgba(255, 51, 102, 0.2);
    border-color: var(--auth-danger);
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 25px;
        margin: 15px;
        border-radius: 16px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-tabs {
        gap: 5px;
    }
    
    .auth-tab {
        padding: 12px 10px;
        font-size: 0.75rem;
    }
    
    .auth-input {
        padding: 14px 14px 14px 42px;
        font-size: 0.95rem;
    }
    
    .auth-btn {
        padding: 16px 25px;
        font-size: 0.9rem;
    }
    
    .friends-modal {
        margin: 15px;
        max-height: 85vh;
    }
    
    .friends-header {
        padding: 15px 20px;
    }
    
    .friends-content {
        padding: 15px;
    }
    
    .friend-item {
        padding: 12px;
    }
    
    .friend-avatar {
        width: 42px;
        height: 42px;
    }
    
    .invite-modal {
        padding: 30px 25px;
        margin: 15px;
    }
    
    .invite-buttons {
        flex-direction: column;
    }
    
    .lobby-friends-btn {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
}

/* ================================================
   NOTIFICATION MODAL
   ================================================ */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.95);
    backdrop-filter: blur(15px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.notification-modal {
    background: linear-gradient(145deg, rgba(20, 25, 45, 0.98) 0%, rgba(12, 18, 35, 0.98) 100%);
    border: 2px solid rgba(255, 170, 0, 0.4);
    border-radius: 20px;
    padding: 40px 50px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 
        0 0 60px rgba(255, 170, 0, 0.2),
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: scale(0.85) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: notificationPulse 3s ease-in-out infinite;
}

@keyframes notificationPulse {
    0%, 100% {
        box-shadow: 
            0 0 60px rgba(255, 170, 0, 0.2),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 0 80px rgba(255, 170, 0, 0.3),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}

.notification-overlay.visible .notification-modal {
    transform: scale(1) translateY(0);
}

/* Notification Types */
.notification-overlay.error .notification-modal {
    border-color: rgba(255, 51, 102, 0.5);
    animation-name: notificationPulseError;
}

@keyframes notificationPulseError {
    0%, 100% {
        box-shadow: 
            0 0 60px rgba(255, 51, 102, 0.2),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 0 80px rgba(255, 51, 102, 0.35),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}

.notification-overlay.success .notification-modal {
    border-color: rgba(0, 255, 136, 0.5);
    animation-name: notificationPulseSuccess;
}

@keyframes notificationPulseSuccess {
    0%, 100% {
        box-shadow: 
            0 0 60px rgba(0, 255, 136, 0.2),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 0 80px rgba(0, 255, 136, 0.35),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}

.notification-overlay.info .notification-modal {
    border-color: rgba(0, 170, 255, 0.5);
    animation-name: notificationPulseInfo;
}

@keyframes notificationPulseInfo {
    0%, 100% {
        box-shadow: 
            0 0 60px rgba(0, 170, 255, 0.2),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 0 80px rgba(0, 170, 255, 0.35),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}

.notification-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: iconBounce 0.6s ease-out;
    filter: drop-shadow(0 0 20px rgba(255, 170, 0, 0.5));
}

@keyframes iconBounce {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.notification-overlay.error .notification-icon {
    filter: drop-shadow(0 0 20px rgba(255, 51, 102, 0.5));
}

.notification-overlay.success .notification-icon {
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
}

.notification-overlay.info .notification-icon {
    filter: drop-shadow(0 0 20px rgba(0, 170, 255, 0.5));
}

.notification-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px;
    letter-spacing: 1px;
}

.notification-message {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    color: rgba(200, 200, 220, 0.9);
    margin: 0 0 30px;
    line-height: 1.6;
}

.notification-btn {
    padding: 16px 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 
        0 6px 0 #cc6600,
        0 10px 25px rgba(255, 170, 0, 0.3);
    transition: all 0.2s ease;
}

.notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 0 #cc6600,
        0 15px 35px rgba(255, 170, 0, 0.4);
}

.notification-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #cc6600,
        0 5px 15px rgba(255, 170, 0, 0.2);
}

.notification-overlay.error .notification-btn {
    background: linear-gradient(135deg, #ff3366 0%, #cc2255 100%);
    box-shadow: 
        0 6px 0 #991144,
        0 10px 25px rgba(255, 51, 102, 0.3);
}

.notification-overlay.error .notification-btn:hover {
    box-shadow: 
        0 8px 0 #991144,
        0 15px 35px rgba(255, 51, 102, 0.4);
}

.notification-overlay.success .notification-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    box-shadow: 
        0 6px 0 #008844,
        0 10px 25px rgba(0, 255, 136, 0.3);
}

.notification-overlay.success .notification-btn:hover {
    box-shadow: 
        0 8px 0 #008844,
        0 15px 35px rgba(0, 255, 136, 0.4);
}

.notification-overlay.info .notification-btn {
    background: linear-gradient(135deg, #00aaff 0%, #0088cc 100%);
    box-shadow: 
        0 6px 0 #006699,
        0 10px 25px rgba(0, 170, 255, 0.3);
}

.notification-overlay.info .notification-btn:hover {
    box-shadow: 
        0 8px 0 #006699,
        0 15px 35px rgba(0, 170, 255, 0.4);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .notification-modal {
        padding: 30px 25px;
        margin: 15px;
    }
    
    .notification-icon {
        font-size: 3rem;
    }
    
    .notification-title {
        font-size: 1.3rem;
    }
    
    .notification-message {
        font-size: 1rem;
    }
    
    .notification-btn {
        width: 100%;
        padding: 14px 30px;
    }
}
