/* ============================================================
   CHEST + FATH WHEEL + CARD ANIMATIONS — v2
   ============================================================ */

/* ============================================================
   ОКНО ВЫБОРА СУНДУКОВ
   ============================================================ */
.chest-selector-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.chest-selector-overlay.active { opacity: 1; }
.chest-selector-overlay.closing { opacity: 0; }

.chest-selector-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #0a0508 0%, #1a1410 100%);
    z-index: 0;
}

.chest-selector-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 24px 16px 40px;
    box-sizing: border-box;
    color: #fff;
}

.chest-selector-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
}

.chest-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 24px;
    padding: 0 8px;
}
.chest-selector-title {
    font-family: 'Amiri', serif;
    font-size: 24px;
    font-weight: 600;
    color: #f4d03f;
    text-shadow: 0 0 8px rgba(244, 208, 63, 0.4);
}
.chest-selector-stars {
    font-size: 16px;
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.1);
    border: 1px solid rgba(244, 208, 63, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
}

/* ===== СЕТКА 4 СУНДУКОВ ===== */
.chest-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.chest-card-select {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.3) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.chest-card-select:active { transform: scale(0.97); }
.chest-card-select.chest-locked-cost { opacity: 0.4; cursor: not-allowed; }

/* Анимация трясущегося сундука */
.chest-svg-wrapper {
    width: 100px;
    height: 80px;
    margin: 0 auto 8px;
    animation: chestShake 3s ease-in-out infinite;
    transform-origin: center bottom;
}
@keyframes chestShake {
    0%, 100% { transform: rotate(0); }
    10% { transform: rotate(-2deg); }
    20% { transform: rotate(2deg); }
    30% { transform: rotate(-1deg); }
    40% { transform: rotate(1deg); }
    50% { transform: rotate(0); }
}

.chest-svg { display: block; margin: 0 auto; }

/* Деревянный — золотой контур и свечение */
.chest-card-select.chest-wooden { border-color: #f4d03f; box-shadow: 0 0 16px rgba(244, 208, 63, 0.15); }
.chest-card-select.chest-wooden .chest-name-line { color: #f4d03f; }
.chest-card-select.chest-wooden .chest-cost-line { color: #f4d03f; }

/* Серебряный */
.chest-card-select.chest-silver { border-color: #dde8f4; box-shadow: 0 0 16px rgba(221, 232, 244, 0.18); }
.chest-card-select.chest-silver .chest-name-line { color: #dde8f4; }
.chest-card-select.chest-silver .chest-cost-line { color: #dde8f4; }

/* Золотой */
.chest-card-select.chest-gold {
    border-color: #ffe066;
    box-shadow: 0 0 24px rgba(255, 224, 102, 0.3);
    background: linear-gradient(180deg, rgba(255, 224, 102, 0.12) 0%, rgba(40, 24, 0, 0.4) 100%);
}
.chest-card-select.chest-gold .chest-name-line { color: #ffe066; }
.chest-card-select.chest-gold .chest-cost-line { color: #ffe066; }
.chest-card-select.chest-gold::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(255, 224, 102, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Изумрудный — сильное свечение */
.chest-card-select.chest-emerald {
    border-color: #5dcaa5;
    box-shadow: 0 0 28px rgba(93, 202, 165, 0.4);
    background: linear-gradient(180deg, rgba(93, 202, 165, 0.15) 0%, rgba(0, 32, 24, 0.4) 100%);
    animation: emeraldGlow 3s ease-in-out infinite;
}
@keyframes emeraldGlow {
    0%, 100% { box-shadow: 0 0 28px rgba(93, 202, 165, 0.4); }
    50% { box-shadow: 0 0 40px rgba(93, 202, 165, 0.7); }
}
.chest-card-select.chest-emerald .chest-name-line { color: #5dcaa5; }
.chest-card-select.chest-emerald .chest-cost-line { color: #5dcaa5; }

.chest-name-line {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px;
}
.chest-arabic-line {
    font-family: 'Amiri', serif;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin: 0 0 4px;
    direction: rtl;
}
.chest-desc-line {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    margin: 0 0 8px;
    line-height: 1.3;
    min-height: 26px;
}
.chest-cost-line {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    padding: 6px 0 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================================
   СЕКЦИЯ ИСТОРИИ
   ============================================================ */
.chest-history-section,
.fath-history-section {
    margin: 16px 0 0;
    padding: 16px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
}

.chest-history-title,
.fath-history-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin: 0 0 12px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.chest-history-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    padding: 4px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}
.chest-history-tab {
    flex: 1;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.chest-history-tab.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.chest-history-list,
.fath-history-list {
    max-height: 240px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.history-item:last-child { border-bottom: none; }
.history-icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.history-text {
    flex: 1;
    min-width: 0;
}
.history-label {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.history-meta {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    margin-top: 1px;
}
.history-time {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
}

/* ============================================================
   КАРТЫ ИЗ СУНДУКА (КОЛЛЕКЦИЯ + ОТКРЫТИЕ)
   ============================================================ */
.chest-card,
.chest-card-mini {
    border-radius: 12px;
    padding: 12px;
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s;
}
.chest-card:active,
.chest-card-mini:active { transform: scale(0.97); }

.chest-card-rarity-badge {
    text-align: right;
    font-size: 9px;
    letter-spacing: 1px;
    font-weight: 500;
    z-index: 2;
    position: relative;
}

.chest-card-arabic {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    font-family: 'Amiri', 'Scheherazade', serif;
    direction: rtl;
    z-index: 2;
    position: relative;
    line-height: 1.1;
    text-align: center;
}
.chest-card .chest-card-arabic { font-size: 32px; }
.chest-card-mini .chest-card-arabic { font-size: 22px; }

.chest-card-bottom { z-index: 2; position: relative; }
.chest-card-card-name { font-size: 12px; font-weight: 600; margin: 0; text-align: center; }
.chest-card-card-title { font-size: 9px; margin: 2px 0 0; text-align: center; opacity: 0.8; }
.chest-card-mini .chest-card-card-name { font-size: 11px; }

/* Обычная */
.chest-card-common { background: #2a2a2e; border: 1px solid #3a3a3e; }
.chest-card-common .chest-card-rarity-badge { color: #8a8a8e; }
.chest-card-common .chest-card-arabic { color: #b0b0b4; }
.chest-card-common .chest-card-card-name { color: #d0d0d4; }
.chest-card-common .chest-card-card-title { color: #6a6a6e; }

/* Редкая */
.chest-card-rare { background: #1a2030; border: 1px solid #2a4a7a; }
.chest-card-rare .chest-card-rarity-badge { color: #5a8acf; }
.chest-card-rare .chest-card-arabic { color: #a0c4f0; }
.chest-card-rare .chest-card-card-name { color: #b0c4e8; }
.chest-card-rare .chest-card-card-title { color: #5a8acf; }

/* Эпическая */
.chest-card-epic { background: #1f1530; border: 1px solid #6a3aa8; }
.chest-card-epic .chest-card-rarity-badge { color: #a878d8; }
.chest-card-epic .chest-card-arabic { color: #d0a8f0; }
.chest-card-epic .chest-card-card-name { color: #d0a8f0; }
.chest-card-epic .chest-card-card-title { color: #a878d8; }

/* Легендарная — ВОДА + 3D + ОРБИТА */
.chest-card-legendary {
    background: linear-gradient(180deg, #021830 0%, #043860 100%);
    border: 2px solid #4ac8ff;
    box-shadow: 0 0 20px rgba(74, 200, 255, 0.4);
}
.chest-card-legendary .chest-card-rarity-badge { color: #88dcff; }
.chest-card-legendary .chest-card-arabic { color: #d0eeff; text-shadow: 0 0 12px rgba(136, 220, 255, 0.7); }
.chest-card-legendary .chest-card-card-name { color: #d0eeff; }
.chest-card-legendary .chest-card-card-title { color: #88dcff; }

.chest-card-legendary.chest-card-animated {
    animation: legendaryFloat3d 4s ease-in-out infinite, legendaryPulseGlow 3s ease-in-out infinite;
    transform-style: preserve-3d;
}
@keyframes legendaryFloat3d {
    0%, 100% { transform: rotateY(-6deg) rotateX(2deg); }
    50%      { transform: rotateY(6deg) rotateX(-2deg); }
}
@keyframes legendaryPulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(74, 200, 255, 0.4); }
    50%      { box-shadow: 0 0 32px rgba(74, 200, 255, 0.7); }
}

.chest-card-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 1;
}
.chest-card-orbit span { position: absolute; color: #88dcff; font-size: 7px; }
.chest-card-orbit span:nth-child(1) { animation: legendaryOrbit 5s linear infinite; }
.chest-card-orbit span:nth-child(2) { animation: legendaryOrbit 5s linear infinite -1.6s; font-size: 5px; color: #ddeeff; }
.chest-card-orbit span:nth-child(3) { animation: legendaryOrbit 5s linear infinite -3.3s; font-size: 6px; color: #4ac8ff; }
@keyframes legendaryOrbit {
    0%   { transform: rotate(0deg) translateX(38px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(38px) rotate(-360deg); }
}

/* Мифическая */
.chest-card-mythic {
    background: linear-gradient(135deg, #0a0218, #2a1048, #0a0218, #4a1080, #0a0218);
    background-size: 300% 300%;
    border: 2px solid #c060ff;
    box-shadow: 0 0 30px rgba(180, 80, 255, 0.5);
}
.chest-card-mythic .chest-card-rarity-badge { color: #c060ff; font-weight: 600; }
.chest-card-mythic .chest-card-arabic { color: #fff; text-shadow: 0 0 14px rgba(192, 96, 255, 0.9); }
.chest-card-mythic .chest-card-card-name { color: #fff; }
.chest-card-mythic .chest-card-card-title { color: #c060ff; }

.chest-card-mythic.chest-card-animated {
    animation: mythicHologramShift 5s ease-in-out infinite,
               legendaryFloat3d 4s ease-in-out infinite,
               mythicPulseGlow 3s ease-in-out infinite;
    transform-style: preserve-3d;
}
@keyframes mythicHologramShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@keyframes mythicPulseGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(180, 80, 255, 0.5); }
    50%      { box-shadow: 0 0 50px rgba(180, 80, 255, 0.9); }
}
.chest-card-orbit-mythic span:nth-child(1) { animation: legendaryOrbit 4s linear infinite; color: #fff; }
.chest-card-orbit-mythic span:nth-child(2) { animation: legendaryOrbit 4s linear infinite -1s; color: #c060ff; }
.chest-card-orbit-mythic span:nth-child(3) { animation: legendaryOrbit 4s linear infinite -2s; color: #fff; }
.chest-card-orbit-mythic span:nth-child(4) { animation: legendaryOrbit 4s linear infinite -3s; color: #c060ff; }

.chest-card-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    animation: mythicShimmer 3.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
@keyframes mythicShimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

/* Заблокированная */
/* Заблокированная — ПОЛНОСТЬЮ СКРЫТАЯ */
.chest-card-hidden {
    background: #12141a !important;
    border: 1px dashed rgba(255,255,255,0.08) !important;
    box-shadow: none !important;
    animation: none !important;
}
.chest-card-locked {
    filter: grayscale(0.85) brightness(0.45);
    border: 1px dashed #555 !important;
    box-shadow: none !important;
    animation: none !important;
}
.chest-card-locked .chest-card-arabic { color: #555 !important; text-shadow: none !important; }
.chest-card-locked .chest-card-orbit, .chest-card-locked .chest-card-shimmer { display: none; }
.chest-card-locked::after {
    content: '🔒';
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 14px;
    opacity: 0.7;
}

/* ============================================================
   FULLSCREEN АНИМАЦИЯ ОТКРЫТИЯ КАРТЫ
   ============================================================ */
.chest-opening {
    position: fixed;
    inset: 0;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.chest-opening.active { opacity: 1; }
.chest-opening.closing { opacity: 0; }

.chest-opening-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.chest-opening-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    text-align: center;
    box-sizing: border-box;
}

.chest-opening-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 360px;
}

/* Сундук на стадии открытия */
.chest-shake-wrapper {
    width: 220px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: chestOpeningShake 1.5s ease-in-out;
    transform-origin: center bottom;
}
.chest-shake-wrapper .chest-svg {
    width: 200px;
    height: 160px;
}
@keyframes chestOpeningShake {
    0%, 100% { transform: rotate(0) scale(1); }
    10% { transform: rotate(-3deg) scale(1.05); }
    20% { transform: rotate(3deg) scale(1.05); }
    30% { transform: rotate(-3deg) scale(1.1); }
    40% { transform: rotate(3deg) scale(1.1); }
    50% { transform: rotate(-2deg) scale(1.15); }
    60% { transform: rotate(2deg) scale(1.15); }
    70% { transform: rotate(-1deg) scale(1.2); }
    80% { transform: rotate(1deg) scale(1.2); }
    100% { transform: rotate(0) scale(1.3); opacity: 0.3; }
}
.chest-opening-hint {
    color: #f4d03f;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(244, 208, 63, 0.5);
    animation: hintPulse 1s ease-in-out infinite;
}
@keyframes hintPulse {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

.chest-rarity-label {
    font-size: 13px;
    letter-spacing: 4px;
    margin: 0 0 4px;
    font-weight: 600;
    animation: chestLabelDrop 0.6s ease-out;
}
.chest-rarity-chance {
    font-size: 11px;
    margin: 0 0 24px;
    opacity: 0.8;
    animation: chestLabelDrop 0.6s ease-out 0.1s backwards;
}

.chest-card-wrapper {
    width: 220px;
    max-width: 70vw;
    margin: 0 0 24px;
    animation: chestCardReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}
.chest-card-wrapper .chest-card {
    aspect-ratio: 3/4;
    width: 100%;
}
.chest-card-wrapper .chest-card-arabic { font-size: 56px; }
.chest-card-wrapper .chest-card-card-name { font-size: 16px; }
.chest-card-wrapper .chest-card-card-title { font-size: 11px; }
.chest-card-wrapper .chest-card-rarity-badge { font-size: 11px; }

@keyframes chestCardReveal {
    0%   { opacity: 0; transform: scale(0.3) rotateY(180deg); }
    50%  { opacity: 1; transform: scale(1.1) rotateY(0deg); }
    100% { transform: scale(1) rotateY(0deg); }
}
@keyframes chestLabelDrop {
    0%   { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.chest-card-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
    animation: chestLabelDrop 0.6s ease-out 1s backwards;
}
.chest-card-title {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 16px;
    animation: chestLabelDrop 0.6s ease-out 1.1s backwards;
}
.chest-card-story {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 0 32px;
    animation: chestLabelDrop 0.6s ease-out 1.3s backwards;
}

.chest-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    animation: chestLabelDrop 0.6s ease-out 1.6s backwards;
}
.chest-btn-primary {
    background: linear-gradient(180deg, #d4a937 0%, #8b6914 100%);
    color: #1a1004;
    border: none;
    padding: 12px 28px;
    border-radius: 26px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.chest-btn-primary:active { transform: scale(0.96); }
.chest-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 12px 28px;
    border-radius: 26px;
    font-size: 14px;
    cursor: pointer;
}
.chest-btn-secondary:active { transform: scale(0.96); }

/* Капли воды (легендарная) */
.water-particles { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.water-drop {
    position: absolute;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #88dcff 0%, #4ac8ff 60%, transparent 100%);
    opacity: 0;
    animation: waterDropRise 3s linear infinite;
}
@keyframes waterDropRise {
    0%   { transform: translateY(0); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

/* Звёзды (мифическая) */
.mythic-stars { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.mythic-star {
    position: absolute;
    animation: mythicStarTwinkle 2.5s ease-in-out infinite;
    text-shadow: 0 0 4px currentColor;
}
@keyframes mythicStarTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50%      { opacity: 1;   transform: scale(1.2); }
}

/* ============================================================
   КОЛЕСО ФАТХ — ИСПРАВЛЕНО
   ============================================================ */
.fath-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.fath-overlay.active { opacity: 1; }
.fath-overlay.closing { opacity: 0; }

.fath-bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, #0a1830 0%, #050810 70%, #000 100%);
    z-index: 0;
}

.fath-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 20px 16px 40px;
    box-sizing: border-box;
    color: #fff;
}

.fath-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
}

.fath-header {
    text-align: center;
    margin: 8px 0 20px;
}
.fath-title-arabic {
    font-family: 'Amiri', serif;
    font-size: 32px;
    color: #f4d03f;
    text-shadow: 0 0 12px rgba(244, 208, 63, 0.5);
    margin-bottom: 4px;
}
.fath-title-russian {
    font-size: 13px;
    color: #88dcff;
    letter-spacing: 2px;
}
.fath-stars {
    display: inline-block;
    font-size: 16px;
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.1);
    border: 1px solid rgba(244, 208, 63, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 8px;
}

/* Сцена с колесом */
.fath-wheel-stage {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 20px;
}

/* Указатель сверху */
.fath-wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 22px solid #f4d03f;
    z-index: 30;
    filter: drop-shadow(0 0 6px rgba(244, 208, 63, 0.7));
}

/* Обёртка-DIV для вращения SVG (центрирование гарантировано) */
.fath-wheel-rotator-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.fath-wheel-rotator {
    width: 280px;
    height: 280px;
    transform-origin: center center;
    transform: rotate(0deg);
}
.fath-wheel-rotator svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Центральный круг (поверх) */
.fath-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    margin-left: -28px;
    margin-top: -28px;
    background: #1a1410;
    border: 3px solid #f4d03f;
    border-radius: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fath-wheel-center-arabic {
    font-family: 'Amiri', serif;
    font-size: 20px;
    color: #f4d03f;
    font-weight: 700;
}

.fath-message {
    text-align: center;
    font-size: 14px;
    color: #aaa;
    margin: 0 0 14px;
    min-height: 20px;
}

.fath-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}
.fath-btn-primary {
    background: linear-gradient(180deg, #d4a937 0%, #8b6914 100%);
    color: #1a1004;
    border: none;
    padding: 12px 32px;
    border-radius: 26px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.fath-btn-primary:active { transform: scale(0.96); }
.fath-btn-disabled {
    background: rgba(255,255,255,0.05);
    color: #666;
    border: 1px solid #333;
    padding: 12px 32px;
    border-radius: 26px;
    font-size: 13px;
    cursor: not-allowed;
}

/* ============================================================
   КОЛЛЕКЦИЯ — статистика и группы
   ============================================================ */
.chest-collection-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 16px;
}
.chest-stat-block {
    background: rgba(244, 208, 63, 0.1);
    border: 1px solid rgba(244, 208, 63, 0.3);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}
.chest-stat-num { font-size: 22px; font-weight: 700; color: #c0a040; }
.chest-stat-label { font-size: 11px; color: #8E8E93; margin-top: 2px; }

.chest-group { margin-bottom: 24px; }
.chest-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.chest-group-count { font-size: 12px; opacity: 0.7; }
.chest-collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
