/* --- ГЛОБАЛЬНАЯ БЛОКИРОВКА СКРОЛЛА --- */
html, body {
    overflow: hidden; /* Запрещаем скролл вообще */
    height: 100%;
    margin: 0; padding: 0;
    overscroll-behavior: none; /* Убираем эффект "резинки" на iOS/Android */
    position: fixed; /* Гвоздями прибиваем к экрану */
    width: 100%;
}

/* --- СТОЛ --- */
.tarot-table {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    position: relative;
    z-index: 20;
}

.tarot-bg-glow {
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(204, 255, 0, 0.05) 0%, rgba(0,0,0,0) 70%);
    position: absolute; top: 0; left: 0;
}

.tarot-instruction {
    font-family: 'Unbounded';
    text-align: center;
    margin-bottom: 40px;
    font-size: 14px;
    letter-spacing: 2px;
    opacity: 0.8;
    color: #fff;
    animation: pulseText 3s infinite;
    pointer-events: none;
}

@keyframes pulseText {
    0% { opacity: 0.4; }
    50% { opacity: 1; text-shadow: 0 0 10px var(--accent); }
    100% { opacity: 0.4; }
}

/* --- КАРТА (КОНТЕЙНЕР) --- */
.deck-container {
    width: 240px;
    height: 420px; 
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    pointer-events: auto !important;
    z-index: 50;
    /* Убираем лишние тапы на мобилках */
    -webkit-tap-highlight-color: transparent; 
}
.deck-container:active { transform: scale(0.97); }

.tarot-card {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tarot-card.flipped { transform: rotateY(180deg); }

.card-inner {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d;
}

.card-face {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    overflow: hidden;
}

/* --- РУБАШКА --- */
.card-back {
    background: #0a0a0a;
    background-image: 
        linear-gradient(45deg, #111 25%, transparent 25%, transparent 75%, #111 75%, #111),
        linear-gradient(45deg, #111 25%, transparent 25%, transparent 75%, #111 75%, #111);
    background-size: 20px 20px;
    border: 1px solid #333;
    display: flex; align-items: center; justify-content: center;
}
.back-design {
    width: 90%; height: 93%;
    border: 2px solid var(--accent);
    border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    box-shadow: inset 0 0 15px rgba(204, 255, 0, 0.2);
}
.back-design::after {
    content: '👁'; font-size: 40px;
    color: var(--accent); text-shadow: 0 0 10px var(--accent);
}

/* --- ЛИЦЕВАЯ СТОРОНА --- */
.card-front {
    background: #000;
    transform: rotateY(180deg);
}
.card-art {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    z-index: 1;
}
.card-overlay { display: none; } 

.card-border {
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0; 
    border: 2px solid var(--accent);
    border-radius: 16px;
    z-index: 3;
    box-shadow: inset 0 0 15px rgba(204, 255, 0, 0.4);
    pointer-events: none; /* Пропускаем клики сквозь рамку */
}

/* --- ПАНЕЛЬ ТОЛКОВАНИЯ (ШТОРКА) --- */
.tarot-reader {
    position: fixed; bottom: 0; left: 0; width: 100%;
    height: 80vh; 
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid #333;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 100;
    pointer-events: auto !important;
    display: flex; flex-direction: column;
    touch-action: none; /* Запрещаем скролл страницы при касании шторки */
}

.tarot-reader.open { transform: translateY(0); }

.sheet-handle-area {
    width: 100%; height: 50px; /* Чуть больше зона захвата */
    flex-shrink: 0;
    display: flex; justify-content: center; align-items: center;
    cursor: grab;
    background: transparent;
}
.sheet-handle-bar {
    width: 60px; height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

/* Контент внутри шторки - ТОЛЬКО ОН СКРОЛЛИТСЯ */
.reader-content {
    flex: 1;
    padding: 0 20px 80px 20px;
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; /* Инерционный скролл на iOS */
    overscroll-behavior: contain; /* Скролл не передается родителю */
}

.arcana-title {
    font-family: 'Unbounded'; font-size: 22px; color: var(--accent);
    margin: 10px 0 20px 0;
    text-transform: uppercase;
}
.arcana-desc {
    font-family: 'Manrope'; font-size: 16px; color: #ccc;
    line-height: 1.6; margin-bottom: 30px;
}

.tarot-btn {
    width: 100%; padding: 18px;
    background: var(--accent); color: #000;
    border: none; border-radius: 12px;
    font-family: 'Unbounded'; font-weight: 800; font-size: 14px;
    cursor: pointer;
    margin-bottom: 40px; 
}
