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

:root {
    --primary-color: #385291;
    --primary-dark: #2a3d6b;
    --primary-light: #4a6ba8;
    --accent-color: #ffd700;
    --text-dark: #1a1a2e;
    --text-light: #f0f0f0;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

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

/* Tetris Block Styles */
.logo-block {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 6px;
    position: relative;
    box-shadow: 0 4px 8px rgba(56, 82, 145, 0.3);
    animation: float 3s ease-in-out infinite;
}

.logo-block::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 4px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(56, 82, 145, 0.3);
}

.navbar {
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h2 {
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
    font-family: 'Fredoka One', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

.nav-menu a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

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

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 120px 0 80px;
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.tetris-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(255, 255, 255, 0.1) 30px, rgba(255, 255, 255, 0.1) 31px),
        repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(255, 255, 255, 0.1) 30px, rgba(255, 255, 255, 0.1) 31px);
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    font-family: 'Fredoka One', cursive;
    line-height: 1.2;
}

.title-block {
    display: inline-block;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 10px;
    animation: blockBounce 2s ease-in-out infinite;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.title-block:nth-child(1) { animation-delay: 0s; }
.title-block:nth-child(2) { animation-delay: 0.2s; }
.title-block:nth-child(3) { animation-delay: 0.4s; }

@keyframes blockBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

.btn {
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

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

/* Phone Mockup */
.phone-mockup {
    position: relative;
    width: 300px;
    height: 600px;
    margin: 0 auto;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 35px;
    padding: 15px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: float 4s ease-in-out infinite;
}

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

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.tetris-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 20px;
}

.preview-block {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3),
                0 2px 4px rgba(0, 0, 0, 0.3);
    animation: previewFloat 2s ease-in-out infinite;
}

.preview-block:nth-child(1) { animation-delay: 0s; }
.preview-block:nth-child(2) { animation-delay: 0.5s; }
.preview-block:nth-child(3) { animation-delay: 1s; }
.preview-block:nth-child(4) { animation-delay: 1.5s; }

@keyframes previewFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.block-i { background: linear-gradient(135deg, #ff6b6b, #ee5a6f); }
.block-o { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.block-t { background: linear-gradient(135deg, #ffe66d, #ffd93d); }
.block-l { background: linear-gradient(135deg, #a8e6cf, #88d8a3); }

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-family: 'Fredoka One', cursive;
}

.title-icon {
    display: inline-block;
    margin-right: 10px;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(56, 82, 145, 0.15);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(56, 82, 145, 0.25);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.block-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.feature-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: #666;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Gameplay Section */
.gameplay {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
}

.gameplay-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.gameplay-description {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-dark);
}

.gameplay-intro {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.gameplay-description p {
    margin-bottom: 1.5rem;
}

.gameplay-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tetris-demo {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(56, 82, 145, 0.2);
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 200px;
    height: 240px;
}

.grid-cell {
    background: #f0f0f0;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.grid-cell.filled {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Screenshots Section */
.screenshots {
    padding: 80px 0;
    background: white;
}

.screenshots-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.screenshot-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(56, 82, 145, 0.15);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.screenshot-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.screenshot-item:hover::before {
    transform: scaleX(1);
}

.screenshot-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(56, 82, 145, 0.25);
    border-color: var(--primary-color);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 3rem;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-family: 'Fredoka One', cursive;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: #555;
}

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tetris-illustration {
    width: 100%;
    max-width: 300px;
    background: linear-gradient(135deg, #f0f4ff, #e8f0ff);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(56, 82, 145, 0.2);
    animation: float 4s ease-in-out infinite;
}

.tetris-illustration svg {
    width: 100%;
    height: auto;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-logo h3 {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Fredoka One', cursive;
}

.footer-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.contact-info p {
    margin-bottom: 1rem;
}

.footer-email {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-email:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.2);
        padding: 2rem 0;
    }

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

    .hamburger {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

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

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

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

    .phone-mockup {
        width: 250px;
        height: 500px;
    }

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

    .gameplay-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .screenshots-gallery {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

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

    .title-block {
        display: block;
        margin-bottom: 5px;
    }

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

    .feature-card {
        padding: 1.5rem;
    }

    .phone-mockup {
        width: 200px;
        height: 400px;
    }

    .gameplay-description {
        font-size: 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

.feature-card,
.gameplay-description,
.about-text {
    animation: fadeInUp 0.6s ease-out;
}

