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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #1e1b4b;
    --darker-bg: #0f172a;
    --light-text: #f8fafc;
    --gray-text: #94a3b8;
    --card-bg: #1e293b;
    --hover-color: #4f46e5;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    color: var(--light-text);
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    background: rgba(30, 27, 75, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--primary-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--light-text);
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    color: var(--primary-color);
    font-size: 2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    min-width: 220px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 10px 0;
    margin-top: 5px;
    border: 1px solid var(--primary-color);
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--light-text);
    text-decoration: none;
    transition: background 0.3s ease, padding-left 0.3s ease;
}

.dropdown-content a:hover {
    background: var(--primary-color);
    padding-left: 30px;
}

.dropdown-content i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--primary-color);
}

.hero {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray-text);
    max-width: 800px;
    margin: 0 auto 30px;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.section {
    padding: 60px 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 20px auto 0;
    border-radius: 2px;
}

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

.game-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color);
}

.game-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-image i {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.game-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.game-content {
    padding: 25px;
}

.game-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--light-text);
}

.game-content p {
    color: var(--gray-text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.play-button:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
}

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

.feature-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color);
}

.feature-box i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-box h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

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

.game-container {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    margin: 40px auto;
    max-width: 900px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.game-canvas-wrapper {
    text-align: center;
    margin: 30px 0;
}

canvas {
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    background: var(--darker-bg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.game-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.5);
}

.game-btn:active {
    transform: translateY(0);
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.info-box {
    background: var(--darker-bg);
    padding: 15px 30px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--primary-color);
}

.info-box span {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-bottom: 5px;
}

.info-box strong {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.content-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    margin: 40px auto;
    max-width: 900px;
    line-height: 1.8;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.content-section h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--secondary-color);
}

.content-section p {
    margin-bottom: 15px;
    color: var(--gray-text);
}

.content-section ul {
    margin: 15px 0 15px 30px;
    color: var(--gray-text);
}

.content-section ul li {
    margin-bottom: 10px;
}

.contact-info {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    margin: 40px auto;
    max-width: 900px;
}

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

.contact-item {
    background: var(--darker-bg);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--primary-color);
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

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

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-color);
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--darker-bg);
    border-radius: 50%;
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.5rem;
    transition: background 0.3s ease, transform 0.3s ease;
    border: 2px solid var(--primary-color);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

footer {
    background: var(--darker-bg);
    padding: 50px 20px 20px;
    margin-top: 80px;
    border-top: 2px solid var(--primary-color);
}

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

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-section p,
.footer-section a {
    color: var(--gray-text);
    text-decoration: none;
    line-height: 1.8;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

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

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

.error-container {
    text-align: center;
    padding: 100px 20px;
}

.error-container h1 {
    font-size: 8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.error-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.error-container p {
    color: var(--gray-text);
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 15px;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        padding: 15px;
        border-bottom: 1px solid var(--card-bg);
    }

    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        margin-top: 0;
        padding: 0;
        background: var(--darker-bg);
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        padding-left: 40px;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

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

    .game-container,
    .content-section,
    .contact-info {
        padding: 20px;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }

    .error-container h1 {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .hero {
        padding: 40px 20px;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .game-content h3 {
        font-size: 1.2rem;
    }

    .play-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
