/* Service — Спаси iPhone */
.dm-fox-game {
    --dm-fg-panel: #ffffff;
    --dm-fg-line: #e5e5ea;
    --dm-fg-text: #1d1d1f;
    --dm-fg-muted: #86868b;
    --dm-logo-blue: #2f6fed;
    --dm-logo-coral: #e85a4f;
    margin: -20px auto 36px;
    max-width: 1100px;
    padding: 0 20px;
}

/* Repaired devices counter (odometer) */
.dm-fox-repaired {
    text-align: center;
    margin: 0 0 16px;
    padding: 18px 16px 14px;
    background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
    border: 1px solid var(--dm-fg-line);
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.dm-fox-repaired__lead {
    margin: 0 0 12px;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--dm-fg-muted);
    font-weight: 500;
}

.dm-fox-repaired__odometer {
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    align-items: stretch;
    margin: 0 0 12px;
}

.dm-fox-repaired__digit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2.75rem;
    padding: 0 0.35rem;
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    box-shadow:
        0 1px 0 #fff inset,
        0 4px 10px rgba(0, 0, 0, 0.08);
}

.dm-fox-repaired__digit b {
    font-size: 1.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--dm-fg-text);
    line-height: 1;
}

.dm-fox-repaired__tail {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    color: var(--dm-logo-blue);
    letter-spacing: -0.01em;
}

@media (max-width: 640px) {
    .dm-fox-repaired__digit {
        min-width: 1.55rem;
        height: 2.3rem;
    }

    .dm-fox-repaired__digit b {
        font-size: 1.25rem;
    }

    .dm-fox-repaired__lead,
    .dm-fox-repaired__tail {
        font-size: 0.88rem;
    }
}

.dm-fox-game__card {
    background: var(--dm-fg-panel);
    border: 1px solid var(--dm-fg-line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.08);
}

.dm-fox-game__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px 8px;
    flex-wrap: nowrap;
}

.dm-fox-game__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--dm-fg-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-fox-game__title-short {
    display: none;
}

.dm-fox-game__wheel {
    position: relative;
    --dm-fox-wheel-item-h: 22px;
    flex: 0 0 68px;
    width: 68px;
    height: calc(var(--dm-fox-wheel-item-h) * 3);
    border-radius: 10px;
    background: #f5f5f7;
    border: 1px solid var(--dm-fg-line);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 80%, transparent 100%);
}

.dm-fox-game__wheel-band {
    position: absolute;
    left: 3px;
    right: 3px;
    top: 50%;
    height: var(--dm-fox-wheel-item-h);
    margin-top: calc(var(--dm-fox-wheel-item-h) / -2);
    border-radius: 7px;
    background: rgba(47, 111, 237, 0.08);
    border: 1px solid rgba(47, 111, 237, 0.22);
    pointer-events: none;
    z-index: 2;
}

.dm-fox-game__wheel-scroller {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior: contain;
    outline: none;
}

.dm-fox-game__wheel-scroller::-webkit-scrollbar {
    display: none;
}

.dm-fox-game__wheel-item {
    height: var(--dm-fox-wheel-item-h);
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dm-fg-muted);
    opacity: 0.55;
    transform: scale(0.92);
    transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    user-select: none;
    padding: 0 2px;
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
}

.dm-fox-game__wheel-item.is-active {
    color: var(--dm-fg-text);
    opacity: 1;
    transform: scale(1.04);
    font-weight: 700;
}

.dm-fox-game__wheel-item--pad {
    pointer-events: none;
    opacity: 0;
}

.dm-fox-game__stats {
    display: flex;
    gap: 4px;
    align-items: center;
    flex: 0 0 auto;
}

.dm-fox-game__stat {
    min-width: 44px;
    padding: 4px 6px;
    border-radius: 8px;
    background: #f5f5f7;
    border: 1px solid var(--dm-fg-line);
    text-align: center;
}

.dm-fox-game__stat b {
    display: block;
    color: var(--dm-logo-blue);
    font-size: 0.92rem;
    line-height: 1.05;
}

.dm-fox-game__stat span {
    font-size: 0.58rem;
    color: var(--dm-fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.dm-fox-game__stat.is-score-blink b {
    color: #16a34a;
    animation: dm-fox-score-blink 1.4s ease-in-out 5;
}

@keyframes dm-fox-score-blink {
    0%,
    100% {
        opacity: 1;
        color: #16a34a;
        transform: scale(1);
    }
    50% {
        opacity: 0.25;
        color: #22c55e;
        transform: scale(1.2);
    }
}

.dm-fox-game__stage {
    position: relative;
    height: min(520px, 72vw);
    min-height: 360px;
    background: #efe8da;
    touch-action: none;
    user-select: none;
    overflow: hidden;
    cursor: pointer;
    border-top: 1px solid var(--dm-fg-line);
}

.dm-fox-game__canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.dm-fox-game__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(30, 24, 18, 0.55);
    backdrop-filter: blur(3px);
    z-index: 3;
    padding: 20px;
    text-align: center;
}

.dm-fox-game__overlay[hidden] {
    display: none !important;
}

.dm-fox-game__countdown {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
    background: rgba(30, 24, 18, 0.35);
}

.dm-fox-game__countdown[hidden] {
    display: none !important;
}

.dm-fox-game__countdown-num {
    font-size: clamp(3.5rem, 18vw, 5.5rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    letter-spacing: -0.03em;
    animation: dm-fox-count-pop 0.72s ease-out;
}

.dm-fox-game__countdown-num.is-go {
    font-size: clamp(2rem, 10vw, 3.2rem);
    color: #86efac;
}

@keyframes dm-fox-count-pop {
    0% {
        opacity: 0;
        transform: scale(0.35);
    }
    55% {
        opacity: 1;
        transform: scale(1.12);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.dm-fox-game__overlay h3 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.dm-fox-game__overlay p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    max-width: 320px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.dm-fox-game__overlay-prize {
    margin-top: 4px !important;
    color: #ffd4a8 !important;
    font-weight: 700;
    font-size: 0.92rem !important;
    line-height: 1.35 !important;
    text-align: center;
}

.dm-fox-game__btn {
    appearance: none;
    border: 0;
    margin-top: 6px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 980px;
    background: var(--dm-logo-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

.dm-fox-game__btn:hover {
    opacity: 0.94;
}

.dm-fox-game__hint {
    padding: 10px 16px 14px;
    font-size: 0.78rem;
    color: var(--dm-fg-muted);
    text-align: center;
}

[data-theme="dark"] .dm-fox-game__card {
    background: #1c1c1e;
    border-color: #2c2c2e;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .dm-fox-repaired {
    background: linear-gradient(180deg, #141416 0%, #0a0a0b 100%);
    border-color: #2c2c2e;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .dm-fox-repaired__lead {
    color: #a1a1a6;
}

[data-theme="dark"] .dm-fox-repaired__digit {
    background: #1c1c1e;
    border-color: #3a3a3c;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 4px 12px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .dm-fox-repaired__digit b {
    color: #f5f5f7;
}

[data-theme="dark"] .dm-fox-repaired__tail {
    color: #5b9cff;
}

[data-theme="dark"] .dm-fox-game__title {
    color: #f5f5f7;
}

[data-theme="dark"] .dm-fox-game__wheel {
    background: #2c2c2e;
    border-color: #3a3a3c;
}

[data-theme="dark"] .dm-fox-game__wheel-band {
    background: rgba(91, 156, 255, 0.12);
    border-color: rgba(91, 156, 255, 0.35);
}

[data-theme="dark"] .dm-fox-game__wheel-item.is-active {
    color: #f5f5f7;
}

[data-theme="dark"] .dm-fox-game__stat {
    background: #2c2c2e;
    border-color: #3a3a3c;
}

@media (max-width: 767px) {
    .dm-fox-game {
        margin-top: -8px;
        padding: 0 10px;
        margin-bottom: 28px;
    }

    .dm-fox-game__head {
        flex-wrap: nowrap;
        gap: 5px;
        padding: 7px 8px 6px;
    }

    .dm-fox-game__title-full {
        display: none;
    }

    .dm-fox-game__title-short {
        display: inline;
    }

    .dm-fox-game__title {
        font-size: 0.95rem;
        font-weight: 800;
        white-space: nowrap;
        flex: 0 0 auto;
        min-width: auto;
    }

    .dm-fox-game__wheel {
        --dm-fox-wheel-item-h: 18px;
        flex: 0 0 52px;
        width: 52px;
    }

    .dm-fox-game__wheel-item {
        font-size: 0.62rem;
    }

    .dm-fox-game__stats {
        gap: 3px;
    }

    .dm-fox-game__stat {
        min-width: 30px;
        padding: 2px 3px;
        border-radius: 7px;
    }

    .dm-fox-game__stat b {
        font-size: 0.78rem;
    }

    .dm-fox-game__stat span {
        font-size: 0.48rem;
        letter-spacing: 0;
    }

    .dm-fox-game__stage {
        min-height: 300px;
        height: 60vw;
    }
}
