/* css/responsive.css */

/* Media queries for mobile devices */
@media (max-width: 768px) {
    .global-navbar {
        flex-direction: column;
        align-items: center;
        padding: 10px 15px;
        gap: 8px;
    }

    .game-title {
        font-size: 1.2rem;
        text-align: center;
    }

    .nav-right-elements {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .nav-player-stats {
        flex-direction: row;
        gap: 5px;
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .player-profile-info {
        padding-right: 8px;
        gap: 6px;
    }

    .nav-avatar {
        width: 24px;
        height: 24px;
    }

    .stat-group {
        padding: 0 8px;
    }

    .stat-icon {
        font-size: 1rem;
    }

    #app {
        margin: 5px;
        padding: 0;
    }

    /* --- UI Elements --- */
    .hub-container {
        margin-top: 10px;
        padding: 10px;
    }

    .mission-carousel {
        max-width: 100%;
    }

    .mission-carousel-inner {
        min-height: auto;
    }

    .level-card {
        padding: 15px;
        min-height: auto;
        position: relative;
    }

    .level-card h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .mission-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mission-item {
        padding: 12px 15px;
        gap: 12px;
    }

    .mission-icon {
        font-size: 1.4rem;
        min-width: 30px;
    }

    .mission-item h3 {
        font-size: 0.85rem;
        line-height: 1.2;
        max-height: 2.4em;
        /* Approx 2 lines */
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }

    .star-rating.mini-stars {
        font-size: 0.8rem;
    }

    .mission-status-text {
        font-size: 0.65rem;
        padding: 2px 4px;
        white-space: nowrap;
        /* Avoid wrapping the status itself */
        flex-shrink: 0;
        /* Don't let the status label shrink */
    }

    .carousel-control {
        width: 45px;
        height: 45px;
        top: auto;
        bottom: -60px;
        transform: none;
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(255, 215, 0, 0.5);
    }

    .carousel-control svg {
        width: 24px;
        height: 24px;
    }

    .carousel-control.prev-control {
        left: 20%;
    }

    .carousel-control.next-control {
        right: 20%;
    }

    .carousel-control:hover:not(:disabled) {
        transform: scale(1.1);
    }

    .carousel-control.hidden {
        transform: scale(0.8);
    }

    .hub-container {
        margin-bottom: 80px;
        /* Space for controls at bottom on mobile */
    }

    /* --- Battle Scene --- */
    .battle-scene {
        flex-direction: row;
        gap: 8px;
        /* Slightly tighter gap to gain space */
        align-items: stretch;
    }

    .combatant {
        padding: 10px 5px;
        /* Minimal side padding */
        flex: 1 1 0;
        /* Force equal basis and growth */
        min-width: 0;
        /* Critical for ellipsis to work in flex item */
        margin-bottom: 0;
    }

    .combatant-name {
        font-size: 0.95rem;
        /* Smaller names */
        margin-bottom: 8px;
        width: 100%;
        text-align: center;
        /* Ellipsis is inherited but we reinforce */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .combatant-avatar {
        width: 100%;
        max-width: 100px;
        /* Scaled down for mobile */
        height: 100px;
        margin-bottom: 10px;
    }

    .health-bar {
        height: 15px;
    }

    .health-value {
        font-size: 0.8rem;
    }

    .problem {
        font-size: 1.2rem;
        /* Reduced from 1.8rem for better fit */
        line-height: 1.4;
        margin-bottom: 20px;
        font-weight: 500;
        /* Slightly lighter for elegance */
        text-transform: none;
        /* Avoid all-caps if it was being used */
    }

    .minigame-area {
        padding: 20px 15px;
    }

    .battle-navbar {
        flex-direction: column;
        gap: 10px;
    }
}