* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4a90e2;
    --primary-dark: #357abd;
    --secondary: #ff8c42;
    --accent: #ff8c42;
    --genie-blue: #4a90e2;
    --genie-orange: #ff8c42;
    --genie-gold: #ffd700;
    --dark: #191919;
    --dark-light: #232527;
    --text: #ffffff;
    --text-secondary: #bdbebe;
    --card-bg: #393b3d;
    --border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Arial Black', Arial, sans-serif;
    background: linear-gradient(180deg, #4a90e2 0%, #357abd 50%, #2c5f8d 100%);
    color: var(--text);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Stars Background */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="2" height="2"><circle cx="1" cy="1" r="1" fill="white" opacity="0.5"/></svg>') repeat;
    animation: animateStars 100s linear infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="3" height="3"><circle cx="1.5" cy="1.5" r="1" fill="white" opacity="0.3"/></svg>') repeat;
    animation: animateStars 150s linear infinite;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><circle cx="2" cy="2" r="1.5" fill="white" opacity="0.2"/></svg>') repeat;
    animation: animateStars 200s linear infinite;
}

@keyframes animateStars {
    from { transform: translateY(0); }
    to { transform: translateY(-2000px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    padding: 20px 0;
    background: #191919;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 4px solid var(--primary);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    height: 40px;
    width: auto;
    animation: float 3s ease-in-out infinite;
}

.logo-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.logo h1 .play-text {
    color: var(--genie-blue);
}

.logo h1 .genie-text {
    color: var(--genie-orange);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 60px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 162, 255, 0.2) 0%, transparent 100%);
    position: relative;
}

.hero-brand {
    max-width: 400px;
    width: 80%;
    height: auto;
    margin: 0 auto 30px;
    display: block;
    animation: fadeInUp 0.8s ease;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
}

.player-profile {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(25, 25, 25, 0.8);
    padding: 12px 24px;
    border-radius: 10px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease;
}

.player-emoji {
    font-size: 2rem;
}

.player-name {
    font-size: 1.3rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(25, 25, 25, 0.8);
    padding: 12px 24px;
    border-radius: 10px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.profile-emoji {
    font-size: 2rem;
}

.profile-name {
    font-size: 1.3rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.audio-btn {
    width: 50px;
    height: 50px;
    background: rgba(25, 25, 25, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.audio-btn.active {
    background: var(--primary);
    border-color: var(--primary-dark);
}

.tech-stack {
    margin-top: 10px;
    opacity: 0.7;
}

.profile-change-btn {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 3px 0 var(--primary-dark);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.profile-change-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 var(--primary-dark);
}

.profile-change-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 var(--primary-dark);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4),
                 8px 8px 0 rgba(74, 144, 226, 0.3);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease;
}

.cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 0 var(--primary-dark), 0 10px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1.2s ease;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--primary-dark), 0 12px 25px rgba(0, 0, 0, 0.4);
}

.cta-button:active {
    transform: translateY(2px);
    box-shadow: 0 4px 0 var(--primary-dark), 0 6px 15px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Games Section */
.games-section {
    padding: 80px 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 60px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-tab:hover::before {
    left: 100%;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3), 0 8px 15px rgba(74, 144, 226, 0.4);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--genie-gold);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3), 0 8px 20px rgba(74, 144, 226, 0.6);
}

.category-tab.active .tab-icon {
    animation: tabBounce 0.6s ease;
}

@keyframes tabBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.tab-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.tab-label {
    font-weight: 800;
    white-space: nowrap;
}

/* Responsive category tabs */
@media (max-width: 768px) {
    .category-tabs {
        gap: 8px;
        margin-bottom: 35px;
    }
    
    .category-tab {
        padding: 10px 16px;
        font-size: 0.85rem;
        border-width: 2px;
    }
    
    .tab-icon {
        font-size: 1.1rem;
    }
    
    .tab-label {
        display: none;
    }
    
    .category-tab:hover .tab-label,
    .category-tab.active .tab-label {
        display: inline;
    }
}

@media (max-width: 480px) {
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 10px;
    }
    
    .category-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .category-tab {
        flex-shrink: 0;
    }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.3), 0 12px 25px rgba(0, 0, 0, 0.2);
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    border-color: var(--primary);
    box-shadow: 0 12px 0 rgba(0, 0, 0, 0.4), 0 16px 35px rgba(102, 126, 234, 0.4);
}

.game-card-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.game-preview {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 4rem;
    position: relative;
}

.road-crosser-preview {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.target-shooter-preview {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.space-defender-preview {
    background: linear-gradient(135deg, #667eea 0%, #302b63 100%);
}

.dual-duel-preview {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.pixel-paint-preview {
    background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
}

.bubble-pop-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    animation: bubbleGradient 3s ease infinite;
}

@keyframes bubbleGradient {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(20deg); }
}

.game-emoji {
    animation: bounce 2s ease-in-out infinite;
}

.game-emoji-2 {
    animation: bounce 2s ease-in-out infinite 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.coming-soon-preview {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    flex-direction: column;
}

.coming-soon-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    position: absolute;
    top: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
}

.game-card-content {
    padding: 25px;
}

.game-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.game-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tag {
    background: rgba(102, 126, 234, 0.2);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid rgba(102, 126, 234, 0.4);
    letter-spacing: 0.5px;
}

.game-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-icon {
    font-size: 1.2rem;
}

.play-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 0 var(--primary-dark), 0 6px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.play-button:hover::before {
    left: 100%;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--primary-dark), 0 8px 20px rgba(102, 126, 234, 0.5);
}

.play-button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 0 var(--primary-dark), 0 5px 12px rgba(0, 0, 0, 0.3);
}

.arrow {
    transition: transform 0.3s ease;
}

.play-button:hover .arrow {
    transform: translateX(5px);
}

.play-button.disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: 0 4px 0 #333, 0 6px 15px rgba(0, 0, 0, 0.3);
}

.play-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

.game-card.coming-soon {
    opacity: 0.8;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: rgba(22, 33, 62, 0.5);
}

.about-brand {
    max-width: 300px;
    width: 60%;
    height: auto;
    margin: 0 auto 40px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content > p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.feature:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.4), 0 12px 20px rgba(102, 126, 234, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text);
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    padding: 60px 0 20px;
    background: #191919;
    border-top: 4px solid var(--primary);
    box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.3);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text);
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-block !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .nav {
        gap: 15px;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    /* .games-grid {
        grid-template-columns: 1fr;
    } */

    .section-title {
        font-size: 2rem;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .logo-image {
        height: 32px;
    }

    .hero-brand {
        max-width: 280px;
    }

    .about-brand {
        max-width: 200px;
    }

    .footer-brand {
        max-width: 150px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }
}