/* ========================================
   Гадание на Рунах — Стили
   ======================================== */

.rune-divination-wrapper {
    --rune-bg: #1a1a2e;
    --rune-bg-card: #16213e;
    --rune-bg-dark: #0f0f23;
    --rune-gold: #c9a227;
    --rune-gold-light: #e0c050;
    --rune-gold-dark: #8b6914;
    --rune-text: #e0e0e0;
    --rune-text-muted: #888;
    --rune-text-dim: #666;
    --rune-border: #333;
    --rune-border-gold: #c9a227;
    --rune-shadow: rgba(0, 0, 0, 0.5);
    --rune-glow: rgba(201, 162, 39, 0.3);

    font-family: 'Georgia', 'Times New Roman', serif;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.rune-divination-container {
    background: var(--rune-bg);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 8px 40px var(--rune-shadow);
    border: 1px solid var(--rune-border);
}

/* Заголовок */
.rune-title {
    text-align: center;
    color: var(--rune-gold);
    margin: 0 0 8px 0;
    font-size: 36px;
    letter-spacing: 6px;
    font-weight: 700;
    text-shadow: 0 2px 10px var(--rune-glow);
}

.rune-subtitle {
    text-align: center;
    color: var(--rune-text-muted);
    margin: 0 0 28px 0;
    font-size: 16px;
    font-style: italic;
    letter-spacing: 1px;
}

/* Поле вопроса */
.rune-question-block {
    margin-bottom: 28px;
}

.rune-question-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--rune-border-gold);
    border-radius: 12px;
    background: var(--rune-bg-card);
    color: var(--rune-text);
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
}

.rune-question-input::placeholder {
    color: var(--rune-text-muted);
    opacity: 0.7;
}

.rune-question-input:focus {
    border-color: var(--rune-gold-light);
    box-shadow: 0 0 15px var(--rune-glow);
}

/* Слоты рун */
.rune-slots-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 36px 0;
    min-height: 160px;
    align-items: center;
    flex-wrap: wrap;
}

.rune-slot {
    width: 100px;
    height: 130px;
    border: 2px dashed var(--rune-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--rune-bg-dark);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rune-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(201, 162, 39, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.rune-slot:hover::before {
    opacity: 1;
}

.rune-slot-symbol {
    font-size: 52px;
    color: var(--rune-border);
    line-height: 1;
    transition: all 0.4s;
    z-index: 1;
}

.rune-slot-label {
    font-size: 11px;
    color: var(--rune-text-dim);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 1;
}

.rune-slot.active {
    border-style: solid;
    border-color: var(--rune-border-gold);
    background: var(--rune-bg);
    box-shadow: 0 0 25px var(--rune-glow);
}

.rune-slot.active .rune-slot-symbol {
    color: #fff;
    text-shadow: 0 0 15px var(--rune-glow);
}

.rune-slot.active .rune-slot-label {
    color: var(--rune-gold);
}

.rune-slot.spinning {
    border-color: var(--rune-gold-dark);
    animation: runePulse 0.15s ease-in-out;
}

.rune-slot.spinning .rune-slot-symbol {
    color: var(--rune-gold);
}

@keyframes runePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Кнопка */
.rune-action {
    text-align: center;
    margin: 28px 0;
}

.rune-cast-button {
    padding: 16px 56px;
    font-size: 18px;
    background: linear-gradient(135deg, var(--rune-gold), var(--rune-gold-dark));
    color: var(--rune-bg);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--rune-glow);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.rune-cast-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.rune-cast-button:hover::before {
    left: 100%;
}

.rune-cast-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 162, 39, 0.4);
}

.rune-cast-button:active {
    transform: translateY(-1px);
}

.rune-cast-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.rune-btn-icon {
    font-size: 22px;
    line-height: 1;
}

/* Карточки значений */
.rune-meanings {
    margin-top: 32px;
    animation: runeFadeInUp 0.7s ease;
}

@keyframes runeFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rune-meaning-card {
    background: var(--rune-bg-card);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 14px;
    border-left: 4px solid var(--rune-border-gold);
    transition: all 0.3s ease;
}

.rune-meaning-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.rune-meaning-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.rune-meaning-symbol {
    font-size: 36px;
    color: var(--rune-gold);
    line-height: 1;
    min-width: 40px;
    text-align: center;
    text-shadow: 0 0 10px var(--rune-glow);
}

.rune-meaning-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rune-meaning-position {
    font-size: 11px;
    color: var(--rune-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rune-meaning-name {
    font-size: 18px;
    color: #fff;
    font-weight: 700;
}

.rune-meaning-text {
    margin: 0;
    color: var(--rune-text);
    line-height: 1.7;
    font-size: 15px;
}

/* История */
.rune-history {
    margin-top: 28px;
    border-top: 1px solid var(--rune-border);
    padding-top: 20px;
}

.rune-history-title {
    color: var(--rune-text-dim);
    font-size: 12px;
    text-align: center;
    margin: 0 0 14px 0;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.rune-history-list {
    max-height: 160px;
    overflow-y: auto;
    padding-right: 4px;
}

.rune-history-list::-webkit-scrollbar {
    width: 4px;
}

.rune-history-list::-webkit-scrollbar-track {
    background: var(--rune-bg-dark);
    border-radius: 4px;
}

.rune-history-list::-webkit-scrollbar-thumb {
    background: var(--rune-border);
    border-radius: 4px;
}

.rune-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--rune-bg-dark);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.rune-history-item:hover {
    background: var(--rune-bg-card);
}

.rune-history-time {
    color: var(--rune-text-muted);
    min-width: 50px;
}

.rune-history-runes {
    color: var(--rune-gold);
    font-size: 20px;
    letter-spacing: 4px;
}

.rune-history-question {
    color: var(--rune-text-dim);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

/* Адаптивность */
@media (max-width: 600px) {
    .rune-divination-wrapper {
        padding: 10px;
    }

    .rune-divination-container {
        padding: 24px 16px;
    }

    .rune-title {
        font-size: 28px;
        letter-spacing: 3px;
    }

    .rune-slots-container {
        gap: 12px;
    }

    .rune-slot {
        width: 85px;
        height: 110px;
    }

    .rune-slot-symbol {
        font-size: 40px;
    }

    .rune-cast-button {
        padding: 14px 36px;
        font-size: 16px;
    }

    .rune-history-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    .rune-history-question {
        max-width: 100%;
        width: 100%;
        text-align: left;
        margin-top: 4px;
    }
}

/* Тема сайта — защита от конфликтов */
.rune-divination-wrapper * {
    box-sizing: border-box;
}

.rune-divination-wrapper input,
.rune-divination-wrapper button {
    -webkit-appearance: none;
    appearance: none;
}
