/* ============================================
   LOGISTICS MINIGAMES STYLES
   Shared scaffolding (.logistics-game) + per-game styles
   ============================================ */

.logistics-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px;
    max-width: 720px;
    margin: 0 auto;
    color: #EAF0F7;
    font-family: 'Poppins', sans-serif;
}

.logistics-game .log-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 560px;
    background: rgba(20, 34, 52, 0.85);
    border: 1px solid rgba(255, 176, 32, 0.45);
    border-radius: 12px;
    padding: 10px 18px;
}

.logistics-game .log-timer {
    font-weight: 700;
    font-size: 1.05rem;
}

.logistics-game .log-timer .timer-warning {
    color: #FF5252;
    animation: log-pulse 0.6s infinite alternate;
}

@keyframes log-pulse {
    from { opacity: 1; }
    to { opacity: 0.45; }
}

.logistics-game .log-progress {
    font-weight: 600;
    color: #FFB020;
}

.logistics-game .log-instruction {
    text-align: center;
    font-size: 1rem;
    max-width: 560px;
    margin: 0;
    line-height: 1.5;
}

.logistics-game .log-instruction em {
    display: block;
    margin-top: 6px;
    color: #A9BDD4;
    font-size: 0.88rem;
}

.logistics-game .log-feedback {
    min-height: 28px;
    font-weight: 700;
    font-size: 0.98rem;
    text-align: center;
    max-width: 560px;
}

.logistics-game .log-feedback.success { color: #39D98A; }
.logistics-game .log-feedback.error { color: #FF7A7A; }

/* Readout tiles */
.logistics-game .log-readouts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 560px;
}

.logistics-game .log-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 120px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 176, 32, 0.22);
    border-radius: 10px;
    padding: 8px 12px;
}

.logistics-game .log-k {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94A3B8;
}

.logistics-game .log-v {
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.logistics-game .log-good { color: #39D98A; }
.logistics-game .log-warn { color: #FFB020; }
.logistics-game .log-bad { color: #FF7A7A; }

/* Progress bar */
.logistics-game .log-bar {
    width: 100%;
    max-width: 560px;
    height: 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 176, 32, 0.25);
    border-radius: 99px;
    overflow: hidden;
}

.logistics-game .log-bar > i {
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.1s linear;
    background: #FFB020;
}

.logistics-game .log-fill-good { background: #39D98A !important; }
.logistics-game .log-fill-bad { background: #FF7A7A !important; }

/* Buttons */
.logistics-game .log-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.logistics-game .log-btn {
    background: transparent;
    color: #A9BDD4;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 9px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.logistics-game .log-btn:hover { color: #EAF0F7; border-color: #FFB020; }

.logistics-game .log-btn-primary {
    background: linear-gradient(135deg, #FFB020, #E08700);
    color: #2A1A00;
    border: 0;
    font-weight: 700;
}

/* ---- Parcel Sort ---- */
.parcel-sort-game .log-belt {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 92px;
    background: repeating-linear-gradient(90deg,
        rgba(30, 41, 59, 0.9) 0 22px,
        rgba(51, 65, 85, 0.9) 22px 26px);
    border: 1px solid rgba(255, 176, 32, 0.25);
    border-radius: 10px;
    overflow: hidden;
}

.parcel-sort-game .log-parcel {
    position: absolute;
    top: 20px;
    width: 84px;
    height: 52px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #0B1520;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.parcel-sort-game .log-chutes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 560px;
}

.parcel-sort-game .log-chute {
    padding: 16px 6px;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #0B1520;
    cursor: pointer;
}

.parcel-sort-game .log-chute:hover { filter: brightness(1.12); }
.parcel-sort-game .log-chute:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Route Planner ---- */
.route-planner-game .log-map {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 176, 32, 0.22);
    border-radius: 10px;
}

.route-planner-game .log-map svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.route-planner-game .log-node {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.5);
    background: rgba(51, 65, 85, 0.95);
    color: #EAF0F7;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}

.route-planner-game .log-node:hover { border-color: #FFB020; }

.route-planner-game .log-node[data-state=planned] {
    background: #FFB020;
    color: #2A1A00;
    border-color: #FFB020;
}

.route-planner-game .log-depot {
    background: #4CC2FF;
    color: #04121D;
    border-color: #4CC2FF;
    font-size: 0.6rem;
    font-weight: 800;
    cursor: default;
}
