/* ==================== FALLING PICKAXE ==================== */

.screen-fallingpickaxe {
    position: relative;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #08090d;
    -webkit-overflow-scrolling: touch;
}

.fallingpickaxe-container {
    position: relative;
    width: 100%;
    max-width: 100vw;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 70px 12px 100px 12px;
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 1;
}

/* ==================== ФОН: ЧАСТИЦЫ-БЛОКИ ==================== */

.fp-bg-particles {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.fp-bg-particle {
    position: absolute;
    top: 100%;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    animation: fp-bg-particle-fly linear infinite;
    image-rendering: pixelated;
}

@keyframes fp-bg-particle-fly {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Контент выше частиц */
.fallingpickaxe-spin-view,
.fallingpickaxe-bet-section,
.fallingpickaxe-logo-wrapper {
    position: relative;
    z-index: 2;
}

/* ==================== ЛОГОТИП ==================== */

.fallingpickaxe-logo-wrapper {
    width: 100%;
    max-width: 426px;
    padding: 0;
    box-sizing: border-box;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.fallingpickaxe-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.15));
}

/* ==================== ФАЗА СПИНА ==================== */

.fallingpickaxe-spin-view {
    width: 260px;
    height: 260px;
    max-width: 80vw;
    max-height: 80vw;
    aspect-ratio: 1 / 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.2));
}

.fallingpickaxe-spin-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    background: transparent;
}

/* ==================== ФАЗА ПАДЕНИЯ ==================== */

.fallingpickaxe-fall-view {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    min-height: 0;
    z-index: 2;
}

.fallingpickaxe-fall-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Кнопка ×1/×2/×3 */
.fallingpickaxe-speed-btn {
    position: fixed;
    bottom: 90px;
    right: max(12px, calc((100vw - 450px) / 2 + 12px));
    z-index: 999;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    background: rgba(10, 12, 18, 0.85);
    color: #ffd700;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fallingpickaxe-speed-btn:active {
    transform: scale(0.95);
}

.fallingpickaxe-speed-btn.speed-2 {
    background: rgba(240, 136, 62, 0.35);
    border-color: rgba(240, 136, 62, 0.6);
    color: #f5c842;
}
.fallingpickaxe-speed-btn.speed-3 {
    background: rgba(231, 76, 60, 0.35);
    border-color: rgba(231, 76, 60, 0.6);
    color: #ff6b6b;
}

/* Секция ставок */
.fallingpickaxe-bet-section {
    width: 100%;
    max-width: 426px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.fallingpickaxe-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

/* ==================== LOADER ==================== */

.fallingpickaxe-loader {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 100vh;
    min-height: 100dvh;
}

.fallingpickaxe-loader-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid rgba(255, 215, 0, 0.15);
    border-top-color: #ffd700;
    border-right-color: #f5c842;
    animation: fp-loader-spin 0.9s linear infinite;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.3),
        0 0 40px rgba(255, 215, 0, 0.15);
}

@keyframes fp-loader-spin {
    to { transform: rotate(360deg); }
}

.fallingpickaxe-loader-text {
    font-size: 14px;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow:
        0 0 12px rgba(255, 215, 0, 0.6),
        0 0 24px rgba(255, 215, 0, 0.3);
    animation: fp-loader-pulse 1.5s ease-in-out infinite;
}

@keyframes fp-loader-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ==================== МНОЖИТЕЛЬ-СПИННЕР ==================== */

.fallingpickaxe-spinner-overlay {
    position: fixed;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    animation: fp-fade-in 0.3s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

@keyframes fp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fallingpickaxe-spinner-stage {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

/* ==================== ФАЗА 1 ==================== */

.fallingpickaxe-spinner-phase1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.fallingpickaxe-spinner-phase1.fp-collide {
    transform: scale(0.7);
    opacity: 0;
}

.fallingpickaxe-spinner-bet {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.fallingpickaxe-spinner-bet-label {
    font-size: 10px;
    color: #a0b4e0;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

.fallingpickaxe-spinner-bet-value {
    font-size: 26px;
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.fp-spinner-star-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

.fallingpickaxe-spinner-x {
    font-size: 32px;
    color: #ffd700;
    font-weight: 800;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.7);
    flex-shrink: 0;
}

/* ==================== СПИННЕР-БАРАБАН ==================== */

.fallingpickaxe-spinner-wheel {
    position: relative;
    width: 100px;
    height: 64px;
    overflow: hidden;
    flex-shrink: 0;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 15%,
        #000 85%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 15%,
        #000 85%,
        transparent 100%
    );
}

.fallingpickaxe-spinner-reel {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.fallingpickaxe-spinner-item {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.6);
    flex-shrink: 0;
    letter-spacing: 1px;
}

/* ==================== ФАЗА 2 ==================== */

.fallingpickaxe-spinner-phase2 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 140px;
    animation: fp-boom-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fp-boom-in {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.fallingpickaxe-spinner-boom {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(240, 136, 62, 0.4) 40%, transparent 70%);
    pointer-events: none;
    opacity: 0;
}

.fallingpickaxe-spinner-boom.fp-boom-active {
    animation: fp-boom-expand 0.8s ease-out;
}

@keyframes fp-boom-expand {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
}

.fallingpickaxe-spinner-final {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.fallingpickaxe-spinner-final-label {
    font-size: 13px;
    color: #a0b4e0;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
}

.fallingpickaxe-spinner-final-win {
    font-size: 36px;
    font-weight: 800;
    color: #ffd700;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.4);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fallingpickaxe-spinner-final-win .fp-spinner-star-icon {
    width: 32px;
    height: 32px;
}

/* ==================== РЕЗУЛЬТАТ ==================== */

.fallingpickaxe-result-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    animation: fp-fade-in 0.3s ease-out;
}

.fallingpickaxe-result-text {
    font-size: 22px;
    font-weight: 800;
    color: #ffd700;
    text-align: center;
    padding: 0 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    letter-spacing: 1px;
    line-height: 1.4;
}