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

:root {
    --primary-color: #5B9EFF;
    --secondary-color: #FFD93D;
    --tertiary-color: #4ECDC4;
    --purple-color: #A594F9;
    --dark-color: #3A3A3A;
    --light-color: #FFFBF5;
    --gray-color: #E5E5E5;
    --text-color: #2D2D2D;
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-brand .logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.lang-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.lang-toggle:hover {
    background: var(--purple-color);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--dark-color);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--purple-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(91, 158, 255, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

/* Game Preview */
.game-preview {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.block-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    animation: float 3s ease-in-out infinite;
}

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

.block {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

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

.block-blue {
    background: linear-gradient(135deg, var(--primary-color), #3D7DD9);
}

.block-yellow {
    background: linear-gradient(135deg, var(--secondary-color), #FFB800);
}

.block-teal {
    background: linear-gradient(135deg, var(--tertiary-color), #35B3AA);
}

.block-purple {
    background: linear-gradient(135deg, var(--purple-color), #8B7FDB);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

/* How to Play */
.how-to-play {
    background: white;
}

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

.step {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    background: var(--light-color);
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
}

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

.step-text {
    color: var(--text-color);
    opacity: 0.8;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.feature-text {
    color: var(--text-color);
    opacity: 0.8;
}

/* Levels */
.levels {
    background: white;
}

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

.level-card {
    background: var(--light-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 3px solid var(--primary-color);
    text-align: center;
    transition: var(--transition);
}

.level-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(91, 158, 255, 0.3);
}

.level-impossible {
    border-color: var(--purple-color);
    background: linear-gradient(135deg, rgba(165, 148, 249, 0.1), rgba(165, 148, 249, 0.2));
}

.level-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.level-impossible .level-name {
    color: var(--purple-color);
}

.level-range {
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.level-desc {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.95rem;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    color: white;
    text-align: center;
    padding: 100px 0;
}

.cta-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.cta-text {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

.cta .btn-primary:hover {
    background: var(--secondary-color);
    color: var(--dark-color);
}

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

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-link:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* Content Pages Styles */
.content-page {
    padding: 100px 0;
    min-height: calc(100vh - 300px);
}

.content-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.content-page h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.content-page h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-page ul, .content-page ol {
    margin: 1rem 0 1rem 2rem;
}

.content-page li {
    margin-bottom: 0.5rem;
}

.content-page a {
    color: var(--primary-color);
    text-decoration: none;
}

.content-page a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }

    .block-grid {
        max-width: 300px;
        margin: 0 auto;
    }

    .block {
        width: 60px;
        height: 60px;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

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

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

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .steps,
    .features-grid,
    .levels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-links a:not(.lang-toggle) {
        display: none;
    }

    .nav-links {
        gap: 0.5rem;
    }
}
