@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: #f9fafb;
    color: #2c3e50;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

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

h1, h2, h3, h4 {
    color: #1a1f36;
    margin-top: 0;
}

h1.hero-title {
    font-weight: 700;
    font-size: 3.2rem;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

h2.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 3px solid #5a67d8;
    padding-bottom: 0.3rem;
    letter-spacing: 0.03em;
}

h3 {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
    color: #34495e;
}

p {
    margin-bottom: 1.2rem;
    color: #4a5a6a;
}

a {
    color: #5a67d8;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: #434190;
    outline: none;
}

.main-header {
    background: #1a1f36;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: white;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-weight: 600;
    font-size: 1rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus {
    border-color: #5a67d8;
    color: #a3bffa;
}

main {
    padding: 3rem 0 6rem;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.hero-description p {
    font-size: 1.125rem;
    line-height: 1.5;
    color: #e2e8f0;
    margin-bottom: 2.5rem;
}

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.store-link img {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
    border-radius: 0.3rem;
    transition: transform 0.3s ease;
}

.store-link img:hover,
.store-link img:focus {
    transform: scale(1.05);
    outline: none;
}

.app-info {
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    letter-spacing: 0.05em;
}

.description-section {
    background: white;
    padding: 4rem 0;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.text-content p:last-child {
    margin-bottom: 0;
}

.image-content {
    text-align: center;
}

.feature-img {
    max-width: 100%;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    transition: transform 0.4s ease;
}

.feature-img:hover,
.feature-img:focus {
    transform: scale(1.05);
    outline: none;
}

.additional-info {
    margin-top: 3rem;
    font-size: 1rem;
    color: #555e70;
}

.features-section {
    background: #f0f4ff;
    padding: 5rem 0;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 12px 24px rgba(86, 92, 151, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.feature-card:hover,
.feature-card:focus-within {
    box-shadow: 0 20px 40px rgba(86, 92, 151, 0.24);
    transform: translateY(-6px);
    outline: none;
}

.feature-card h3 {
    color: #3b4cca;
    margin-bottom: 0.8rem;
}

.feature-card p {
    color: #606f86;
    font-weight: 500;
    flex-grow: 1;
}

.centered-image {
    margin-top: 4rem;
    text-align: center;
}

.mid-page-img {
    max-width: 80%;
    border-radius: 1.5rem;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.25);
    transition: transform 0.4s ease;
}

.mid-page-img:hover,
.mid-page-img:focus {
    transform: scale(1.03);
    outline: none;
}

.gallery-section {
    background: white;
    padding: 5rem 0 6rem;
    text-align: center;
}

.section-intro {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: #6b7280;
}

.screenshots-container {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 1.8rem;
    justify-items: center;
}

.screenshot-item {
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(104, 109, 143, 0.15);
    width: 100%;
    max-width: 320px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
}

.screenshot-item:hover,
.screenshot-item:focus {
    transform: scale(1.05);
    box-shadow: 0 16px 36px rgba(104, 109, 143, 0.3);
    outline: none;
}

.how-to-play-section {
    background: #e9eefc;
    padding: 5rem 0;
}

.steps-list {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 2rem;
}

.step {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 26px rgba(88, 99, 201, 0.12);
    padding: 2rem 2.2rem;
    position: relative;
    transition: box-shadow 0.3s ease;
    cursor: default;
}

.step:hover,
.step:focus-within {
    box-shadow: 0 18px 40px rgba(88, 99, 201, 0.24);
    outline: none;
}

.step-num {
    position: absolute;
    top: 1.5rem;
    left: 1.8rem;
    background: #5a67d8;
    color: white;
    font-weight: 700;
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 8px rgba(90,103,216,0.5);
    user-select: none;
}

.step p {
    margin-left: 3.8rem;
    color: #3a4661;
    font-weight: 600;
    font-size: 1.1rem;
}

.cta-section {
    background: linear-gradient(135deg, #6b4ba2, #5a67d8);
    color: white;
    padding: 5rem 1.5rem 6rem;
    text-align: center;
    border-radius: 2rem 2rem 0 0;
}

.cta-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 1.5px 1.5px 5px rgba(0,0,0,0.3);
}

.cta-section p {
    font-size: 1.25rem;
    max-width: 720px;
    margin: 0 auto 3rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-shadow: 0 0 6px rgba(0,0,0,0.15);
}

.main-footer {
    background: #1a1f36;
    color: #a0aec0;
    padding: 4rem 0 3rem;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 2.8rem;
}

.footer-info h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.footer-info p {
    margin-bottom: 0.4rem;
    color: #9ca3af;
}

.footer-info .copyright {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #7f8ea3;
}

.footer-links h4,
.footer-legal h4 {
    color: #cbd5e1;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 0.8rem;
}

.footer-links a,
.footer-legal a {
    color: #9ca3af;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-legal a:hover,
.footer-links a:focus,
.footer-legal a:focus {
    color: #5a67d8;
    outline: none;
}

@media (max-width: 1024px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

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

@media (max-width: 768px) {
    .main-nav ul {
        gap: 1.2rem;
        font-size: 0.95rem;
    }

    .feature-card {
        padding: 1.5rem 1.8rem;
    }

    .step p {
        margin-left: 3.4rem;
        font-size: 1rem;
    }

    .step-num {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        line-height: 40px;
        top: 1.3rem;
        left: 1.3rem;
    }

    .mid-page-img {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 0.8rem 0;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }

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

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

    .app-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .store-link img {
        width: 140px;
    }

    .features-grid,
    .steps-list,
    .screenshots-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .step p {
        margin-left: 3rem;
        font-size: 0.95rem;
    }

    .step-num {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        line-height: 36px;
        top: 1rem;
        left: 1rem;
    }
}