/* ===================================
   Responsive Styles
   The Ice Cream Adventure - Mobile & Tablet
   =================================== */

/* Mobile First - Base styles in main.css are mobile-friendly */

/* Small Mobile Devices (up to 480px) */
@media screen and (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .game-container {
        padding: 10px;
    }

    .game-header {
        padding: 15px;
    }

    .game-title {
        font-size: 1.5em;
    }

    .start-title {
        font-size: 2em;
    }

    .start-card {
        padding: 30px 20px;
    }

    .start-description {
        font-size: 1em;
    }

    .encounter-card {
        padding: 20px;
    }

    .encounter-title {
        font-size: 1.4em;
    }

    .encounter-description {
        font-size: 1em;
    }

    .choice-btn {
        padding: 15px 20px;
        font-size: 1em;
        min-height: 55px;
    }

    .outcome-card {
        padding: 25px;
    }

    .outcome-text {
        font-size: 1em;
    }

    .status-item {
        font-size: 0.9em;
    }

    .party-status {
        padding: 12px;
    }
}

/* Tablet Devices (481px to 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .game-container {
        padding: 15px;
    }

    .game-title {
        font-size: 1.8em;
    }

    .encounter-card {
        padding: 25px;
    }

    .choice-btn {
        font-size: 1.05em;
    }
}

/* Desktop Devices (769px and up) */
@media screen and (min-width: 769px) {
    /* Show keyboard hints on desktop */
    .choice-btn::after {
        content: ' [' attr(data-key) ']';
        opacity: 0.5;
        font-size: 0.85em;
        margin-left: auto;
        padding-left: 15px;
    }

    .choice-btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Larger hit areas aren't as critical on desktop */
    .choice-btn {
        min-height: 50px;
    }

    /* More comfortable spacing */
    .encounter-card {
        padding: 35px;
    }
}

/* Touch-Specific Enhancements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .choice-btn {
        min-height: 60px;
        padding: 20px 25px;
    }

    .start-btn {
        min-height: 70px;
        padding: 25px 55px;
    }

    .outcome-continue-btn {
        min-height: 60px;
        padding: 20px 50px;
    }

    /* Remove hover effects on touch devices */
    .choice-btn:hover {
        transform: none;
    }

    /* Use active state instead */
    .choice-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .start-btn:active {
        transform: scale(0.95);
    }

    /* Prevent text selection on touch */
    .choice-btn,
    .start-btn,
    .outcome-continue-btn {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Landscape Mobile (height constraint) */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .game-header {
        padding: 10px;
        margin-bottom: 15px;
    }

    .game-title {
        font-size: 1.3em;
        margin-bottom: 10px;
    }

    .progress-container {
        margin-top: 10px;
    }

    .party-status {
        padding: 10px;
        margin-bottom: 15px;
    }

    .encounter-card {
        padding: 20px;
        min-height: 150px;
    }

    .encounter-title {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    .choices-container {
        gap: 10px;
        margin-bottom: 15px;
    }

    .choice-btn {
        padding: 12px 20px;
        min-height: 45px;
    }

    .start-card {
        max-height: 90vh;
        overflow-y: auto;
        padding: 25px;
    }

    .outcome-card {
        max-height: 90vh;
        overflow-y: auto;
        padding: 25px;
    }
}

/* High Resolution Displays */
@media screen and (min-width: 1200px) {
    .game-container {
        max-width: 900px;
    }

    .encounter-description {
        font-size: 1.15em;
        line-height: 2;
    }

    .choice-btn {
        font-size: 1.1em;
    }
}

/* Print Styles (for accessibility) */
@media print {
    .choice-btn,
    .start-btn,
    .outcome-continue-btn,
    .game-header,
    .party-status {
        display: none;
    }

    .encounter-card {
        box-shadow: none;
        border: 1px solid #000;
    }

    body {
        background-color: #fff;
    }
}

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

    .choice-btn:hover,
    .start-btn:hover,
    .outcome-continue-btn:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .encounter-card,
    .party-status,
    .choice-btn {
        border-width: 3px;
    }

    .choice-btn {
        font-weight: bold;
    }

    .status-label {
        text-decoration: underline;
    }
}

/* Dark Mode Support (respecting system preference) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }

    .encounter-card {
        background-color: #2a2a2a;
        color: #f0f0f0;
        border-color: #4a90a4;
    }

    .encounter-title {
        color: #ffb88c;
    }

    .party-status {
        background-color: #2a2a2a;
        border-color: #ffb6c1;
    }

    .outcome-card,
    .start-card {
        background-color: #2a2a2a;
        color: #f0f0f0;
    }

    .start-title,
    .finale-title {
        color: #ffb88c;
    }

    .finale-message,
    .outcome-text,
    .start-description {
        color: #f0f0f0;
    }
}
