/* Responsive Design */

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    h1 { font-size: 4rem; }
    h2 { font-size: 3rem; }
}

/* Desktop (1200px to 1399px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .login-content,
    .register-content {
        gap: 3rem;
    }
}

/* Tablet (992px to 1199px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-color);
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-heavy);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .auth-buttons {
        margin-top: 1rem;
        justify-content: center;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    /* Sections */
    .login-content,
    .register-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .register-content {
        grid-template-columns: 1fr;
    }
    
    .register-image {
        order: -1;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* Games */
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .game-card img {
        min-height: 140px;
    }
    
    .game-card-play-btn {
        width: 45px;
        height: 45px;
    }
    
    .game-card-play-btn::before {
        font-size: 0.9rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* CTA */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Mobile Large (768px to 991px) */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* Hero Section */
    .hero-section {
        min-height: 80vh;
        padding: 2rem 0;
        padding-top: 100px;
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    /* Login/Register */
    .login-section,
    .register-section {
        padding: 3rem 0;
    }
    
    .login-description,
    .register-description {
        font-size: 1rem;
    }
    
    /* Games */
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .game-card img {
        min-height: 120px;
    }
    
    .game-card-play-btn {
        width: 45px;
        height: 45px;
    }
    
    .game-card-play-btn::before {
        font-size: 0.9rem;
    }
    
    /* Benefits */
    .benefit-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Mobile Small (576px and below) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }
    
    /* Hero Section */
    .hero-section {
        padding-top: 90px;
    }
    
    .hero-content {
        padding: 1.5rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-logo img {
        height: 40px;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.8rem;
    }
    
    /* Features */
    .feature-card {
        padding: 1rem;
    }
    
    .feature-icon img {
        width: 50px;
        height: 50px;
    }
    
    /* Login/Register */
    .login-section,
    .register-section {
        padding: 2rem 0;
    }
    
    /* Games */
    .game-card img {
        min-height: 120px;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-card::before {
        font-size: 3rem;
        top: -5px;
        left: 15px;
    }
    
    /* Stats */
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1.2rem;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Extra Small Mobile (400px and below) */
@media (max-width: 400px) {
    .container {
        padding: 0 8px;
    }
    
    /* Typography */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    
    /* Hero Section */
    .hero-title {
        font-size: 1.8rem;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 8px;
    }
    
    .nav-logo img {
        height: 35px;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.6rem;
    }
    
    /* Features */
    .feature-card {
        padding: 0.8rem;
    }
    
    /* Games */
    .game-card img {
        min-height: 100px;
    }
    
    .game-card-play-btn {
        width: 35px;
        height: 35px;
    }
    
    .game-card-play-btn::before {
        font-size: 0.7rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1rem;
    }
    
    /* Stats */
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 10px;
    }
    
    .btn-large {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .back-to-top,
    .hero-buttons,
    .cta-buttons,
    .auth-buttons {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-background,
    .hero-overlay {
        display: none;
    }
    
    .hero-content {
        color: var(--text-dark);
    }
    
    .section-title {
        color: var(--text-dark);
    }
    
    .stats-section {
        background: var(--text-light);
        color: var(--text-dark);
    }
    
    .stats-section .section-title {
        color: var(--text-dark);
    }
    
    .cta-section {
        background: var(--text-light);
        color: var(--text-dark);
    }
    
    .cta-title {
        color: var(--text-dark);
    }
    
    .footer {
        background: var(--text-light);
        color: var(--text-dark);
    }
    
    .footer-section h3,
    .footer-section h4 {
        color: var(--text-dark);
    }
    
    .footer-section a {
        color: var(--text-dark);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-logo img,
    .feature-icon img,
    .game-card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #ffffff;
        --text-light: #1a1a1a;
        --bg-light: #2a2a2a;
        --border-color: #404040;
        --highlight-color: #1a1a1a;
    }
    
    .feature-card,
    .game-card,
    .testimonial-card,
    .benefit-item {
        background: #333333;
        border-color: #555555;
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(27, 31, 59, 0.9), rgba(0, 194, 168, 0.4));
    }
}

/* Page-specific Responsive Styles */

/* Contact Page Responsive */
@media (max-width: 991px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-options {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-options .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 767px) {
    .page-header {
        padding: 100px 0 60px;
        margin-top: 70px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .content-wrapper h2 {
        font-size: 1.8rem;
    }
    
    .content-wrapper h3 {
        font-size: 1.3rem;
    }
    
    .contact-method {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .value-item {
        padding: 1.5rem;
    }
    
    .faq-categories {
        padding: 1.5rem;
    }
    
    .category-links {
        flex-direction: column;
        align-items: center;
    }
    
    .category-link {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-answer.open {
        padding: 0 1rem 1rem;
    }
    
    .error-animation {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .error-number {
        font-size: 5rem;
    }
    
    .error-icon {
        font-size: 4rem;
    }
    
    .error-text {
        padding: 2rem 1.5rem;
    }
    
    .error-title {
        font-size: 2rem;
    }
    
    .error-stats {
        gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .error-actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .helpful-link {
        padding: 1rem;
    }
    
    .faq-contact {
        padding: 2rem;
    }
    
    .faq-links {
        flex-direction: column;
        align-items: center;
    }
    
    .faq-link {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .content-wrapper h2 {
        font-size: 1.6rem;
    }
    
    .content-wrapper h3 {
        font-size: 1.2rem;
    }
    
    .contact-method {
        padding: 0.8rem;
    }
    
    .contact-form {
        padding: 0.8rem;
    }
    
    .value-item {
        padding: 1rem;
    }
    
    .faq-categories {
        padding: 1rem;
    }
    
    .faq-question {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .faq-answer.open {
        padding: 0 0.8rem 0.8rem;
    }
    
    .error-number {
        font-size: 4rem;
    }
    
    .error-icon {
        font-size: 3rem;
    }
    
    .error-text {
        padding: 1.5rem 1rem;
    }
    
    .error-title {
        font-size: 1.8rem;
    }
    
    .error-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .helpful-link {
        padding: 0.8rem;
    }
    
    .helpful-link img {
        width: 30px;
        height: 30px;
    }
    
    .faq-contact {
        padding: 1.5rem;
    }
}

@media (max-width: 400px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .content-wrapper h2 {
        font-size: 1.4rem;
    }
    
    .content-wrapper h3 {
        font-size: 1.1rem;
    }
    
    .contact-method {
        padding: 0.6rem;
    }
    
    .contact-form {
        padding: 0.6rem;
    }
    
    .value-item {
        padding: 0.8rem;
    }
    
    .faq-categories {
        padding: 0.8rem;
    }
    
    .faq-question {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .faq-answer.open {
        padding: 0 0.6rem 0.6rem;
    }
    
    .error-code {
        font-size: 2.5rem;
    }
    
    .error-title {
        font-size: 1.6rem;
    }
    
    .helpful-link {
        padding: 0.6rem;
    }
    
    .helpful-link img {
        width: 25px;
        height: 25px;
    }
    
    .faq-contact {
        padding: 1rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .feature-card:hover,
    .game-card:hover,
    .btn:hover,
    .back-to-top:hover {
        transform: none;
    }
    
    .btn::before {
        display: none;
    }
}
