/* ============================================
   DEBT COUNTER - Gas-Pump / Odometer Style
   Black panels, red LED glowing digits.
   Single-line, never wraps.
   ============================================ */

.debt-counter {
    display: inline-flex;
    align-items: center;
    font-family: 'Courier New', 'Lucida Console', monospace;
    gap: 0;
    flex-wrap: nowrap;
    justify-content: center;
    white-space: nowrap;
}

/* Dollar sign */
.dc-dollar {
    font-size: 40px;
    font-weight: 900;
    color: #ff1a1a;
    text-shadow:
        0 0 12px rgba(255, 26, 26, 0.7),
        0 0 24px rgba(255, 0, 0, 0.35);
    margin-right: 8px;
    line-height: 54px;
    user-select: none;
}

/* Group of 3 digits */
.dc-group {
    display: inline-flex;
    gap: 3px;
    flex-shrink: 0;
}

/* Comma separator */
.dc-comma {
    font-size: 34px;
    font-weight: 900;
    color: #ff1a1a;
    text-shadow: 0 0 10px rgba(255, 26, 26, 0.6);
    line-height: 54px;
    margin: 0 3px;
    user-select: none;
    flex-shrink: 0;
}

/* Individual digit window */
.dc-digit {
    display: inline-block;
    width: 36px;
    height: 54px;
    background: linear-gradient(180deg, #080808 0%, #111 40%, #111 60%, #080808 100%);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.9),
        inset 0 -2px 6px rgba(0, 0, 0, 0.9),
        0 2px 8px rgba(0, 0, 0, 0.7);
    border: 1px solid #222;
}

/* Center divider line (mechanical odometer slit) */
.dc-digit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 -1px 0 rgba(40, 0, 0, 0.4), 0 1px 0 rgba(40, 0, 0, 0.2);
}

/* 3D drum curvature overlay */
.dc-digit::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0) 25%,
        rgba(0, 0, 0, 0) 75%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 4;
    pointer-events: none;
}

/* The rolling strip of numbers */
.dc-strip {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    will-change: transform;
}

/* Each number cell in the strip */
.dc-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 54px;
    font-size: 38px;
    font-weight: 900;
    color: #ff1a1a;
    text-shadow:
        0 0 10px rgba(255, 26, 26, 0.8),
        0 0 20px rgba(255, 0, 0, 0.35),
        0 0 40px rgba(180, 0, 0, 0.15);
    flex-shrink: 0;
    user-select: none;
}

/* Glow pulse when digit changes */
.dc-digit.dc-glow {
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.9),
        inset 0 -2px 6px rgba(0, 0, 0, 0.9),
        0 2px 8px rgba(0, 0, 0, 0.7),
        0 0 15px rgba(255, 26, 26, 0.5),
        0 0 30px rgba(200, 0, 0, 0.15);
    border-color: #440000;
}

/* ============================
   SMALL SIZE (Hero panel)
   ============================ */
.debt-counter-sm .dc-dollar {
    font-size: 24px;
    line-height: 36px;
    margin-right: 5px;
}

.debt-counter-sm .dc-comma {
    font-size: 20px;
    line-height: 36px;
    margin: 0 2px;
}

.debt-counter-sm .dc-digit {
    width: 24px;
    height: 36px;
}

.debt-counter-sm .dc-num {
    width: 24px;
    height: 36px;
    font-size: 24px;
}

.debt-counter-sm .dc-group {
    gap: 2px;
}

/* ============================
   RESPONSIVE - Tablet
   ============================ */
@media (max-width: 768px) {
    .debt-counter:not(.debt-counter-sm) .dc-dollar {
        font-size: 28px;
        line-height: 42px;
        margin-right: 5px;
    }
    .debt-counter:not(.debt-counter-sm) .dc-comma {
        font-size: 24px;
        line-height: 42px;
        margin: 0 2px;
    }
    .debt-counter:not(.debt-counter-sm) .dc-digit {
        width: 26px;
        height: 42px;
    }
    .debt-counter:not(.debt-counter-sm) .dc-num {
        width: 26px;
        height: 42px;
        font-size: 28px;
    }

    .debt-counter-sm .dc-dollar {
        font-size: 18px;
        line-height: 28px;
        margin-right: 3px;
    }
    .debt-counter-sm .dc-comma {
        font-size: 16px;
        line-height: 28px;
        margin: 0 1px;
    }
    .debt-counter-sm .dc-digit {
        width: 18px;
        height: 28px;
    }
    .debt-counter-sm .dc-num {
        width: 18px;
        height: 28px;
        font-size: 18px;
    }
    .debt-counter-sm .dc-group {
        gap: 1px;
    }
}

/* ============================
   RESPONSIVE - Mobile
   ============================ */
@media (max-width: 480px) {
    .debt-counter:not(.debt-counter-sm) .dc-dollar {
        font-size: 20px;
        line-height: 32px;
        margin-right: 3px;
    }
    .debt-counter:not(.debt-counter-sm) .dc-comma {
        font-size: 18px;
        line-height: 32px;
        margin: 0 1px;
    }
    .debt-counter:not(.debt-counter-sm) .dc-digit {
        width: 20px;
        height: 32px;
    }
    .debt-counter:not(.debt-counter-sm) .dc-num {
        width: 20px;
        height: 32px;
        font-size: 20px;
    }
    .debt-counter:not(.debt-counter-sm) .dc-group {
        gap: 1px;
    }

    .debt-counter-sm .dc-dollar {
        font-size: 14px;
        line-height: 22px;
        margin-right: 2px;
    }
    .debt-counter-sm .dc-comma {
        font-size: 12px;
        line-height: 22px;
        margin: 0;
    }
    .debt-counter-sm .dc-digit {
        width: 14px;
        height: 22px;
    }
    .debt-counter-sm .dc-num {
        width: 14px;
        height: 22px;
        font-size: 14px;
    }
    .debt-counter-sm .dc-group {
        gap: 1px;
    }
}
