/* --- BỐ CỤC ĐƯỜNG SẮT BẮC NAM --- */
.railway-arena {
    height: 180px;
    background: linear-gradient(180deg, #bbdefb 0%, #64b5f6 40%, #81c784 40%, #388e3c 100%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    border: 4px solid #1a237e; /* Viền xanh đậm */
    border-radius: 12px;
}

/* Đồi núi lướt qua */
.hills-bg {
    position: absolute;
    bottom: 60%;
    left: 100%;
    width: 200%;
    font-size: 3rem;
    white-space: nowrap;
    animation: move-hills 10s linear infinite;
    z-index: 1;
    opacity: 0.8;
}
.hills-bg::before { content: '⛰️   🌲    ⛰️       🌲🌲    ⛰️'; }
@keyframes move-hills {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Đường ray */
.tracks {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 100%;
    height: 10px;
    background: repeating-linear-gradient(90deg, #5d4037, #5d4037 10px, #a1887f 10px, #a1887f 20px);
    z-index: 2;
    box-shadow: 0 5px 5px rgba(0,0,0,0.5);
}

/* Tàu hỏa */
.train-item {
    position: absolute;
    left: 30%;
    bottom: 20%;
    font-size: 4rem;
    z-index: 4;
    filter: drop-shadow(-3px 5px 5px rgba(0,0,0,0.4));
}
.idle {
    animation: train-idle 1s ease-in-out infinite alternate;
}
@keyframes train-idle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

/* Tàu tăng tốc tiến lên */
.speed-up {
    animation: train-dash 0.8s ease-in-out forwards;
}
@keyframes train-dash {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(30px) scale(1.1); }
    100% { transform: translateX(0) scale(1); }
}

/* Tàu phanh gấp rung lắc */
.shake-error { animation: train-brake 0.4s; }
@keyframes train-brake {
    0% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(15px) rotate(5deg); }
    50% { transform: translateX(-10px) rotate(-5deg); }
    75% { transform: translateX(10px) rotate(5deg); }
    100% { transform: translateX(0) rotate(0); }
}

/* Khói tàu */
.train-smoke {
    position: absolute;
    left: 28%;
    bottom: 60%;
    font-size: 2rem;
    z-index: 3;
    opacity: 0;
}
.puff-smoke {
    animation: smoke-up 1s ease-out forwards;
}
@keyframes smoke-up {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0.8; }
    100% { transform: translate(-40px, -40px) scale(2); opacity: 0; }
}

.min-h-75 { min-height: 90px; }
.hl-num { color: #d32f2f; font-weight: 900; font-size: 1.2em; }