/* Responsive Styles */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .comparison-container {
        gap: 1.5rem;
    }

    .card-image-container {
        height: 350px;
    }

    .card-name {
        font-size: 1.75rem;
    }

    .volume-number {
        font-size: 2rem;
    }

    .vs-divider {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    /* Header */
    .header-container {
        padding: 0 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .nav {
        gap: 0.5rem;
    }

    .nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Category Selection */
    .category-selection h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-card {
        padding: 2rem;
    }

    .category-icon {
        font-size: 3rem;
    }

    .category-name {
        font-size: 1.25rem;
    }

    /* Game Container */
    .comparison-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.5rem;
    }

    .card-left {
        grid-row: 1;
    }

    .vs-divider {
        grid-row: 2;
        margin: 0 auto;
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .card-right {
        grid-row: 3;
    }

    .card-image-container {
        height: 300px;
    }

    .card-info {
        padding: 1.5rem;
    }

    .card-name {
        font-size: 1.5rem;
    }

    .volume-number {
        font-size: 1.75rem;
    }

    .answer-buttons {
        grid-template-columns: 1fr;
    }

    .answer-btn {
        padding: 1.25rem 1rem;
    }

    .btn-icon {
        font-size: 1.5rem;
    }

    .btn-text {
        font-size: 1rem;
    }

    /* Score Display */
    .score-display {
        padding: 1rem 1.5rem;
    }

    .score-label {
        font-size: 1rem;
    }

    .score-value {
        font-size: 2rem;
    }

    /* Modals */
    .modal-content {
        padding: 2rem 1.5rem;
        max-width: 100%;
        margin: 1rem;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .modal-large {
        max-width: 100%;
    }

    /* Final Score */
    .final-score .score-number {
        font-size: 3rem;
    }

    /* OAuth Buttons */
    .oauth-buttons {
        grid-template-columns: 1fr;
    }

    /* Share Buttons */
    .share-buttons {
        grid-template-columns: 1fr;
    }

    /* Leaderboard */
    .leaderboard-tabs {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .leaderboard-table {
        font-size: 0.9rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.75rem 0.5rem;
    }

    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        padding-left: 0.75rem;
    }

    .leaderboard-table th:last-child,
    .leaderboard-table td:last-child {
        padding-right: 0.75rem;
    }

    .rank-cell {
        font-size: 1.25rem;
        width: 50px;
    }

    .player-avatar {
        width: 40px;
        height: 40px;
    }

    .player-cell {
        gap: 0.75rem;
    }

    .player-name {
        font-size: 0.9rem;
    }

    .player-username {
        font-size: 0.75rem;
    }

    .score-cell {
        font-size: 1.25rem;
    }

    .date-cell {
        font-size: 0.8rem;
    }

    /* Hide date column on small screens */
    .leaderboard-table th:last-child,
    .leaderboard-table td:last-child {
        display: none;
    }

    .leaderboard-stats {
        grid-template-columns: 1fr;
    }

    /* Instructions */
    .instruction-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.25rem;
    }

    .nav-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .category-selection h2 {
        font-size: 1.5rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    .category-name {
        font-size: 1.1rem;
    }

    .category-description {
        font-size: 0.85rem;
    }

    .card-image-container {
        height: 250px;
    }

    .card-name {
        font-size: 1.25rem;
    }

    .final-score .score-number {
        font-size: 2.5rem;
    }

    .modal-content {
        padding: 1.5rem 1rem;
    }

    .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Large Screens (> 1440px) */
@media (min-width: 1440px) {
    .category-selection h2 {
        font-size: 3rem;
    }

    .category-card {
        padding: 3rem;
    }

    .category-icon {
        font-size: 5rem;
    }

    .category-name {
        font-size: 1.75rem;
    }

    .card-image-container {
        height: 450px;
    }

    .card-name {
        font-size: 2.25rem;
    }

    .card-info {
        padding: 2.5rem;
    }

    .volume-number {
        font-size: 3rem;
    }
}

/* TV/Large Screens (> 1920px) */
@media (min-width: 1920px) {
    .comparison-container {
        gap: 3rem;
    }

    .card-image-container {
        height: 500px;
    }

    .card-name {
        font-size: 2.5rem;
    }

    .card-info {
        padding: 3rem;
    }

    .volume-number {
        font-size: 3.5rem;
    }

    .vs-divider {
        width: 120px;
        height: 120px;
        font-size: 3.5rem;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .card-image-container {
        height: 250px;
    }

    .modal-content {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav,
    .answer-buttons,
    .modal,
    .btn-primary,
    .share-buttons {
        display: none !important;
    }

    body {
        background: white;
    }

    .comparison-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #000080;
        --success-color: #008000;
        --danger-color: #ff0000;
        --text-dark: #000000;
        --text-light: #4a4a4a;
        --border-color: #000000;
    }

    .comparison-card {
        border: 2px solid #000;
    }

    .btn-primary,
    .answer-btn {
        border: 2px solid #000;
    }
}

/* Dark Mode (optional for future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
}
