/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6B9D;
    --accent-color: #FEC163;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);

    /* Dark Theme (Default) */
    --bg-primary: #0F0E17;
    --bg-secondary: #1A1825;
    --bg-card: #232135;
    --text-primary: #FFFFFE;
    --text-secondary: #A7A9BE;
    --border-color: #2E2D3D;
    --navbar-bg: rgba(15, 14, 23, 0.95);
    --card-bg: #232135;
    --section-bg: #1A1825;
}

/* Light Theme */
body.light-theme {
    --bg-primary: #FFFFFE;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --text-primary: #2E2F3E;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #FFFFFF;
    --section-bg: #F8F9FA;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

body.light-theme .navbar {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

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

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

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

.nav-link:hover {
    color: var(--primary-color);
}

/* Nav Controls (Theme Toggle + Hamburger) */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 60px;
    height: 32px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.theme-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

.moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-theme .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-theme .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--gradient-1);
    border-radius: 50%;
    transition: transform 0.3s ease;
    transform: translateX(-2px);
    z-index: 1;
}

body.light-theme .theme-toggle::before {
    transform: translateX(26px);
    background: var(--gradient-3);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1438 0%, #2d1b4e 100%);
    overflow: hidden;
    padding-top: 80px;
    transition: background 0.5s ease;
}

body.light-theme .hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animated Starfield Background */
.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.15;
    transition: opacity 0.5s ease;
}

body.light-theme .stars,
body.light-theme .stars2,
body.light-theme .stars3 {
    opacity: 0.5;
}

.stars {
    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="0.5" fill="%23a78bfa" opacity="1"/></svg>') repeat;
    animation: animateStars 50s linear infinite;
}

.stars2 {
    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="0.5" fill="%2388c0ff" opacity="1"/></svg>') repeat;
    animation: animateStars 100s linear infinite;
}

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

body.light-theme .stars {
    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="0.8" fill="white" opacity="1"/></svg>') repeat;
}

body.light-theme .stars2 {
    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="0.8" fill="white" opacity="1"/></svg>') repeat;
}

body.light-theme .stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="5" height="5"><circle cx="2.5" cy="2.5" r="0.8" fill="white" opacity="1"/></svg>') repeat;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.8));
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

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

.btn {
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
}

body.light-theme .shape {
    opacity: 0.6;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: var(--gradient-3);
    top: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: var(--gradient-2);
    top: 60%;
    right: 15%;
    animation: float 8s ease-in-out infinite 1s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: var(--gradient-4);
    bottom: 20%;
    left: 20%;
    animation: float 7s ease-in-out infinite 2s;
}

.shape-4 {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    top: 30%;
    right: 25%;
    animation: float 9s ease-in-out infinite 0.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid var(--border-color);
}

body.light-theme .about-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(108, 99, 255, 0.2);
}

body.light-theme .about-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Games Section */
.games {
    padding: 100px 0;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-top: -2rem;
    margin-bottom: 3rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.game-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

body.light-theme .game-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(108, 99, 255, 0.3);
}

body.light-theme .game-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.game-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.game-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.game-card:nth-child(2) .game-placeholder {
    background: var(--gradient-2);
}

.game-card:nth-child(3) .game-placeholder {
    background: var(--gradient-3);
}

.game-icon {
    font-size: 5rem;
    animation: pulse 2s infinite;
}

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

.game-info {
    padding: 2rem;
}

.game-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.game-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.game-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 5px 15px;
    background: var(--gradient-1);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Stats Section */
.stats {
    padding: 80px 0;
    background: var(--gradient-1);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

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

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

body.light-theme .contact-item {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.2);
}

body.light-theme .contact-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 2.5rem;
}

.contact-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-text {
    color: var(--text-light);
    margin: 1rem 0;
}

.footer-copyright {
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--navbar-bg);
        width: 100%;
        padding: 2rem 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        backdrop-filter: blur(10px);
    }

    body.light-theme .nav-menu {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

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

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
