/* ==================== LEARNING PAGE ==================== */
.learning-navbar {
    background: rgba(20, 30, 60, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    padding: 1.5rem 0;
    position: relative;
    z-index: 10;
}

.learning-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.learning-hero {
    padding: 6rem 2rem 4rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.learning-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.learning-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.learning-section {
    padding: 4rem 2rem;
    position: relative;
    z-index: 10;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-container h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.course-card {
    background: rgba(20, 30, 60, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.course-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.course-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.course-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.course-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.2);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d9ff;
    --secondary-color: #ff006e;
    --accent-green: #39ff14;
    --accent-purple: #b366ff;
    --dark-bg: #0a0e27;
    --card-bg: rgba(20, 30, 60, 0.7);
    --card-border: rgba(0, 217, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a3e 50%, #0f0a2e 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==================== BACKGROUND EFFECTS ==================== */
.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(0, 217, 255, 0.3), rgba(0, 217, 255, 0)),
        radial-gradient(2px 2px at 60px 70px, rgba(255, 0, 110, 0.3), rgba(255, 0, 110, 0)),
        radial-gradient(1px 1px at 50px 50px, rgba(185, 102, 255, 0.3), rgba(185, 102, 255, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: drift 20s linear infinite;
}

.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 0, 110, 0.05) 0%, transparent 50%);
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: rgba(20, 30, 60, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

.logo-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 2.5rem;
    animation: pulse-icon 2s ease-in-out infinite;
}

.login-card h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.pin-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    background: rgba(10, 20, 50, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
    background: rgba(10, 20, 50, 0.8);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

.toggle-auth {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toggle-auth a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.toggle-auth a:hover {
    color: var(--accent-green);
}

.error-msg {
    text-align: center;
    color: #ff6b6b;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.1);
    margin-top: 1rem;
    min-height: 1.5rem;
    font-size: 0.9rem;
}

.error-msg.success {
    color: var(--accent-green);
    background: rgba(57, 255, 20, 0.1);
}

.back-btn {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.back-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(10, 14, 39, 0.8);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    padding: 1rem 0;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 1.8rem;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.sound-toggle {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle:hover {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color);
}

.logout-btn {
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid rgba(255, 0, 110, 0.3);
    color: var(--secondary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255, 0, 110, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.2);
}

/* ==================== HERO SECTION ==================== */
.hero {
    margin-top: 80px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ==================== SECTIONS ==================== */
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
    animation: fadeIn 0.6s ease-out;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-green));
    border-radius: 2px;
}

.updates-section,
.stats-section,
.announcements-section,
.games-section,
.chat-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

/* ==================== UPDATES GRID ==================== */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.update-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.update-card::before {
    content: '';
    position: absolute;
    inset: -100%;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(185, 102, 255, 0.1));
    transition: var(--transition);
}

.update-card:hover::before {
    inset: -50%;
}

.update-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.update-icon {
    font-size: 2rem;
}

.update-header h3 {
    font-size: 1.2rem;
}

.update-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.update-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.update-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.2);
}

/* ==================== STATS SECTION ==================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 4rem auto;
}

.stat-card {
    background: rgba(20, 30, 60, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.2);
}

/* ==================== ANNOUNCEMENTS ==================== */
.announcement-card {
    background: rgba(20, 30, 60, 0.7);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.announcement-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.announcement-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== GAMES GRID ==================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}

.game-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    min-height: 200px;
}

.game-card::before {
    content: '';
    position: absolute;
    inset: -100%;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(185, 102, 255, 0.2));
    transition: var(--transition);
    animation: rotate-gradient 3s linear infinite;
}

@keyframes rotate-gradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.game-card:hover::before {
    inset: -50%;
}

.game-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
}

.game-emoji {
    font-size: 2.5rem;
    transition: var(--transition);
    animation: bounce 2s ease-in-out infinite;
}

.game-card:hover .game-emoji {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.5));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.game-name {
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}

.game-category {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.game-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.2);
    background: rgba(30, 45, 80, 0.8);
}

.game-card:hover .game-name {
    color: var(--primary-color);
}

/* ==================== CHAT PAGE ==================== */
.chat-section {
    margin-top: 100px;
    margin-bottom: 2rem;
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
}

.chat-box {
    background: rgba(20, 30, 60, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    height: 500px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem;
    background: rgba(0, 217, 255, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
    animation: fadeInUp 0.3s ease-out;
}

.message-username {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.message-text {
    color: var(--text-primary);
    word-break: break-word;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.empty-chat {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

.message-input-container {
    margin-bottom: 1rem;
}

#messageForm {
    display: flex;
    gap: 1rem;
}

#messageInput {
    flex: 1;
    padding: 0.9rem;
    background: rgba(20, 30, 60, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

#messageInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

.send-btn {
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 217, 255, 0.3);
}

.clear-chat-btn {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.clear-chat-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
}

/* ==================== SCROLLBAR ==================== */
.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: rgba(0, 217, 255, 0.05);
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.3);
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .nav-controls {
        gap: 0.5rem;
    }

    .logo-text {
        display: none;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .game-card {
        min-height: 160px;
        padding: 1rem;
    }

    .game-emoji {
        font-size: 2rem;
    }

    .game-name {
        font-size: 0.9rem;
    }

    .chat-box {
        height: 400px;
    }

    .updates-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .game-card {
        min-height: 140px;
        padding: 0.8rem;
    }

    .game-emoji {
        font-size: 1.8rem;
    }

    .game-name {
        font-size: 0.8rem;
    }

    .nav-controls {
        gap: 0.3rem;
    }

    .nav-link {
        display: none;
    }

    .chat-box {
        height: 300px;
    }

    #messageForm {
        flex-direction: column;
    }

    .send-btn {
        width: 100%;
    }
}
