/* Responsive Design - Mobile and Tablet Adaptations */

/* Large Desktop */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Desktop */
@media screen and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-logo {
        height: 80px;
        max-width: 400px;
    }
    
    .nav-list {
        gap: 24px;
    }
}

/* Tablet Landscape */
@media screen and (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 16px;
    }
    
    /* Header Adjustments */
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        z-index: 1001;
    }
    
    .auth-buttons {
        display: none !important;
    }
    
    /* Ensure mobile nav works on tablets */
    .mobile-nav {
        z-index: 1000;
    }
    
    /* Hero Section */
    .hero-logo {
        height: 70px;
        max-width: 350px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .welcome-bonus {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    
    /* Grid Adjustments */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* Section Spacing */
    .features,
    .games-categories,
    .popular-games,
    .promotions {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Tablet Portrait */
@media screen and (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 14px;
    }
    
    /* Header */
    .header-content {
        height: 60px;
    }
    
    .main {
        margin-top: 60px;
    }
    
    .logo-image {
        height: 35px;
        max-width: 130px;
    }
    
    .footer-logo-image {
        height: 28px;
        max-width: 100px;
    }
    
    /* Legacy text logo styles */
    .logo-text {
        font-size: 24px;
    }
    
    /* Mobile Navigation */
    .mobile-nav.active {
        display: block !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        animation: slideDown 0.3s ease;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Hero Section */
    .hero {
        min-height: 90vh;
        padding: 40px 0;
    }
    
    .hero-logo {
        height: 60px;
        max-width: 280px;
    }
    
    .hero-title {
        margin-bottom: 20px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }
    
    .hero-buttons {
        margin-bottom: 40px;
    }
    
    /* Single Column Grids */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .promotions-grid {
        grid-template-columns: 1fr;
    }
    
    /* Card Adjustments */
    .feature-card,
    .category-card,
    .promo-card {
        padding: 30px 20px;
    }
    
    .game-card {
        margin-bottom: 0;
    }
    
    .game-image {
        height: 120px;
        font-size: 2rem;
    }
    
    .game-image .emoji-fallback {
        font-size: 2.5rem;
    }
    
    .game-image i {
        font-size: 2rem;
    }
    
    .game-content {
        padding: 16px;
    }
    
    .game-actions {
        flex-direction: column;
    }
    
    /* Filter Buttons */
    .games-filter {
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* Section Spacing */
    .features,
    .games-categories,
    .popular-games,
    .promotions {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 32px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 16px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

/* Mobile Landscape and Small Phones */
@media screen and (max-width: 575px) {
    .container {
        padding: 0 12px;
    }
    
    /* Header */
    .logo-image {
        height: 30px;
        max-width: 110px;
    }
    
    .footer-logo-image {
        height: 24px;
        max-width: 90px;
    }
    
    /* Legacy text logo styles */
    .logo-text {
        font-size: 20px;
    }
    
    /* Hero Section */
    .hero-logo {
        height: 50px;
        max-width: 220px;
    }
    
    .hero-title {
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    /* Single Column for Games */
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-image {
        height: 140px;
        font-size: 2.5rem;
    }
    
    /* Smaller Cards */
    .feature-card,
    .category-card,
    .promo-card {
        padding: 24px 16px;
    }
    
    .feature-icon,
    .category-image {
        font-size: 2.5rem;
    }
    
    .category-emoji {
        font-size: 2.5rem;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-title,
    .category-title {
        font-size: 1.2rem;
    }
    
    .promo-title {
        font-size: 1.3rem;
    }
    
    /* Welcome Bonus */
    .welcome-bonus {
        padding: 20px 16px;
    }
    
    .bonus-icon {
        font-size: 1.5rem;
    }
    
    .bonus-title {
        font-size: 1rem;
    }
    
    .bonus-text {
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile Devices */
@media screen and (max-width: 375px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-logo {
        height: 40px;
        max-width: 200px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .feature-card,
    .category-card,
    .promo-card {
        padding: 20px 12px;
    }
    
    .feature-icon,
    .category-image {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .category-emoji {
        font-size: 2rem;
    }
    
    .game-image {
        height: 120px;
        font-size: 2rem;
    }
    
    .game-image .emoji-fallback {
        font-size: 2rem;
    }
    
    .game-image i {
        font-size: 2rem;
    }
    
    .mobile-nav {
        padding: 16px;
    }
    
    .mobile-auth {
        flex-direction: column;
    }
}

/* Information Section Responsive */
@media screen and (max-width: 991px) {
    .info-section {
        padding: 60px 0;
    }
    
    .info-content {
        padding: 0 20px;
    }
    
    .info-content h1 {
        font-size: 2rem;
    }
    
    .info-content h2 {
        font-size: 1.5rem;
    }
    
    .info-section-item {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .info-content table {
        font-size: 13px;
    }
    
    .info-content th,
    .info-content td {
        padding: 8px 12px;
    }
}

@media screen and (max-width: 767px) {
    .info-section {
        padding: 40px 0;
    }
    
    .info-content {
        padding: 0 16px;
    }
    
    .info-content h1 {
        font-size: 1.8rem;
    }
    
    .info-content h2 {
        font-size: 1.3rem;
    }
    
    .info-content h3 {
        font-size: 1.1rem;
    }
    
    .info-section-item {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .info-content table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .info-highlight {
        padding: 16px;
        margin: 16px 0;
    }
}

@media screen and (max-width: 575px) {
    .info-content h1 {
        font-size: 1.6rem;
    }
    
    .info-content h2 {
        font-size: 1.2rem;
    }
    
    .info-section-item {
        padding: 12px;
    }
    
    .info-content ul,
    .info-content ol {
        padding-left: 20px;
    }
}

/* Landscape Orientation for Small Devices */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 20px 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }
    
    .hero-buttons {
        margin-bottom: 24px;
        gap: 12px;
    }
    
    .welcome-bonus {
        padding: 16px 20px;
    }
    
    .features,
    .games-categories,
    .popular-games,
    .promotions {
        padding: 40px 0;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .nav-link {
        padding: 8px 0;
    }
    
    .mobile-nav-link {
        padding: 16px 0;
        font-size: 16px;
    }
    
    .filter-btn {
        min-height: 40px;
        padding: 10px 20px;
    }
    
    .social-link {
        width: 44px;
        height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .category-card:hover,
    .game-card:hover,
    .promo-card:hover {
        transform: none;
    }
    
    /* Ensure touch targets are accessible */
    .game-card {
        min-height: 44px;
    }
}

/* High Density Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-background::before {
        background-size: 400px 400px;
    }
}

/* Animation Keyframes for Mobile */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-nav,
    .hero-buttons,
    .games-filter,
    .btn {
        display: none;
    }
    
    .main {
        margin-top: 0;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
    
    .hero {
        min-height: auto;
        padding: 20px 0;
    }
}

/* Reduced Motion Preferences */
@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-background::before {
        animation: none;
    }
    
    .gradient-text {
        animation: none;
        background: #E91E63;
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #E91E63;
        border: 2px solid #FFFFFF;
    }
    
    .btn-secondary {
        background: #000000;
        border: 2px solid #FFFFFF;
        color: #FFFFFF;
    }
    
    .nav-link,
    .footer-link {
        border-bottom: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link.active {
        border-bottom-color: #E91E63;
    }
}