/* Responsive Design */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablet */
@media (max-width: 991px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        box-shadow: var(--shadow);
        padding: 1rem;
        gap: 1rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .nav-auth {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Mobile Large */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 3rem 0;
        min-height: 70vh;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features,
    .games,
    .statistics,
    .testimonials,
    .security {
        padding: 4rem 0;
    }
    
    .features h2,
    .games h2,
    .statistics h2,
    .testimonials h2 {
        font-size: 2.5rem;
    }
    
    .features-grid,
    .games-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about {
        padding: 4rem 0;
    }
    
    .about-content h2 {
        font-size: 2.5rem;
    }
    
    .about-highlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cta {
        padding: 4rem 0;
    }
    
    .cta h2 {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .nav-auth {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .nav-brand img {
        height: 50px;
    }
    
    .game-features {
        justify-content: center;
    }
    
    .security-feature {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile Small */
@media (max-width: 575px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .features h2,
    .games h2,
    .statistics h2,
    .testimonials h2,
    .about-content h2,
    .cta h2 {
        font-size: 2rem;
    }
    
    .feature-card,
    .game-card {
        padding: 2rem 1.5rem;
    }
    
    .feature-card h3,
    .game-card h3 {
        font-size: 1.4rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }
    
    .nav-auth {
        display: none;
    }
    
    .nav-auth.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        box-shadow: var(--shadow);
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .game-features span {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem;
    }
}

/* Mobile Extra Small */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .features h2,
    .about-content h2,
    .cta h2 {
        font-size: 1.6rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .nav-brand img {
        height: 45px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 50vh;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1rem;
    }
    
    .features,
    .about,
    .cta {
        padding: 2rem 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-brand img,
    .hero-image img,
    .feature-card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-image img:hover,
    .feature-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #ff8c00;
        --accent-color: #ff0000;
        --text-color: #000000;
        --light-text: #333333;
        --background: #ffffff;
        --light-background: #f0f0f0;
        --border-color: #000000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f9fafb;
        --light-text: #d1d5db;
        --background: #111827;
        --light-background: #1f2937;
        --border-color: #374151;
    }
    
    .header {
        background: rgba(17, 24, 39, 0.95);
    }
    
    .hero {
        background: linear-gradient(135deg, var(--light-background) 0%, #312e81 100%);
    }
    
    .feature-card {
        background: var(--light-background);
        border-color: var(--border-color);
    }
    
    .cta {
        background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    }
}

/* Focus Visible for Better Accessibility */
@media (any-hover: hover) {
    .btn:hover {
        transform: translateY(-2px);
    }
    
    .nav-menu a:hover::after {
        width: 100%;
    }
}

@media (any-hover: none) {
    .btn:active {
        transform: translateY(0);
    }
    
    .nav-menu a:active::after {
        width: 100%;
    }
}

/* Contact Page Responsive */
@media (max-width: 991px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        order: -1;
    }
    
    .security .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .security-status {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .games-grid,
    .stats-grid,
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 767px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .content-wrapper h2 {
        font-size: 1.6rem;
    }
    
    .content-wrapper h3 {
        font-size: 1.3rem;
    }
    
    .contact-method {
        padding: 0.75rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .error-code h1 {
        font-size: 4rem;
    }
    
    .error-message h2 {
        font-size: 1.6rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .content-section {
        padding: 2rem 0;
    }
    
    .contact-section {
        padding: 2rem 0;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.5rem;
    }
    
    .error-code h1 {
        font-size: 3rem;
    }
    
    .error-message h2 {
        font-size: 1.4rem;
    }
    
    .error-actions .btn {
        display: block;
        margin: 0.5rem 0;
        width: 100%;
    }
}

/* Print Styles Enhancement */
@media print {
    .hero {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        color: black !important;
    }
    
    .hero-subtitle {
        color: #333 !important;
    }
    
    .feature-card {
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
    }
    
    .cta {
        background: white !important;
        color: black !important;
        border: 2px solid #333;
    }
    
    .btn {
        border: 1px solid #333;
        color: black !important;
        background: white !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .page-header {
        background: white !important;
        color: black !important;
    }
    
    .contact-form,
    .contact-method,
    .support-hours,
    .faq-item,
    .error-content,
    .gaming-cta {
        border: 1px solid #ccc;
        box-shadow: none;
    }
} 