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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 8px 12px;
    border: 2px solid #4a90e2;
    background: white;
    color: #4a90e2;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #4a90e2;
    color: white;
}

.lang-btn.active {
    background: #4a90e2;
    color: white;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-top: 10px;
    font-weight: 500;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.download-section {
    margin-top: 30px;
}

.download-btn {
    display: inline-block;
    transition: transform 0.3s ease;
}

.download-btn:hover {
    transform: scale(1.05);
}

.app-store-badge {
    height: 60px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.download-text {
    margin-top: 15px;
    font-size: 1rem;
    opacity: 0.8;
}

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

.game-preview {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    background: #000;
}

.game-preview:hover {
    transform: scale(1.02);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.video-placeholder p {
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.random-video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}

.video-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-preview:hover .video-controls {
    opacity: 1;
}

.video-control-btn {
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s ease;
}

.video-control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

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

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

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

.feature-item {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4a90e2;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

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

.videos h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

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

.video-item {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: scale(1.02);
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* How to Play Section */
.how-to-play {
    padding: 80px 0;
    background: white;
}

.how-to-play h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

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

.step {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step p {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Download Section Final */
.download-section-final {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.download-section-final h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.download-section-final p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-btn-large {
    display: inline-block;
    transition: transform 0.3s ease;
}

.download-btn-large:hover {
    transform: scale(1.05);
}

.app-store-badge-large {
    height: 80px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 50px 0 20px;
}

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

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #4a90e2;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: #4a90e2;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #999;
}

/* Large screens - slightly bigger video */
@media (min-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr 1.3fr;
        gap: 60px;
    }
    
    .game-preview {
        max-width: 550px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .game-preview {
        max-width: 100%;
        width: 100%;
    }
    
    .hero-text h2 {
        font-size: 2.2rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .features h2,
    .videos h2,
    .how-to-play h2,
    .download-section-final h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-text h2 {
        font-size: 1.8rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .app-store-badge {
        height: 50px;
    }
    
    .app-store-badge-large {
        height: 60px;
    }
    
    .features h2,
    .videos h2,
    .how-to-play h2,
    .download-section-final h2 {
        font-size: 1.8rem;
    }
}

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

.feature-item,
.video-item,
.step {
    animation: fadeInUp 0.6s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .language-selector,
    .download-btn,
    .download-btn-large {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero,
    .download-section-final {
        background: white;
        color: black;
    }
}
