/* =====================================================
   RUNNER GAME — Las Casas  |  Mobile-first
===================================================== */

.rn-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #c62828, #ff7043);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(198,40,40,.4);
    touch-action: manipulation;
}
.rn-open-btn:active { transform: scale(.97); }

/* Modal */
.rn-modal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0,0,0,.9);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.rn-modal-inner {
    width: 100%;
    max-width: 420px;
    min-height: 100dvh;
    background: #1a0a00;
    display: flex;
    flex-direction: column;
}

/* Themes */
.rn-modal[data-theme="night"] .rn-header { background: #0d0d2b; }
.rn-modal[data-theme="day"]   .rn-header { background: #1565c0; }

/* Header */
.rn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #b71c1c;
    position: sticky;
    top: 0;
    z-index: 10;
}
.rn-logo { font-size: 16px; font-weight: 800; color: #fff; flex-shrink: 0; }
.rn-logo span { color: #ffccbc; font-size: 14px; }
.rn-header-stats { flex: 1; display: flex; justify-content: center; gap: 12px; }
.rn-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,.15);
    border-radius: 6px;
    padding: 3px 12px;
    min-width: 60px;
}
.rn-stat-lbl { font-size: 10px; color: #ffccbc; font-weight: 700; letter-spacing: .05em; }
.rn-stat-val { font-size: 15px; font-weight: 800; color: #fff; }
.rn-close {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.4);
    background: transparent;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    touch-action: manipulation;
}
.rn-close:active { background: rgba(255,255,255,.2); }

/* Ticker */
.rn-ticker {
    height: 36px;
    overflow: hidden;
    background: #120500;
    border-bottom: 1px solid #2a1200;
}
.rn-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: rn-scroll 30s linear infinite;
}
.rn-ticker-track:hover { animation-play-state: paused; }
@keyframes rn-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.rn-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    text-decoration: none;
    color: #8d6e63;
    font-size: 12px;
    height: 36px;
    border-right: 1px solid #2a1200;
    transition: color .2s;
}
.rn-ticker-item:hover { color: #ff7043; }
.rn-ticker-item img { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; }
.rn-ticker-name  { font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.rn-ticker-price { color: #ff7043; font-weight: 700; }

/* Game area */
.rn-game-area {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 200px;
    max-height: 260px;
    overflow: hidden;
}
.rn-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Overlays */
.rn-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(2px);
    z-index: 5;
}
.rn-overlay-content { text-align: center; padding: 16px; }
.rn-city-name { font-size: 13px; color: #ff7043; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.rn-overlay-title { font-size: 26px; font-weight: 900; color: #fff; margin-bottom: 4px; }
.rn-overlay-sub { font-size: 13px; color: #bcaaa4; margin-bottom: 12px; }
.rn-landmarks {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.rn-landmarks span {
    background: rgba(255,112,67,.15);
    border: 1px solid rgba(255,112,67,.3);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    color: #ff7043;
}
.rn-play-btn, .rn-retry-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #c62828, #ff7043);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    display: block;
    margin: 0 auto 8px;
}
.rn-play-btn:active, .rn-retry-btn:active { transform: scale(.97); }
.rn-hint { font-size: 11px; color: #8d6e63; }

.rn-over-icon  { font-size: 40px; margin-bottom: 6px; }
.rn-over-dist  { font-size: 22px; font-weight: 800; color: #ff7043; margin-bottom: 2px; }
.rn-over-best  { font-size: 13px; color: #8d6e63; margin-bottom: 12px; }

/* Jump button */
.rn-jump-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #c62828, #ff7043);
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    letter-spacing: .05em;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.rn-jump-btn:active { background: #b71c1c; transform: scale(.99); }

/* Ad block */
.rn-ad-block {
    border-top: 1px solid #2a1200;
    background: #120500;
    min-height: 64px;
    flex-shrink: 0;
}
.rn-ad-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; text-decoration: none; color: inherit;
}
.rn-ad-link:active { background: rgba(255,255,255,.03); }
.rn-ad-img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.rn-ad-body  { flex: 1; }
.rn-ad-badge { font-size: 10px; color: #5d4037; text-transform: uppercase; letter-spacing: .05em; }
.rn-ad-title { font-size: 13px; color: #d7ccc8; font-weight: 700; line-height: 1.3; }
.rn-ad-label { font-size: 12px; color: #ff7043; font-weight: 700; margin-top: 2px; }
.rn-ad-placeholder {
    padding: 18px 12px; text-align: center;
    font-size: 12px; color: #5d4037; font-style: italic;
}
