/* Responsive Design */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0 40px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Medium screens (768px to 1199px) */
@media (max-width: 1199px) {
    .hero-content {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .game-wrapper {
        grid-template-columns: 1.5fr 1fr;
        gap: 2rem;
    }
}

/* Tablet screens (768px to 991px) */
@media (max-width: 991px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-visual {
        height: 300px;
    }
    
    .game-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    #game-canvas {
        height: 350px;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        transition: left 0.3s ease;
        padding: 2rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        border-radius: 0.5rem;
        background: rgba(102, 126, 234, 0.1);
        text-align: center;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .disclaimer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile screens (576px to 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .features {
        padding: 3rem 0;
    }
    
    .cta-section {
        padding: 3rem 0;
    }
    
    .game-section {
        padding: 2rem 0 3rem;
    }
    
    .game-container {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }
    
    #game-canvas {
        height: 300px;
    }
    
    .how-to-play {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }
    
    .legal-content {
        padding: 2rem;
        border-radius: 1rem;
    }
    
    .footer {
        padding: 2rem 0 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .disclaimer-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-actions {
        justify-content: center;
    }
}

/* Small mobile screens (up to 575px) */
@media (max-width: 575px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .game-container {
        padding: 1rem;
    }
    
    #game-canvas {
        height: 250px;
    }
    
    .placeholder-icon {
        font-size: 3rem;
    }
    
    .card-float {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .legal-content {
        padding: 1.5rem;
    }
    
    .legal-content h1 {
        font-size: 1.75rem;
    }
    
    .legal-content h2 {
        font-size: 1.4rem;
    }
}

/* Extra small screens (up to 400px) */
@media (max-width: 400px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .features {
        padding: 2rem 0;
    }
    
    .cta-section {
        padding: 2rem 0;
    }
    
    .game-section {
        padding: 1.5rem 0 2rem;
    }
    
    .game-container {
        padding: 0.75rem;
        border-radius: 1rem;
    }
    
    #game-canvas {
        height: 200px;
    }
    
    .how-to-play {
        padding: 1.5rem 1rem;
    }
    
    .legal-content {
        padding: 1rem;
    }
    
    .footer {
        padding: 1.5rem 0 1rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .nav-toggle,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero,
    .features,
    .cta-section,
    .game-section,
    .legal-page {
        background: white !important;
        padding: 1rem 0 !important;
    }
    
    .feature-card,
    .game-container,
    .legal-content {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .gradient-text {
        -webkit-text-fill-color: black !important;
        background: none !important;
    }
    
    main {
        margin-top: 0 !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
    
    .btn-secondary {
        background: #fff !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .feature-card {
        border: 2px solid #000 !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .card-float {
        animation: none !important;
    }
    
    .btn:hover {
        transform: none !important;
    }
    
    .feature-card:hover {
        transform: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .features,
    .game-section,
    .legal-page {
        background: rgba(44, 62, 80, 0.95) !important;
    }
    
    .feature-card,
    .game-container,
    .legal-content,
    .how-to-play {
        background: #34495e !important;
        color: #ecf0f1 !important;
    }
    
    .feature-title,
    .game-title,
    .legal-content h1,
    .legal-content h2,
    .legal-content h3,
    .page-title,
    .section-title {
        color: #ecf0f1 !important;
    }
    
    .feature-description,
    .game-description,
    .legal-content p,
    .legal-content li,
    .page-subtitle,
    .section-subtitle {
        color: #bdc3c7 !important;
    }
}