* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --accent-color: #14b8a6;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f1f5f9;
    --text-muted: #cbd5e1;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #14b8a6 0%, #6366f1 100%);
}

body.light-mode {
    --dark-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-light: #0f172a;
    --text-muted: #334155;
    --primary-color: #4f46e5;
    --secondary-color: #db2777;
    --accent-color: #0d9488;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
}

/* Navigation Bar */
.navbar {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(100, 116, 139, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .navbar {
    background: rgba(248, 250, 252, 0.8);
    border-bottom-color: rgba(100, 116, 139, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s;
    letter-spacing: -0.5px;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.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;
}

@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.95);
        padding: 1rem;
        gap: 1rem;
        display: none;
        border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    }

    .nav-menu.active {
        display: flex;
    }

    body.light-mode .nav-menu {
        background: rgba(248, 250, 252, 0.95);
    }
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    transition: 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.email-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--gradient-1);
    border-radius: 10px;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    font-size: 0.95rem;
}

.email-link::after {
    display: none;
}

.email-link:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

body.light-mode .email-link {
    background: var(--gradient-1);
    color: white !important;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
    padding: 0.7rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(99, 102, 241, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.15) rotate(25deg);
    background: rgba(99, 102, 241, 0.2);
}

.theme-icon {
    font-size: 1.3rem;
    animation: rotateIcon 0.6s ease-out;
}

@keyframes rotateIcon {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a2a4a 50%, #0f172a 100%);
    transition: background 0.3s ease;
}

body.light-mode .hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f0f4ff 100%);
}

.hero-content {
    z-index: 10;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    animation: slideInDown 1s ease-out;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    animation: slideInUp 1s ease-out 0.2s both;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.cta-btn {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    border: none;
    background: var(--gradient-1);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
    animation: slideInUp 1s ease-out 0.4s both;
    letter-spacing: 0.5px;
}

.cta-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 50px rgba(99, 102, 241, 0.5);
}

.cta-btn:active {
    transform: translateY(-1px);
}

.hero-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(40px);
    animation: float 15s infinite;
}

.blob1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: 10%;
    left: 10%;
    animation: float 15s infinite;
    opacity: 0.25;
}

.blob2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-color);
    bottom: 10%;
    right: 10%;
    animation: float 20s infinite 2s;
    opacity: 0.25;
}

.blob3 {
    width: 250px;
    height: 250px;
    background: var(--accent-color);
    top: 50%;
    left: 50%;
    animation: float 18s infinite 4s;
    opacity: 0.25;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Games Section */
.games {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a2a4a 100%);
    position: relative;
    transition: background 0.3s ease;
}

body.light-mode .games {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4ff 100%);
}

.games-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInDown 1s ease-out;
    font-weight: 900;
    letter-spacing: -1px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    animation: fadeInUp 1.2s ease-out;
}

.game-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(99, 102, 241, 0.3);
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body.light-mode .game-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.game-card:nth-child(1) { animation-delay: 0s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.2s; }
.game-card:nth-child(4) { animation-delay: 0.3s; }
.game-card:nth-child(5) { animation-delay: 0.4s; }
.game-card:nth-child(6) { animation-delay: 0.5s; }

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.4);
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 0.8);
}

body.light-mode .game-card:hover {
    box-shadow: 0 20px 50px rgba(79, 70, 229, 0.2);
    background: rgba(255, 255, 255, 1);
}

.game-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.game-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

.game-card:hover .game-image::before {
    animation: shimmer 1.5s infinite;
}

.game-info {
    padding: 1.8rem;
}

.game-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.game-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.play-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.play-btn:hover::before {
    width: 300px;
    height: 300px;
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.8);
    text-align: center;
    padding: 2.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-muted);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

body.light-mode .footer {
    background: rgba(248, 250, 252, 0.9);
    border-top-color: rgba(79, 70, 229, 0.2);
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .section-title {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
