@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

.crash-page-wrapper {
    max-width: 1220px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.crash-page {
    display: grid;
    grid-template-columns: 300px 1fr;
    background: #102b3e;
    border: 1px solid #20445b;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

.crash-controls {
    background: #244457;
    border-right: 1px solid #315d76;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auto-only {
    display: none;
}

.crash-controls.auto-mode .auto-only {
    display: block;
}

.crash-mode-toggle {
    background: #102b3b;
    border: 1px solid #315c74;
    border-radius: 999px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.crash-mode-toggle .mode-btn {
    min-height: 36px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #d8ebf6;
    font: 600 14px "Space Grotesk", sans-serif;
    cursor: pointer;
}

.crash-mode-toggle .mode-btn.active {
    background: #3f6379;
    color: #f4fbff;
}

.crash-controls label {
    color: #d7e8f3;
    font: 500 14px "Space Grotesk", sans-serif;
    display: block;
    margin-bottom: 6px;
}

.crash-input-row {
    min-height: 42px;
    border: 1px solid #3f6379;
    border-radius: 8px;
    background: #143245;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.crash-input-row input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #f2fbff;
    font: 700 34px "Barlow Condensed", sans-serif;
    padding: 4px 10px;
}

.crash-currency {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #83eb00;
    color: #0f2a1a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 800 14px "Space Grotesk", sans-serif;
}

.crash-modifiers {
    display: flex;
    align-items: stretch;
    height: 100%;
    border-left: 1px solid #3f6073;
}

.crash-mod-btn {
    min-width: 46px;
    border: none;
    background: #3e6276;
    color: #eef9ff;
    font: 600 18px "Barlow Condensed", sans-serif;
    cursor: pointer;
}

.crash-mod-btn + .crash-mod-btn {
    border-left: 1px solid #567b92;
}

.cashout-row .crash-stepper {
    height: 100%;
    display: flex;
    border-left: 1px solid #45677d;
}

.cashout-row .crash-stepper button {
    width: 38px;
    border: none;
    background: #3e6276;
    color: #d9eaf5;
    cursor: pointer;
}

.cashout-row .crash-stepper button + button {
    border-left: 1px solid #567b92;
}

.crash-play-btn {
    min-height: 44px;
    border: none;
    border-radius: 9px;
    background: #277cd8;
    color: #eff9ff;
    font: 700 18px "Barlow Condensed", sans-serif;
    cursor: pointer;
}

.crash-play-btn.cashout-state {
    background: #2d8be8;
}

.auto-games-row .auto-infinity {
    width: 32px;
    min-width: 32px;
    color: #c7deeb;
    text-align: center;
}

.crash-toggle-switch {
    width: 54px;
    height: 30px;
    border: 1px solid #5a7a8f;
    border-radius: 999px;
    background: #1a3547;
    position: relative;
    cursor: pointer;
}

.crash-toggle-switch .toggle-knob {
    position: absolute;
    left: 3px;
    top: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s ease;
}

.crash-toggle-switch[aria-pressed="true"] {
    background: #2c7fce;
    border-color: #5ea8ef;
}

.crash-toggle-switch[aria-pressed="true"] .toggle-knob {
    transform: translateX(24px);
}

.crash-main {
    min-height: 670px;
    padding: 12px 18px 12px;
    background: radial-gradient(130% 95% at 50% 12%, #103149 0%, #0b2a40 55%, #082438 100%);
    display: flex;
    flex-direction: column;
}

.crash-main .recent-rolls {
    position: relative;
    overflow: hidden;
    min-height: 40px;
}

.crash-main .recent-rolls-track {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.crash-main .roll-pill {
    flex: 0 0 auto;
    min-width: 62px;
    padding: 7px 10px;
    border-radius: 999px;
    text-align: center;
    font: 600 12px "Space Grotesk", sans-serif;
    background: #2f4e61;
    color: #f2f8fb;
}

.crash-main .roll-pill.win {
    background: #00e701;
    color: #06210c;
}

.crash-chart-wrap {
    position: relative;
    margin-top: 16px;
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
}

.crash-axis-y {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 46px;
    width: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}

.crash-axis-y span {
    width: 52px;
    min-height: 30px;
    border-radius: 6px;
    background: #2c4a5e;
    color: #cfe2ee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 600 12px "Space Grotesk", sans-serif;
}

.crash-chart {
    width: calc(100% - 64px);
    height: calc(100% - 52px);
    margin-left: 64px;
    margin-bottom: 52px;
}

.crash-area-path {
    fill: #ffa300;
    opacity: 0.98;
}

.crash-line-path {
    fill: none;
    stroke: #f5f9fc;
    stroke-width: 8;
    stroke-linecap: round;
}

.crash-point {
    fill: #f5f9fc;
}

.crash-multiplier-display {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    color: #f4f9fc;
    font: 700 64px "Space Grotesk", sans-serif;
    letter-spacing: -0.02em;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.crash-message {
    position: absolute;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%);
    min-width: 320px;
    min-height: 72px;
    border-radius: 8px;
    background: #37586c;
    color: #f1f8fb;
    font: 700 40px "Barlow Condensed", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.32);
}

.crash-message.win {
    color: #00e701;
}

.crash-message.loss {
    color: #ff5a72;
}

.crash-axis-x {
    margin-left: 64px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    color: #d7e9f5;
    font: 700 30px "Barlow Condensed", sans-serif;
}

@media (max-width: 980px) {
    .crash-page {
        grid-template-columns: 1fr;
    }
    .crash-controls {
        border-right: none;
        border-bottom: 1px solid #315d76;
    }
    .crash-main {
        min-height: 560px;
    }
    .crash-multiplier-display {
        font-size: 46px;
    }
    .crash-message {
        min-width: 240px;
        font-size: 28px;
    }
}
