/* ══════════════════════════════════════════════════════════
   Water Flow — Aqua Rush (Time Attack) Stylesheet
   ══════════════════════════════════════════════════════════ */

.rush-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    background: #07192C url('../assets/images/innerpage.png') no-repeat center top / cover;
}

/* Background Video (innervideo.mp4) */
.rush-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    pointer-events: none;
    z-index: 0;
}

/* Subtle ambient underwater light rays effect */
.rush-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 15%, rgba(56, 189, 248, 0.15) 0%, rgba(7, 25, 44, 0.3) 55%, rgba(4, 14, 26, 0.65) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.rush__top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(11, 27, 43, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 180, 216, 0.15);
    z-index: 10;
}

.rush__back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.rush__back-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.12);
}

.rush__back-btn svg {
    width: 20px;
    height: 20px;
}

.rush__title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rush__title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FFA07A 50%, #FFD93D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.rush__solved-pill {
    font-size: 11px;
    font-weight: 700;
    color: #94A3B8;
}

.rush__solved-pill strong {
    color: #48CAE4;
}

/* ── Rush HUD & Timer Bar ───────────────────────────────── */
.rush__hud {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    gap: 8px;
    z-index: 10;
}

.rush__metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rush__timer-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(0, 180, 216, 0.3);
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 800;
    color: #ADE8F4;
    transition: all 0.2s ease;
}

.rush__timer-badge.urgent {
    border-color: #EF4444;
    color: #EF4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
    animation: urgentPulse 0.5s infinite alternate;
}

@keyframes urgentPulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.rush__score-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rush__score-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
}

.rush__score-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* ── Timer Bar ──────────────────────────────────────────── */
.rush__timer-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.rush__timer-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00B4D8 0%, #48CAE4 100%);
    border-radius: 4px;
    transition: width 0.1s linear, background 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}

.rush__timer-bar-fill.urgent {
    background: linear-gradient(90deg, #DC2626 0%, #EF4444 100%);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}

/* ── Combo Multiplier Banner ────────────────────────────── */
.rush__combo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
}

.rush__combo-chip {
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
    animation: comboPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rush__combo-chip.frenzy {
    background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
    box-shadow: 0 0 16px rgba(236, 72, 153, 0.6);
    animation: frenzyGlow 0.6s infinite alternate;
}

@keyframes comboPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes frenzyGlow {
    from { transform: scale(1); filter: drop-shadow(0 0 4px #EC4899); }
    to { transform: scale(1.08); filter: drop-shadow(0 0 12px #8B5CF6); }
}

/* ── Canvas Container ───────────────────────────────────── */
.rush__canvas-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    z-index: 5;
}

.rush__canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* ── Time Extension Popup Floating Indicator ────────────── */
.rush__time-float {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 900;
    color: #10B981;
    text-shadow: 0 0 16px rgba(16, 185, 129, 0.8);
    pointer-events: none;
    animation: timeFloatUp 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    z-index: 20;
}

@keyframes timeFloatUp {
    0% { transform: translate(-50%, -20%) scale(0.6); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -90%) scale(1); opacity: 0; }
}

/* ── Rush Game Over Modal ───────────────────────────────── */
.rush-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 14, 24, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.rush-over-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.rush-over-card {
    background: linear-gradient(160deg, #132D48 0%, #0B1B2B 100%);
    border: 1px solid rgba(0, 180, 216, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 180, 216, 0.15);
    border-radius: 24px;
    width: 90%;
    max-width: 380px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rush-over-modal.active .rush-over-card {
    transform: scale(1);
}

.rush-over__badge {
    font-size: 13px;
    font-weight: 800;
    color: #EF4444;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.rush-over__title {
    font-size: 26px;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.rush-over__score-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    padding: 16px 24px;
    width: 100%;
    margin-bottom: 18px;
    box-sizing: border-box;
}

.rush-over__score-label {
    font-size: 12px;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
}

.rush-over__score-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 38px;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
    margin: 4px 0;
}

.rush-over__record-tag {
    font-size: 11px;
    font-weight: 800;
    color: #10B981;
    background: rgba(16, 185, 129, 0.15);
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-block;
}

.rush-over__stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 22px;
}

.rush-over__stat-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.rush-over__stat-lbl {
    font-size: 10px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
}

.rush-over__stat-val {
    font-size: 18px;
    font-weight: 800;
    color: #ADE8F4;
}

.rush-over__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.rush-over__btn-play {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #00B4D8 0%, #0077B6 100%);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 180, 216, 0.4);
    transition: all 0.18s ease;
}

.rush-over__btn-play:active {
    transform: scale(0.97);
}

.rush-over__btn-home {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #94A3B8;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.rush-over__btn-home:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.1);
}

/* ══════════════════════════════════════════════════════════
   ⏱️ RUSH REVIVE / TIME OUT MODAL STYLES
   ══════════════════════════════════════════════════════════ */
.rush-revive-modal {
    position: absolute;
    inset: 0;
    background: rgba(4, 11, 22, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.rush-revive-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.rush-revive-card {
    background: #081726;
    border: 1.8px solid #FFD700;
    border-top-color: #FFE680;
    border-bottom: 4px solid #6B4E00;
    border-radius: 24px;
    padding: 22px 18px;
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.35);
    animation: rushPopIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes rushPopIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.rush-revive__badge {
    background: #EF4444;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
    border: 1px solid #FCA5A5;
    animation: urgentPulse 1.2s infinite;
}

.rush-revive__title {
    font-size: 20px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-align: center;
}

.rush-revive__sub {
    font-size: 11px;
    color: #94A3B8;
    text-align: center;
    margin-bottom: 14px;
    line-height: 15px;
}

.rush-revive__status-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 180, 216, 0.25);
    border-radius: 14px;
    padding: 10px 6px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.rush-revive__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.rush-revive__stat-lbl {
    font-size: 8.5px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.rush-revive__stat-val {
    font-size: 14px;
    font-weight: 900;
    color: #FFD700;
}

.rush-revive__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* 1. Watch Ads Button */
.rush-revive__btn-ad {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1.5px solid #00F0FF;
    border-bottom: 3.5px solid #005F8A;
    background: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
    color: #FFFFFF;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.35);
    transition: all 0.15s ease;
}

.rush-revive__btn-ad:active {
    transform: translateY(2px);
    border-bottom-width: 1.5px;
}

.rush-revive__btn-icon {
    font-size: 22px;
}

.rush-revive__btn-textwrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.rush-revive__btn-main {
    font-size: 13px;
    font-weight: 900;
    color: #FFFFFF;
}

.rush-revive__btn-sub {
    font-size: 10px;
    font-weight: 700;
    color: #ADE8F4;
    margin-top: 1px;
}

/* 2. Coins Button */
.rush-revive__btn-coin {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1.5px solid #FFEAA7;
    border-bottom: 3.5px solid #855800;
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
    color: #000000;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.3);
    transition: all 0.15s ease;
}

.rush-revive__btn-coin:active {
    transform: translateY(2px);
    border-bottom-width: 1.5px;
}

.rush-revive__btn-coin .rush-revive__btn-main {
    color: #000000;
}

.rush-revive__btn-coin .rush-revive__btn-sub {
    color: #4A3300;
}

/* 3. Discontinue Button */
.rush-revive__btn-cancel {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #94A3B8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 2px;
}

.rush-revive__btn-cancel:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.1);
}

