* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    min-height: 100%;
    background: #070b10;
    -webkit-text-size-adjust: 100%;
}

body {
    background:
        radial-gradient(circle at 50% 38%, rgba(0, 210, 255, 0.06), transparent 32%),
        radial-gradient(circle at 50% 65%, rgba(0, 255, 176, 0.035), transparent 35%),
        #070b10;
    color: #eef7f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* ── Clock ── */
.clock-section {
    margin-top: 20px;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 16px;
}

.clock-label {
    font-size: 14px;
    font-weight: 700;
    color: #8ea5b4;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.clock {
    font-size: 40px;
    font-weight: 300;
    color: #f4ffff;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    text-shadow:
        0 0 15px rgba(255, 255, 255, 0.12),
        0 0 35px rgba(77, 232, 255, 0.08);
}

/* ── Live10 Bar ── */
.live10-bar {
    margin-top: 12px;
    text-align: center;
    min-height: 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
    line-height: 2;
    padding: 0 8px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
}

.live10-bar span {
    margin: 0;
    white-space: nowrap;
}

.live10-bar span:nth-child(6) {
    flex-basis: 100%;
    height: 0;
}

.v-blue   { color: #4db8ff; text-shadow: 0 0 8px rgba(77, 184, 255, 0.4); }
.v-purple { color: #c084fc; text-shadow: 0 0 8px rgba(192, 132, 252, 0.4); }
.v-red    { color: #ff5a5a; text-shadow: 0 0 8px rgba(255, 90, 90, 0.4); }

/* ── Signal Area ── */
.signal-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    width: 100%;
    max-width: 100%;
    padding: 14px 12px;
    position: relative;
}

/* ── Waiting State ── */
.state-waiting {
    text-align: center;
    width: 100%;
}

.waiting-icon {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(0, 255, 176, 0.12);
    border-top-color: #00ffb0;
    border-right-color: #4de8ff;
    border-bottom-color: rgba(0, 255, 176, 0.25);
    border-left-color: rgba(77, 232, 255, 0.08);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 18px;
    box-shadow:
        0 0 12px rgba(0, 255, 176, 0.3),
        0 0 28px rgba(77, 232, 255, 0.12);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.waiting-text {
    font-size: 20px;
    font-weight: 700;
    color: #eafff8;
    letter-spacing: 1px;
    text-shadow: 0 0 14px rgba(0, 255, 176, 0.2);
}

.waiting-next {
    margin-top: 14px;
    font-size: 16px;
    font-weight: 500;
    color: #9fb2bf;
    letter-spacing: 0.8px;
}

.waiting-next-time {
    color: #ffffff;
    font-size: 22px;
    font-weight: 750;
    margin-top: 5px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

.waiting-countdown {
    font-size: 56px;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    margin-top: 16px;
    margin-bottom: 4px;
    text-shadow:
        0 0 15px rgba(77, 232, 255, 0.5),
        0 0 35px rgba(77, 232, 255, 0.2);
    line-height: 1;
}

.waiting-countdown-sub {
    font-size: 16px;
    font-weight: 600;
    color: #7a9aab;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ── Next Signal Ring State ── */
.state-next {
    text-align: center;
    width: 100%;
}

.next-label {
    font-size: 16px;
    font-weight: 800;
    color: #4de8ff;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 14px;
    text-shadow:
        0 0 10px rgba(77, 232, 255, 0.4),
        0 0 25px rgba(77, 232, 255, 0.15);
    animation: label-pulse 1.8s ease-in-out infinite;
}

@keyframes label-pulse {
    0%, 100% {
        opacity: 0.75;
        text-shadow: 0 0 8px rgba(77, 232, 255, 0.3);
    }
    50% {
        opacity: 1;
        text-shadow:
            0 0 15px rgba(77, 232, 255, 0.65),
            0 0 30px rgba(77, 232, 255, 0.25);
    }
}

.next-countdown {
    font-size: 56px;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow:
        0 0 12px rgba(77, 232, 255, 0.45),
        0 0 30px rgba(77, 232, 255, 0.18);
}

.next-sub {
    font-size: 14px;
    font-weight: 650;
    color: #9fb5c3;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* ── Ring Container ── */
.ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-container::before {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid rgba(77, 232, 255, 0.12);
    box-shadow:
        0 0 25px rgba(77, 232, 255, 0.08),
        inset 0 0 25px rgba(77, 232, 255, 0.04);
}

.ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ring-1 {
    width: 120px;
    height: 120px;
    border: 3px solid transparent;
    border-top-color: #4de8ff;
    border-right-color: rgba(77, 232, 255, 0.35);
    filter: drop-shadow(0 0 7px rgba(77, 232, 255, 0.7));
    animation: smooth-spin 3s linear infinite;
}

.ring-2 {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(0, 255, 176, 0.16);
}

.ring-3 {
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

@keyframes smooth-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Window Info ── */
.window-info {
    font-size: 15px;
    font-weight: 600;
    color: #8fa8b8;
    margin-top: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* ── Signal Panel ── */
.signal-panel {
    width: 100%;
    text-align: center;
}

.signal-panel-label {
    font-size: 15px;
    font-weight: 800;
    color: #4de8ff;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding: 6px 0;
    text-shadow:
        0 0 10px rgba(77, 232, 255, 0.4),
        0 0 20px rgba(77, 232, 255, 0.15);
    animation: label-pulse 1.8s ease-in-out infinite;
}

/* ── Bet Now Banner ── */
.bet-now-banner {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #00ffb0;
    text-shadow:
        0 0 20px rgba(0, 255, 176, 0.8),
        0 0 40px rgba(0, 255, 176, 0.4),
        0 0 60px rgba(0, 255, 176, 0.2);
    animation: bet-now-pulse 0.8s ease-in-out infinite;
    margin-bottom: 10px;
    padding: 8px 0;
}

@keyframes bet-now-pulse {
    0%, 100% {
        opacity: 0.85;
        text-shadow:
            0 0 20px rgba(0, 255, 176, 0.8),
            0 0 40px rgba(0, 255, 176, 0.3);
    }
    50% {
        opacity: 1;
        text-shadow:
            0 0 30px rgba(0, 255, 176, 1),
            0 0 60px rgba(0, 255, 176, 0.5),
            0 0 90px rgba(0, 255, 176, 0.2);
    }
}

/* ── Signal Countdown ── */
.signal-countdown {
    font-size: 56px;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    margin-bottom: 3px;
    text-shadow:
        0 0 15px rgba(77, 232, 255, 0.6),
        0 0 35px rgba(77, 232, 255, 0.25);
    line-height: 1;
}

.signal-countdown-sub {
    font-size: 14px;
    font-weight: 600;
    color: #7a9aab;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* ── Signal Banners ── */
.signal-banner {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding: 6px 0;
}

.banner-won {
    color: #00ffb0;
    text-shadow:
        0 0 15px rgba(0, 255, 176, 0.6),
        0 0 35px rgba(0, 255, 176, 0.25);
    animation: won-pulse 1.2s ease-in-out infinite;
}

@keyframes won-pulse {
    0%, 100% { opacity: 0.85; }
    50%       { opacity: 1; }
}

.banner-lost {
    color: #ff5a5a;
    text-shadow:
        0 0 15px rgba(255, 90, 90, 0.6),
        0 0 35px rgba(255, 90, 90, 0.25);
}

.banner-active {
    color: #00ffb0;
    font-size: 20px;
    letter-spacing: 4px;
    text-shadow:
        0 0 12px rgba(0, 255, 176, 0.5),
        0 0 25px rgba(0, 255, 176, 0.15);
}

/* ── Setup Info ── */
.setup-info {
    margin-bottom: 10px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setup-row {
    font-size: 16px;
    font-weight: 600;
    color: #c8dce6;
    margin: 6px 0;
    letter-spacing: 0.3px;
}

.setup-row-bal {
    font-size: 24px;
    font-weight: 700;
    color: #c8dce6;
    margin: 10px 0 4px;
    letter-spacing: 0.3px;
}

.setup-row .lbl    { color: #a6bfcc; }
.setup-row .val    { color: #ffffff; font-weight: 700; }
.setup-row .cashout { color: #c084fc; font-weight: 700; }

.setup-row-bal .lbl { color: #a6bfcc; font-size: 18px; }
.setup-row-bal .val { color: #ffffff; font-weight: 800; }

/* ── Stats Row ── */
.stats-row {
    font-size: 15px;
    font-weight: 600;
    color: #8fa8b8;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

.stats-row .w  { color: #00ffb0; }
.stats-row .l  { color: #ff5a5a; }
.stats-row .wr { color: #4de8ff; }

/* ── Rounds Table ── */
.rounds-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    table-layout: fixed;
}

.rounds-table th {
    font-size: 13px;
    font-weight: 700;
    color: #5a7a8a;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 7px 3px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rounds-table td {
    font-size: 15px;
    font-weight: 600;
    color: #d0e0e8;
    padding: 8px 3px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rounds-table tr:last-child td {
    border-bottom: none;
}

.rounds-table th:nth-child(1),
.rounds-table td:nth-child(1) { width: 13%; }

.rounds-table th:nth-child(2),
.rounds-table td:nth-child(2) { width: 20%; }

.rounds-table th:nth-child(3),
.rounds-table td:nth-child(3) { width: 22%; }

.rounds-table th:nth-child(4),
.rounds-table td:nth-child(4) { width: 22%; }

.rounds-table th:nth-child(5),
.rounds-table td:nth-child(5) { width: 23%; }

.rd-num   { color: #5a7a8a; font-weight: 700; font-size: 14px; }
.rd-crash { font-weight: 700; }
.rd-empty { color: #2a3a44; font-size: 14px; }
.rd-won   { color: #00ffb0; }
.rd-lost  { color: #ff5a5a; }

.pnl-pos { color: #00ffb0; font-weight: 700; }
.pnl-neg { color: #ff5a5a; font-weight: 700; }
.bal-val  { color: #ffffff; font-weight: 700; }

/* ── Total PnL ── */
.total-pnl-row {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
}

.total-pnl-row .lbl {
    color: #a6bfcc;
    font-size: 22px;
}

/* ── Previous Bar ── */
.previous-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-wrap: wrap;
}

.prev-label { color: #7a9aab; white-space: nowrap; }

.prev-pnl {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.prev-pos  { color: #00ffb0; }
.prev-neg  { color: #ff5a5a; }
.prev-bal  { font-weight: 700; white-space: nowrap; }
.prev-won  { color: #00ffb0; }
.prev-lost { color: #ff5a5a; }

/* ── Upcoming Panel ── */
.upcoming-panel {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(77, 232, 255, 0.15);
    position: relative;
    animation: upcoming-fade-in 0.5s ease-out;
}

.upcoming-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(77, 232, 255, 0.3),
        transparent
    );
}

@keyframes upcoming-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.upcoming-countdown {
    font-size: 48px;
    font-weight: 800;
    color: #4de8ff;
    font-variant-numeric: tabular-nums;
    margin-bottom: 4px;
    text-shadow:
        0 0 15px rgba(77, 232, 255, 0.6),
        0 0 35px rgba(77, 232, 255, 0.25);
    line-height: 1;
}

/* ── Mini Bar ── */
.signal-mini-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: rgba(0, 255, 176, 0.06);
    border: 1px solid rgba(0, 255, 176, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 176, 0.08);
    gap: 8px;
}

.signal-mini-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.signal-mini-label {
    font-size: 13px;
    font-weight: 800;
    color: #00ffb0;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
    text-shadow: 0 0 8px rgba(0, 255, 176, 0.5);
}

.signal-mini-time {
    font-size: 16px;
    font-weight: 600;
    color: #8fa8b8;
    font-variant-numeric: tabular-nums;
}

.signal-mini-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.signal-mini-bets {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.signal-mini-bet {
    font-size: 15px;
    font-weight: 600;
    color: #a6bfcc;
    white-space: nowrap;
}

.signal-mini-bet .val     { color: #ffffff; font-weight: 700; }
.signal-mini-bet .cashout { color: #c084fc; font-weight: 700; }

.signal-mini-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
}

.signal-mini-countdown {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-shadow: 0 0 10px rgba(77, 232, 255, 0.5);
}

.signal-mini-countdown-sub {
    font-size: 13px;
    font-weight: 600;
    color: #7a9aab;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.signal-mini-pnl {
    font-size: 17px;
    font-weight: 700;
}

/* ════════════════════════════════
   MEDIA QUERIES
   ════════════════════════════════ */

@media (max-width: 360px) {
    .clock                  { font-size: 34px; }
    .clock-label            { font-size: 12px; }
    .live10-bar             { font-size: 13px; gap: 3px 6px; padding: 0 6px; }

    .waiting-text           { font-size: 18px; }
    .waiting-countdown      { font-size: 48px; }
    .waiting-countdown-sub  { font-size: 14px; }

    .next-label             { font-size: 14px; }
    .next-countdown         { font-size: 48px; }
    .next-sub               { font-size: 13px; }

    .ring-container         { width: 100px; height: 100px; }
    .ring-container::before { width: 92px;  height: 92px; }
    .ring-1                 { width: 100px; height: 100px; }
    .ring-2                 { width: 84px;  height: 84px; }
    .ring-3                 { width: 68px;  height: 68px; }

    .signal-panel-label     { font-size: 13px; letter-spacing: 2px; }
    .bet-now-banner         { font-size: 30px; letter-spacing: 3px; }
    .signal-banner          { font-size: 22px; }
    .signal-countdown       { font-size: 48px; }
    .signal-countdown-sub   { font-size: 13px; }

    .setup-row              { font-size: 14px; }
    .setup-row-bal          { font-size: 20px; }
    .setup-row-bal .lbl     { font-size: 15px; }
    .stats-row              { font-size: 13px; }

    .rounds-table th        { font-size: 11px; padding: 6px 2px; }
    .rounds-table td        { font-size: 13px; padding: 7px 2px; }
    .rd-num                 { font-size: 12px; }
    .rd-empty               { font-size: 12px; }

    .total-pnl-row          { font-size: 20px; }
    .total-pnl-row .lbl     { font-size: 18px; }

    .window-info            { font-size: 13px; }
    .previous-bar           { font-size: 13px; padding: 6px 8px; gap: 6px; }

    .upcoming-panel         { margin-top: 16px; padding-top: 12px; }
    .upcoming-countdown     { font-size: 40px; }

    .signal-mini-bar        { padding: 10px 10px; }
    .signal-mini-label      { font-size: 11px; }
    .signal-mini-time       { font-size: 14px; }
    .signal-mini-bet        { font-size: 13px; }
    .signal-mini-countdown  { font-size: 22px; }
    .signal-mini-countdown-sub { font-size: 11px; }
    .signal-mini-pnl        { font-size: 15px; }
}

@media (min-width: 361px) and (max-width: 414px) {
    .clock                  { font-size: 38px; }
    .clock-label            { font-size: 13px; }
    .live10-bar             { font-size: 14px; padding: 0 8px; }

    .waiting-text           { font-size: 20px; }
    .waiting-countdown      { font-size: 52px; }

    .next-countdown         { font-size: 52px; }

    .bet-now-banner         { font-size: 34px; }
    .signal-countdown       { font-size: 52px; }
    .signal-banner          { font-size: 24px; }

    .setup-row              { font-size: 15px; }
    .setup-row-bal          { font-size: 22px; }
    .stats-row              { font-size: 14px; }

    .rounds-table th        { font-size: 12px; }
    .rounds-table td        { font-size: 14px; }

    .total-pnl-row          { font-size: 22px; }

    .upcoming-countdown     { font-size: 44px; }

    .signal-mini-countdown  { font-size: 24px; }
    .signal-mini-bet        { font-size: 14px; }
}

@media (min-width: 415px) {
    .clock                  { font-size: 44px; }
    .clock-label            { font-size: 14px; }
    .live10-bar             { font-size: 16px; }
    .signal-area            { max-width: 460px; }

    .waiting-text           { font-size: 22px; }
    .waiting-countdown      { font-size: 60px; }
    .waiting-countdown-sub  { font-size: 17px; }

    .next-label             { font-size: 17px; }
    .next-countdown         { font-size: 60px; }
    .next-sub               { font-size: 15px; }

    .signal-panel-label     { font-size: 16px; }
    .bet-now-banner         { font-size: 42px; }
    .signal-banner          { font-size: 28px; }
    .signal-countdown       { font-size: 60px; }
    .signal-countdown-sub   { font-size: 15px; }

    .setup-row              { font-size: 17px; }
    .setup-row-bal          { font-size: 26px; }
    .setup-row-bal .lbl     { font-size: 20px; }
    .stats-row              { font-size: 16px; }

    .rounds-table th        { font-size: 14px; padding: 8px 4px; }
    .rounds-table td        { font-size: 16px; padding: 9px 4px; }
    .rd-num                 { font-size: 15px; }

    .total-pnl-row          { font-size: 26px; }
    .total-pnl-row .lbl     { font-size: 24px; }

    .window-info            { font-size: 16px; }
    .previous-bar           { font-size: 16px; }

    .upcoming-panel         { margin-top: 24px; padding-top: 18px; }
    .upcoming-countdown     { font-size: 52px; }

    .signal-mini-bar        { padding: 16px 18px; }
    .signal-mini-label      { font-size: 14px; }
    .signal-mini-time       { font-size: 17px; }
    .signal-mini-bet        { font-size: 16px; }
    .signal-mini-countdown  { font-size: 28px; }
    .signal-mini-countdown-sub { font-size: 14px; }
    .signal-mini-pnl        { font-size: 18px; }
}