/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --wood-dark: #3d2914;
    --wood-medium: #5c3d1e;
    --wood-light: #8b5a2b;
    --wood-grain: #4a3520;
    --gold: #d4af37;
    --gold-dim: #b8960c;
    --gold-bright: #ffd700;
    --candle-orange: #ff9500;
    --candle-yellow: #ffcc00;
    --parchment: #f4e4bc;
    --parchment-dark: #d4c4a0;
    --ink: #1a1a2e;
    --ink-light: #2d2d44;
    --mystic-purple: #4a0e4e;
    --mystic-blue: #1a237e;
    --shadow: rgba(0, 0, 0, 0.5);
    --glow: rgba(255, 200, 100, 0.3);
}

/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    min-height: 100vh;
    color: var(--parchment);
    overflow-x: hidden;
    position: relative;
}

/* ===== СВЕЧНОЕ ОСВЕЩЕНИЕ ===== */
.candle-glow {
    position: fixed;
    top: 10%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse at center,
            rgba(255, 150, 50, 0.15) 0%,
            rgba(255, 100, 0, 0.08) 30%,
            transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: flicker 3s ease-in-out infinite alternate;
}

.candle-glow-2 {
    top: 20%;
    left: auto;
    right: 15%;
    width: 500px;
    height: 500px;
    animation: flicker 2.5s ease-in-out infinite alternate-reverse;
}

@keyframes flicker {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    25% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }

    75% {
        opacity: 0.7;
        transform: scale(0.99);
    }
}

/* ===== МАГИЧЕСКИЕ СИМВОЛЫ ===== */
.magic-symbols {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ctext x='50' y='50' text-anchor='middle' dominant-baseline='middle' font-size='30' fill='%23d4af37'%3E☽%3C/text%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Ctext x='75' y='75' text-anchor='middle' dominant-baseline='middle' font-size='40' fill='%23d4af37'%3E⛤%3C/text%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='60' y='60' text-anchor='middle' dominant-baseline='middle' font-size='35' fill='%23d4af37'%3E☉%3C/text%3E%3C/svg%3E");
    background-position: 10% 20%, 80% 60%, 50% 90%;
    background-repeat: no-repeat;
}

/* ===== ЗАГОЛОВОК ===== */
header {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--gold);
    text-shadow:
        0 0 10px var(--candle-orange),
        0 0 20px rgba(255, 150, 50, 0.5),
        0 0 40px rgba(255, 100, 0, 0.3);
    letter-spacing: 0.2em;
    animation: titleGlow 4s ease-in-out infinite alternate;
}

@keyframes titleGlow {

    0%,
    100% {
        text-shadow:
            0 0 10px var(--candle-orange),
            0 0 20px rgba(255, 150, 50, 0.5),
            0 0 40px rgba(255, 100, 0, 0.3);
    }

    50% {
        text-shadow:
            0 0 15px var(--candle-orange),
            0 0 30px rgba(255, 150, 50, 0.6),
            0 0 50px rgba(255, 100, 0, 0.4);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--parchment-dark);
    margin-top: 0.5rem;
    font-style: italic;
    letter-spacing: 0.1em;
}

/* ===== ВКЛАДКИ ===== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.tab-btn {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(180deg, var(--wood-medium) 0%, var(--wood-dark) 100%);
    border: 2px solid var(--wood-grain);
    border-radius: 8px 8px 0 0;
    color: var(--parchment-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 8px var(--shadow);
}

.tab-btn:hover {
    background: linear-gradient(180deg, var(--wood-light) 0%, var(--wood-medium) 100%);
    color: var(--gold);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(180deg, var(--wood-light) 0%, var(--wood-medium) 100%);
    color: var(--gold);
    border-bottom-color: var(--wood-medium);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 15px rgba(212, 175, 55, 0.3);
}

.tab-icon {
    font-size: 1.3rem;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ПАНЕЛЬ УПРАВЛЕНИЯ ===== */
.controls {
    background: linear-gradient(135deg, rgba(60, 40, 20, 0.9) 0%, rgba(40, 25, 15, 0.95) 100%);
    border: 1px solid var(--wood-grain);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 15px var(--shadow);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--gold-dim);
    letter-spacing: 0.05em;
}

.control-group select {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(180deg, var(--wood-dark) 0%, #2a1a0a 100%);
    border: 1px solid var(--gold-dim);
    border-radius: 6px;
    color: var(--parchment);
    cursor: pointer;
    min-width: 200px;
    transition: all 0.3s ease;
}

.control-group select:hover,
.control-group select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    outline: none;
}

.control-group select option {
    background: var(--wood-dark);
    color: var(--parchment);
}

/* ===== СЕЛЕКТОР КОЛОД ===== */
.deck-selector-container {
    background: linear-gradient(135deg, rgba(60, 40, 20, 0.9) 0%, rgba(40, 25, 15, 0.95) 100%);
    border: 1px solid var(--wood-grain);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 15px var(--shadow);
}

.deck-label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--gold-dim);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-align: center;
}

.deck-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.deck-option {
    width: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.deck-option:hover {
    transform: translateY(-5px);
}

.deck-option.active {
    transform: scale(1.05);
}

.deck-option.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--gold);
    color: var(--ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px var(--shadow);
    z-index: 5;
}

.deck-cover {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    border: 3px solid var(--wood-grain);
    object-fit: cover;
    box-shadow:
        0 4px 10px var(--shadow),
        0 0 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.deck-option:hover .deck-cover {
    border-color: var(--gold-dim);
    box-shadow:
        0 8px 20px var(--shadow),
        0 0 20px rgba(212, 175, 55, 0.2);
}

.deck-option.active .deck-cover {
    border-color: var(--gold);
    box-shadow:
        0 8px 20px var(--shadow),
        0 0 25px rgba(212, 175, 55, 0.4);
}

/* CSS-заглушка для колод без изображения */
.deck-cover-placeholder {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    border: 3px solid var(--wood-grain);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow:
        0 4px 10px var(--shadow),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.deck-cover-placeholder .deck-symbol {
    font-size: 2.5rem;
}

.deck-option:hover .deck-cover-placeholder {
    border-color: var(--gold-dim);
}

.deck-option.active .deck-cover-placeholder {
    border-color: var(--gold);
    box-shadow:
        0 8px 20px var(--shadow),
        0 0 25px rgba(212, 175, 55, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.deck-name {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    color: var(--parchment-dark);
    text-align: center;
    margin-top: 0.5rem;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.deck-option:hover .deck-name,
.deck-option.active .deck-name {
    color: var(--gold);
}

/* Стили цветов для заглушек колод */
.deck-placeholder-manara {
    background: linear-gradient(135deg, #8b0a50 0%, #4a0530 100%);
}

.deck-placeholder-russian {
    background: linear-gradient(135deg, #b22222 0%, #5a1111 100%);
}

.deck-placeholder-gothic {
    background: linear-gradient(135deg, #2f4f4f 0%, #0a0a0a 100%);
}

.deck-placeholder-etteilla {
    background: linear-gradient(135deg, #556b2f 0%, #2a3517 100%);
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.action-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(180deg, var(--mystic-purple) 0%, #2a0a2e 100%);
    border: 1px solid var(--gold-dim);
    border-radius: 8px;
    color: var(--parchment);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 8px var(--shadow);
}

.action-btn:hover {
    background: linear-gradient(180deg, #6a1e6e 0%, var(--mystic-purple) 100%);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow:
        0 6px 12px var(--shadow),
        0 0 15px rgba(212, 175, 55, 0.2);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn-danger {
    background: linear-gradient(180deg, #8b0000 0%, #4a0000 100%);
}

.action-btn-danger:hover {
    background: linear-gradient(180deg, #a52a2a 0%, #8b0000 100%);
}

.btn-icon {
    font-size: 1.1rem;
}

/* ===== ИНФОРМАЦИЯ О КОЛОДЕ ===== */
.deck-info,
.rune-bag-info {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--gold-dim);
    font-style: italic;
}

/* ===== СТОЛ ===== */
.table {
    background:
        /* Текстура дерева */
        repeating-linear-gradient(90deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px),
        repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 50px,
            rgba(139, 90, 43, 0.1) 50px,
            rgba(139, 90, 43, 0.1) 52px),
        /* Базовый градиент дерева */
        linear-gradient(180deg,
            var(--wood-medium) 0%,
            var(--wood-dark) 30%,
            var(--wood-medium) 50%,
            var(--wood-dark) 70%,
            var(--wood-medium) 100%);
    border: 8px solid var(--wood-grain);
    border-radius: 20px;
    min-height: 400px;
    padding: 2rem;
    position: relative;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.5),
        inset 0 0 100px rgba(0, 0, 0, 0.3),
        0 10px 30px var(--shadow),
        0 0 60px rgba(255, 150, 50, 0.1);
    overflow: hidden;
}

/* Магические знаки на столе */
.table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='80' fill='none' stroke='%23d4af37' stroke-width='0.5' opacity='0.1'/%3E%3Cpolygon points='100,20 115,70 170,70 125,100 145,155 100,125 55,155 75,100 30,70 85,70' fill='none' stroke='%23d4af37' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%23d4af37' stroke-width='0.3' opacity='0.08'/%3E%3Ccircle cx='50' cy='50' r='30' fill='none' stroke='%23d4af37' stroke-width='0.3' opacity='0.08'/%3E%3Ccircle cx='50' cy='50' r='20' fill='none' stroke='%23d4af37' stroke-width='0.3' opacity='0.08'/%3E%3C/svg%3E");
    background-position: center, 20% 80%;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.8;
}

/* ===== МЕСТА ДЛЯ КАРТ ТАРО ===== */
.tarot-table {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
}

.card-slot {
    width: 100px;
    height: 150px;
    border: 2px dashed rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.card-slot::before {
    content: attr(data-position);
    position: absolute;
    top: -25px;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    color: var(--gold-dim);
    opacity: 0.7;
}

.card-slot.filled {
    border-color: transparent;
    background: transparent;
}

/* ===== КАРТЫ ТАРО ===== */
.tarot-card {
    width: 100px;
    height: 150px;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    box-shadow:
        0 4px 15px var(--shadow),
        0 0 20px rgba(212, 175, 55, 0.2);
}

.tarot-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow:
        0 15px 30px var(--shadow),
        0 0 30px rgba(212, 175, 55, 0.4);
}

.tarot-card .card-front {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: linear-gradient(135deg, var(--parchment) 0%, var(--parchment-dark) 100%);
    border: 3px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    pointer-events: none;
}

.card-number {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    color: var(--ink);
    text-align: center;
    font-weight: 600;
}

.card-symbol {
    font-size: 2.5rem;
    color: var(--ink);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-name {
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    color: var(--ink);
    text-align: center;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}

/* Кнопка информации на карте */
.info-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--wood-dark);
    color: var(--ink);
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 5px var(--shadow);
}

.info-btn:hover {
    background: var(--gold-bright);
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--gold);
}

/* ===== МЕСТА ДЛЯ РУН ===== */
.rune-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.rune-slot {
    width: 80px;
    height: 100px;
    border: 2px dashed rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.rune-slot.filled {
    border-color: transparent;
    background: transparent;
}

/* ===== РУНЫ ===== */
.rune {
    width: 80px;
    height: 100px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    /* Камень */
    background:
        radial-gradient(ellipse at 30% 30%, #9a9a9a 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, #4a4a4a 0%, transparent 50%),
        linear-gradient(135deg, #7a7a7a 0%, #5a5a5a 50%, #3a3a3a 100%);
    border: 2px solid #8a8a8a;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 4px 15px var(--shadow);
}

.rune::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    pointer-events: none;
}

.rune:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 10px 25px var(--shadow),
        0 0 20px rgba(212, 175, 55, 0.3);
}

.rune-symbol {
    font-size: 2.5rem;
    color: var(--gold);
    text-shadow:
        0 0 5px var(--gold-dim),
        0 2px 2px rgba(0, 0, 0, 0.5);
}

.rune-name {
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    color: var(--parchment);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background:
        linear-gradient(135deg, rgba(60, 40, 20, 0.98) 0%, rgba(30, 20, 10, 0.98) 100%);
    border: 3px solid var(--gold-dim);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 0 50px rgba(212, 175, 55, 0.3),
        0 20px 60px var(--shadow);
    animation: modalSlide 0.3s ease;
}

.modal-small {
    max-width: 300px;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--wood-dark);
    border: 1px solid var(--gold-dim);
    color: var(--parchment);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--gold-dim);
    color: var(--ink);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gold-dim);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-icon {
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 0 0 10px var(--candle-orange);
}

.modal-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--gold);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--gold-dim);
    margin-bottom: 0.5rem;
}

.modal-body p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--parchment);
    margin-bottom: 1rem;
}

.modal-body ul {
    list-style: none;
    padding-left: 0;
}

.modal-body li {
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.modal-body li::before {
    content: '✧';
    position: absolute;
    left: 0;
    color: var(--gold-dim);
}

/* ===== ДИАЛОГ ВЫБОРА НОМЕРА ===== */
.number-input-group {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    justify-content: center;
    align-items: center;
}

.number-input-group input {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    padding: 0.8rem 1rem;
    width: 100px;
    text-align: center;
    background: var(--wood-dark);
    border: 2px solid var(--gold-dim);
    border-radius: 8px;
    color: var(--gold);
}

.number-input-group input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* ===== ЗАГОЛОВКИ РУН ===== */
.rune-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--gold);
    text-align: center;
    margin: 0;
}

.rune-description {
    text-align: center;
    color: var(--parchment-dark);
    font-style: italic;
}

/* ===== ФУТЕР ===== */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--gold-dim);
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .tabs {
        gap: 0.3rem;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .tab-btn span:not(.tab-icon) {
        display: none;
    }

    .control-group select {
        min-width: 150px;
    }

    .action-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .card-slot {
        width: 80px;
        height: 120px;
    }

    .tarot-card {
        width: 80px;
        height: 120px;
    }

    .card-symbol {
        font-size: 2rem;
    }

    .card-name {
        font-size: 0.5rem;
    }

    .rune {
        width: 70px;
        height: 90px;
    }

    .rune-symbol {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        letter-spacing: 0.1em;
    }

    .controls {
        padding: 1rem;
        gap: 1rem;
    }

    .actions {
        gap: 0.5rem;
    }

    .action-btn .btn-icon {
        display: none;
    }

    .table {
        padding: 1rem;
        min-height: 300px;
    }
}

/* ===== АНИМАЦИИ КАРТ ===== */
@keyframes cardDeal {
    from {
        opacity: 0;
        transform: translateY(-50px) rotateY(90deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateY(0);
    }
}

.tarot-card.dealt,
.rune.dealt {
    animation: cardDeal 0.5s ease forwards;
}

/* ===== ЭФФЕКТ ПЕРЕМЕШИВАНИЯ ===== */
@keyframes shuffle {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px) rotate(-2deg);
    }

    75% {
        transform: translateX(5px) rotate(2deg);
    }
}

.shuffling {
    animation: shuffle 0.15s ease-in-out 5;
}

/* ===== ЦВЕТА МАСТЕЙ ===== */
.suit-wands .card-symbol {
    color: #8B4513;
}

.suit-cups .card-symbol {
    color: #1E90FF;
}

.suit-swords .card-symbol {
    color: #708090;
}

.suit-pentacles .card-symbol {
    color: #DAA520;
}

.suit-major .card-symbol {
    color: #4B0082;
}