/* =========================
      GENERAL PAGE
========================= */
body {
    background: #0b111a;
}

.speedcash-wrapper {
    max-width: 1500px;
    margin: 110px auto 40px;
    padding: 0 15px;
    color: #fff;
    font-family: 'Roboto', sans-serif;
}


/* =========================
      HISTORY BAR
========================= */
.speedcash-history {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
}

.sc-h-item {
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.sc-car-img {
    transition: transform 0.05s linear; /* smooth movement */
}

.sc-h-item.blue {
    background: rgba(0,122,255,0.18);
    color: #4da8ff;
}

.sc-h-item.orange {
    background: rgba(255,151,0,0.18);
    color: #ffb75c;
}


/* =========================
      GAME AREA
========================= */
.speedcash-game-area {
     overflow: hidden;
    background: #131b26;
    border-radius: 16px;
    margin-top: 20px;
    padding: 40px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 420px;         /* ✔ ensures space even with no cars */
    position: relative;
}

/* Center text like "DROVE AWAY" */
.sc-center-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 500;
    opacity: 0.85;
    color: #fff;
    white-space: nowrap;
    display: none;      /* JS will toggle this */
}

.sc-left,
.sc-right {
    flex: 1;
    text-align: center;
}


/* Multipliers */
.sc-multiplier {
    font-size: 55px;
    font-weight: 700;
    margin-bottom: 20px;
}

.sc-multiplier.blue { color: #3692ff; }
.sc-multiplier.orange { color: #ff9c3a; }


/* Car images */
.sc-car-img {
    width: 200px;
    display: block;
    margin: 0 auto;
    opacity: 1;
}


/* Busted Icons */
.sc-busted-icon {
    width: 90px;
    opacity: 0.85;
    margin: 10px auto 6px;
    display: none;          /* JS will toggle */
}

/* =========================
   COUNTDOWN BAR
========================= */
.sc-countdown {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
    display: none;
    align-items: center;
    justify-content: center;
}

.sc-countdown-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg,#007aff,#00d4ff);
    transition: width 0.1s linear;
    opacity: 0.6;
}

.sc-countdown-text {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.sc-status {
    font-size: 32px;
    font-weight: 700;
    margin-top: 5px;
    display: none;          /* JS will toggle */
}

.sc-status.blue { color: #3692ff; }
.sc-status.orange { color: #ff9c3a; }


/* Divider Line */
.sc-road-divider {
    width: 6px;
    height: 100%;
    min-height: 300px;           /* ✔ Forces visible height */
    background-color: transparent;
    position: absolute;          /* ✔ Forces divider to fill container */
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 10;                 /* ✔ Ensures visibility */

    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.7) 0px,
        rgba(255,255,255,0.7) 12px,
        transparent 12px,
        transparent 24px
    );

    animation: dashMove 0.25s linear infinite;
}

@keyframes dashMove {
    from { background-position: 0 0; }
    to   { background-position: 0 24px; }
}



.sc-glow {
    position: absolute;
    width: 240px;
    height: 110px;
    border-radius: 50%;
    filter: blur(45px);
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, 10px);
}

/* Blue glow */
.blue-glow {
    background: radial-gradient(
        ellipse at center,
        rgba(0, 140, 255, 0.7),
        rgba(0, 140, 255, 0.1),
        transparent
    );
}

/* Orange glow */
.orange-glow {
    background: radial-gradient(
        ellipse at center,
        rgba(255, 120, 0, 0.7),
        rgba(255, 120, 0, 0.1),
        transparent
    );
}

/* =========================
      BET PANELS
========================= */
.speedcash-bet-panels {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.sc-panel {
    background: #131b26;
    padding: 15px;
    border-radius: 14px;
    flex: 1;
}

.sc-panel-header {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Bet Input Row */
.sc-bet-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sc-bet-input {
    flex: 1;
    padding: 10px;
    background: #0f1623;
    border: 1px solid #1e293b;
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

/* + / - buttons */
.sc-adjust {
    background: #0f1623;
    border: 1px solid #1e293b;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}

/* Main BET button */
.sc-bet-btn {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}
/* Prevent wrapper height expansion when busted UI appears */
.sc-busted-icon,
.sc-status {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 12;
}

/* Fix blue busted position */
#blueBusted,
#blueStatus {
    top: 65%; /* tweak if needed */
}

/* Fix orange busted position */
#orangeBusted,
#orangeStatus {
    top: 65%; /* tweak if needed */
}

/* Make sure parent columns allow absolute children */
.sc-left,
.sc-right {
    position: relative;
}
.sc-blue {
    background: #0066ff;
    color: #fff;
}

.sc-orange {
    background: #ff6600;
    color: #fff;
}

.sc-grey {
    background: #343a40;
    color: #fff;
}




/* Prediction Buttons */
.sc-choices {
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
}
/* =========================
    GLOW ENHANCEMENTS
========================= */

/* Add glow layers behind the game area */
.speedcash-game-area {
    position: relative;
    overflow: hidden;
}

/* Left-side BLUE glow */
.speedcash-game-area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 240px;
    height: 100%;
    pointer-events: none;
    filter: blur(60px);
    background: linear-gradient(90deg,
        rgba(0,124,255,0.30) 0%,
        rgba(0,124,255,0.08) 60%,
        transparent 100%
    );
    z-index: 0;
}

/* Right-side ORANGE glow */
.speedcash-game-area::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 240px;
    height: 100%;
    pointer-events: none;
    filter: blur(60px);
    background: linear-gradient(270deg,
        rgba(255,142,27,0.30) 0%,
        rgba(255,142,27,0.08) 60%,
        transparent 100%
    );
    z-index: 0;
}

/* =========================
    MULTIPLIER GLOW
========================= */
.sc-multiplier {
    font-size: 55px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 18px currentColor, 0 0 45px currentColor;
    animation: pulseGlow 1.8s ease-in-out infinite;
}

/* Stronger glow boost by color */
.sc-multiplier.blue {
    color: #4da8ff;
}
.sc-multiplier.orange {
    color: #ffad4d;
}

/* Soft pulsating glow */
@keyframes pulseGlow {
    0% {
        text-shadow: 0 0 10px rgba(255,255,255,0.25),
                     0 0 25px currentColor,
                     0 0 45px currentColor;
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 20px rgba(255,255,255,0.35),
                     0 0 60px currentColor,
                     0 0 95px currentColor;
        transform: scale(1.05);
    }
    100% {
        text-shadow: 0 0 10px rgba(255,255,255,0.25),
                     0 0 25px currentColor,
                     0 0 45px currentColor;
        transform: scale(1);
    }
}

.sc-choice {
    flex: 1;
    padding: 10px;
    background: #0f1623;
    border: 1px solid #1e293b;
    color: #fff;
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    cursor: pointer;
}

.sc-choice.active {
    background: #007aff;
    border-color: #007aff;
}
/* =========================
      MOBILE RESPONSIVE FIXES
========================= */

@media (max-width: 768px) {

    /* Page wrapper */
    .speedcash-wrapper {
        margin: 80px auto 20px;
        padding: 0 10px;
    }

    /* Reduce history bar padding */
    .speedcash-history {
        padding: 6px 0;
        gap: 6px;
    }

    /* Game area: fit smaller screens */
    .speedcash-game-area {
        
        min-height: 260px;       /* ↓ smaller but enough space */
        padding: 25px 10px;
        border-radius: 12px;
    }

    /* Multipliers smaller */
    .sc-multiplier {
        font-size: 34px;
        margin-bottom: 10px;
    }

    /* Cars & busted icons */
    .sc-car-img {
        width: 130px !important;
    }

    .sc-busted-icon {
        width: 60px !important;
    }

    .sc-status {
        font-size: 22px;
    }

    .sc-center-message {
        font-size: 18px;
    }

    /* Road divider thinner */
    .sc-road-divider {
        width: 2px;
        margin: 0 10px;
    }

    /* BET PANELS STACK INSTEAD OF 3-COLUMN */
    .speedcash-bet-panels {
        flex-direction: column;
        gap: 14px;
        margin-top: 20px;
    }

    .sc-panel {
        padding: 12px;
        border-radius: 12px;
    }

    .sc-bet-btn {
        padding: 10px;
        font-size: 15px;
    }

    .sc-bet-input {
        font-size: 14px;
        padding: 8px;
    }

    .sc-adjust {
        padding: 8px 10px;
        font-size: 13px;
    }

    .sc-choice {
        font-size: 14px;
        padding: 8px;
    }

    /* Footer should not add huge height */
    footer#rb-footer {
        padding: 40px 0 20px !important;
    }
}
