/**
 * Szymapixel.pl - Responsive Styles
 * 
 * Mobile-first approach with breakpoints
 */

/* ============================================
   MOBILE-FIRST BASE STYLES
   ============================================ */

/* Default styles are for mobile devices (< 768px) */

body {
    font-size: 16px; /* Base size, no zooming */
}

/* ============================================
   BREAKPOINTS
   ============================================ */

/* Small devices (landscape phones): 576px */
@media (min-width: 576px) {
    .container {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }

    .server-name {
        font-size: var(--text-2xl);
    }
}

/* Medium devices (portraits tablets): 768px */
@media (min-width: 768px) {
    :root {
        --space-4: 1rem;
        --space-5: 1.25rem;
        --space-6: 1.5rem;
        --space-8: 2rem;
        --space-10: 2.5rem;
        --space-12: 3rem;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: flex !important;
    }

    .nav-menu ul,
    .header-actions {
        display: flex !important;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-stats {
        flex-wrap: nowrap;
    }

    .stat-item {
        min-width: 120px;
    }
}

/* Large devices (desktops): 1024px */
@media (min-width: 1024px) {
    :root {
        --space-6: 1.75rem;
        --space-8: 2.25rem;
        --space-10: 3rem;
        --space-12: 3.75rem;
    }

    .container {
        max-width: var(--container-xl);
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .rank-card {
        min-height: 280px;
    }
}

/* Extra large devices (large desktops): 1280px */
@media (min-width: 1280px) {
    :root {
        --space-6: 2rem;
        --space-8: 2.5rem;
        --space-10: 3.5rem;
        --space-12: 4rem;
    }

    .features-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================================
   MOBILE-SPECIFIC OPTIMIZATIONS
   ============================================ */

@media (max-width: 767px) {
    /* Mobile spacing */
    :root {
        --space-3: 0.5rem;
        --space-4: 0.75rem;
        --space-5: 1rem;
        --space-6: 1.25rem;
        --space-8: 1.5rem;
        --space-10: 2rem;
        --space-12: 2.5rem;
    }

    /* Show mobile elements, hide desktop */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Container */
    .container {
        padding-left: var(--space-2);
        padding-right: var(--space-2);
    }

    /* Hero */
    .hero-title {
        font-size: var(--text-3xl);
    }

    .hero-tagline {
        font-size: var(--text-base);
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-3);
    }

    .stat-item {
        width: 100%;
        justify-content: center;
    }

    /* Touch targets */
    input,
    select,
    button {
        min-height: 48px;
    }

    /* Mobile nav */
    .mobile-nav-list a {
        padding: var(--space-3);
        font-size: var(--text-base);
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }

    .footer-nav ul {
        justify-content: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .play-button {
        padding: var(--space-3) var(--space-4);
    }
}

/* ============================================
   TABLET LANDSCAPE (768px - 1024px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .rank-card {
        min-height: 240px;
    }
}

/* ============================================
   LARGE DESKTOP (1280px+)
   ============================================ */

@media (min-width: 1280px) {
    .container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }

    .features-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    /* Hide non-essential elements */
    .header-wrapper,
    .mobile-menu-toggle,
    .hero-badge,
    .floating-shape,
    #toast,
    #loading-overlay {
        display: none !important;
    }

    /* Ensure text is readable */
    body {
        background: white;
        color: black;
    }

    /* Remove shadows and gradients */
    *,
    *::before,
    *::after {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Break pages before/after sections */
    section {
        page-break-inside: avoid;
    }
}

/* ============================================
   HIGH CONTRAST MODE SUPPORT
   ============================================ */

@media (prefers-contrast: high) {
    :root {
        --border-default: rgba(255, 255, 255, 0.3);
        --text-secondary: white;
    }

    .btn,
    input,
    select {
        border-width: 2px;
    }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */

@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;
    }

    .floating-shape,
    .rank-card:hover {
        transform: none !important;
    }
}

/* ============================================
   DARK LIGHT MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f7fa;
        --bg-secondary: #ffffff;
        --text-primary: #1a202c;
        --text-secondary: rgba(0, 0, 0, 0.6);
        --border-default: rgba(0, 0, 0, 0.1);
    }

    .glass {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
    }
}
