/* calc/assets/css/calculators/drop-chance.css */

/* --- Theme: Loot / Magic --- */
:root {
    --loot-primary: #7C3AED; /* Violet 600 */
    --loot-accent: #8B5CF6;  /* Violet 500 */
    --loot-bg: #F5F3FF;      /* Violet 50 */
    --loot-gold: #F59E0B;    /* Legendary Gold */
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }

/* Grid */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* Inputs */
.calc-inputs { gap: 24px; }
.input-group { margin-bottom: 24px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input {
    width: 100%; padding: 16px; padding-right: 60px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: border 0.2s;
    font-family: var(--font-main); background: #fff;
}
.input-wrapper input:focus {
    border-color: var(--loot-accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.suffix { position: absolute; right: 16px; color: var(--text-secondary); pointer-events: none; }
.helper-text { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* Switcher Buttons */
.switch-type-wrapper { display: flex; gap: 12px; }
.switch-type-wrapper input { display: none; }
.type-btn {
    flex: 1; padding: 12px; border: 1px solid #E5E7EB; border-radius: 12px;
    text-align: center; cursor: pointer; transition: all 0.2s;
    font-weight: 600; font-size: 14px; color: var(--text-secondary);
    background: #fff;
}
.switch-type-wrapper input:checked + .type-btn {
    border-color: var(--loot-primary); background: var(--loot-primary); color: #fff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

/* Range Slider */
.range-wrapper { margin-top: 10px; padding: 0 4px; }
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%;
    background: var(--loot-primary); cursor: pointer; margin-top: -8px;
    border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer; background: #E5E7EB; border-radius: 2px;
}

/* --- Result Card --- */
.card--loot { 
    background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 100%); 
    color: #fff; border: none; overflow: hidden; position: relative; 
}
@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

/* Killer Feature: Ring Animation */
.loot-visual {
    height: 160px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; position: relative; margin-bottom: 24px;
}

.progress-ring-container {
    position: relative; width: 120px; height: 120px;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(-90deg); transform-origin: 50% 50%;
}
.progress-ring__circle.val {
    stroke-linecap: round;
    stroke: #A78BFA; 
    filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.5));
}
.ring-icon {
    position: absolute; font-size: 40px;
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Glow Background */
.glow-effect {
    position: absolute; width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.4) 0%, transparent 70%);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    pointer-events: none; z-index: 1;
    transition: opacity 0.5s ease;
}

/* Data */
.result-data { text-align: center; }
.result-data h2 { font-size: 14px; text-transform: uppercase; color: rgba(255,255,255,0.8); letter-spacing: 1px; margin-bottom: 8px; }
.main-value { font-size: 56px; font-weight: 800; line-height: 1; margin-bottom: 8px; text-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* FIX: Улучшение контраста статуса */
.status-text { 
    font-size: 14px; 
    line-height: 1.4; 
    background: #fff; 
    color: var(--loot-primary); 
    padding: 8px 12px; 
    border-radius: 8px; 
    display: inline-block; 
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 24px 0; }

.guarantee-box {
    background: rgba(0,0,0,0.25); border-radius: 12px; padding: 16px;
    font-size: 14px;
}
.g-title { font-weight: 700; margin-bottom: 12px; text-transform: uppercase; font-size: 12px; opacity: 0.7; }
.g-row { display: flex; justify-content: space-between; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.g-row:last-child { margin: 0; padding: 0; border: 0; }
.g-row strong { font-size: 16px; }
.g-row.high-chance { color: #FCD34D; }

/* --- INFO WRAPPER STYLES (ОСНОВНЫЕ) --- */
.info-wrapper {
    padding: 60px 0 60px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.info-wrapper .container { max-width: 800px; margin: 0 auto; }

/* Headings */
.icon-heading {
    display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px;
    font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1.3;
}
.header-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 14px; background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04); flex-shrink: 0; margin-top: -4px;
}
.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }

/* Colors */
.violet-icon svg { color: var(--loot-primary); }

/* Formulas */
.formulas-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px;
}
.formula-card {
    background: #fff; border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); border-radius: 24px; padding: 24px;
    display: flex; flex-direction: column; transition: transform 0.3s;
}
.formula-card:hover { transform: translateY(-4px); }

.formula-header { margin-bottom: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.formula-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-primary); }

.badge-violet { background: #F5F3FF; color: #7C3AED; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-dark { background: #F3F4F6; color: #1F2937; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }

.math-expression {
    background: #F5F3FF; border: 1px solid #DDD6FE; padding: 12px;
    border-radius: 12px; font-weight: 700; color: #6D28D9; text-align: center;
    margin-bottom: 16px; font-size: 15px; font-family: monospace;
}
.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* Divider */
.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 48px 0; }

/* Article */
.calc-description p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description ul { color: var(--text-secondary); margin-bottom: 24px; padding-left: 20px; line-height: 1.6; }
.calc-description li { margin-bottom: 8px; }

/* FAQ */
.faq-loot-style .faq-item {
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
    margin-bottom: 12px; overflow: hidden; transition: all 0.2s;
}
.faq-loot-style .faq-item[open] { border-color: var(--loot-accent); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15); }

.faq-loot-style summary.faq-question {
    padding: 16px 20px; cursor: pointer; font-weight: 600; color: var(--text-primary);
    list-style: none; position: relative; display: flex; justify-content: space-between;
    align-items: center;
}
.faq-loot-style .faq-item[open] summary.faq-question { color: var(--loot-primary); background: #F5F3FF; }

.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); }
.faq-loot-style .faq-item[open] summary.faq-question::after { content: '−'; color: var(--loot-primary); }

.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }

/* --- MOBILE ADAPTATION (Проверено и исправлено) --- */
@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; }
    
    .icon-heading { font-size: 20px; gap: 12px; margin-bottom: 20px; }
    .header-icon { width: 40px; height: 40px; }
    .header-icon svg { width: 20px; height: 20px; }
    
    /* FIX: Общая центровка текста в блоке информации */
    .intro-text, 
    .calc-description p,
    .formula-card p {
        text-align: center; /* Центрируем абзацы */
    }

    /* FIX: Списки и их центровка */
    .calc-description ul {
        padding-left: 0; /* Убираем стандартный отступ для центровки */
        list-style: none; /* Убираем маркеры, чтобы текст центрировался ровно */
        text-align: center;
    }
    .calc-description li {
        text-align: center;
    }
    
    /* Центрируем карточки с формулами */
    .formula-card { 
        padding: 24px; 
        text-align: center; 
        align-items: center; 
    }
    .formula-header { 
        align-items: center; 
        width: 100%; 
    }
    .math-expression { 
        width: 100%; 
        max-width: 300px; 
        margin-left: auto; 
        margin-right: auto; 
    }
    
    .info-wrapper { margin-top: 40px; padding-top: 40px; }
}