/* --- Стили для Minecraft (Pixel Theme) --- */
:root {
    --accent-mc-green: #4D7C0F; /* Dark Green */
    --accent-mc-light: #ECFCCB;
    --accent-mc-brown: #92400E; /* Dirt/Wood Brown */
    --accent-mc-brown-light: #FEF3C7;
    --gradient-mc-card: linear-gradient(135deg, #65A30D 0%, #365314 100%);
    --slot-bg: #8B8B8B;
    --slot-border-light: #FFF;
    --slot-border-dark: #373737;
}

.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; }

.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: 16px; }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }

.input-wrapper input {
    width: 100%; padding: 14px 16px; 
    font-size: 18px; font-weight: 500; font-family: 'Courier New', monospace;
    border: 1px solid #E5E7EB; border-radius: 12px;
    outline: none; transition: border 0.2s;
}
.input-wrapper input:focus { border-color: var(--accent-mc-green); box-shadow: 0 0 0 3px rgba(77, 124, 15, 0.15); }
.helper-text { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* Stack Selector */
.stack-selector { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.stack-option { cursor: pointer; }
.stack-option input { display: none; }
.stack-card {
    border: 1px solid #E5E7EB; border-radius: 10px; padding: 20px 4px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    transition: all 0.2s; background: #fff; height: 100%;
}

.sc-icon { 
    font-size: 56px; 
    margin-bottom: 12px; 
    color: var(--text-primary); 
    line-height: 1; 
}

.stack-card span { font-weight: 700; font-family: monospace; font-size: 16px; color: var(--text-primary); }
.stack-card small { font-size: 11px; color: var(--text-secondary); }

.stack-option input:checked + .stack-card {
    border-color: var(--accent-mc-green); background: var(--accent-mc-light);
    color: var(--accent-mc-green); box-shadow: 0 2px 8px rgba(77, 124, 15, 0.15);
}
.stack-option input:checked + .stack-card .sc-icon { color: var(--accent-mc-green); }

/* Результаты (Minecraft Card) */
.card--minecraft { background: var(--gradient-mc-card); color: #fff; border: none; }
.card--minecraft h2 { color: rgba(255,255,255,0.9); margin-bottom: 20px; font-size: 16px; }
@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

/* Инвентарные слоты */
.mc-result-block { margin-bottom: 24px; }
.mc-label { font-size: 13px; opacity: 0.8; margin-bottom: 8px; text-transform: uppercase; }

.mc-value-row {
    display: flex; align-items: center; justify-content: center; gap: 12px;
}

.mc-slot {
    width: 64px; height: 64px;
    background-color: var(--slot-bg);
    border: 2px solid;
    border-color: var(--slot-border-dark) var(--slot-border-light) var(--slot-border-light) var(--slot-border-dark);
    position: relative;
    display: flex; align-items: center; justify-content: center;
}

.icon-stack {
    background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='4' width='16' height='16' fill='%23FFF' stroke='%23333' stroke-width='2'/%3E%3Cpath d='M4 4h16v16H4z' fill='rgba(255,255,255,0.3)'/%3E%3C/svg%3E");
}
.icon-item {
    background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='6' fill='%23FFF' stroke='%23333' stroke-width='2'/%3E%3C/svg%3E");
}

.mc-icon {
    width: 32px; height: 32px; background-size: contain; background-repeat: no-repeat;
    opacity: 0.9;
}

.mc-count {
    position: absolute; bottom: 2px; right: 4px;
    font-family: 'Courier New', monospace; font-weight: 700; font-size: 16px;
    color: #fff; text-shadow: 2px 2px 0 #333;
    line-height: 1;
}

.mc-plus { font-size: 24px; font-weight: 700; opacity: 0.5; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 24px 0; }

.storage-list { display: flex; flex-direction: column; gap: 12px; }
.storage-row {
    background: rgba(0,0,0,0.2); padding: 12px; border-radius: 8px;
    display: flex; align-items: center; gap: 12px;
}
.st-icon { font-size: 24px; line-height: 1; }
.st-info { display: flex; flex-direction: column; }
.st-name { font-size: 12px; opacity: 0.8; }
.st-val { font-family: 'Courier New', monospace; font-weight: 700; font-size: 15px; }

/* --- НОВЫЕ ИНФОРМАЦИОННЫЕ БЛОКИ --- */

.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;
}

/* Заголовки с иконками */
.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: 12px; /* Менее скругленные, чтобы было более "блочно" */
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    flex-shrink: 0;
    margin-top: -4px;
    border: 1px solid rgba(0,0,0,0.05);
}

.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }

/* Цвета иконок */
.blue-icon svg { color: #2563EB; }
.green-icon svg { color: var(--accent-mc-green); }
.brown-icon svg { color: var(--accent-mc-brown); } /* Новая коричневая иконка */
.orange-icon svg { color: #F59E0B; }
.red-icon svg { color: #EF4444; }

/* Маленькие подзаголовки */
.small-heading {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 20px;
}
.small-heading .header-icon { width: 40px; height: 40px; }
.small-heading .header-icon svg { width: 20px; height: 20px; }

.intro-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* --- Секция Формул --- */
.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: 16px; /* Чуть менее скругленный для MC */
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}
.formula-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }

.formula-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.formula-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Бейджи */
.badge-blue {
    background: #2563EB; color: #fff;
    padding: 6px 12px; border-radius: 4px; /* Pixel-ish radius */
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block;
}
.badge-green {
    background: var(--accent-mc-green); color: #fff;
    padding: 6px 12px; border-radius: 4px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    display: inline-block;
}

.formula-card p {
    font-size: 14px; color: var(--text-secondary);
    margin: 0; line-height: 1.5; font-weight: 500;
}

.math-expression {
    background: var(--accent-mc-light); /* Green Light */
    border: 1px solid #D9F99D;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 700;
    color: var(--accent-mc-green);
    text-align: center;
    margin-bottom: 16px;
    font-size: 15px;
    font-family: 'Courier New', monospace;
}

/* Разделитель */
.soft-divider {
    border: none; height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
    margin: 48px 0;
}

/* Описание */
.calc-description p {
    font-size: 16px; line-height: 1.7;
    color: var(--text-secondary); margin-bottom: 24px;
}
.calc-description strong { color: var(--text-primary); }

/* --- FAQ Секция (Minecraft Style) --- */
.faq-section .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 12px;
    overflow: hidden; transition: all 0.2s ease;
}

.faq-section .faq-item[open] {
    border-color: var(--accent-mc-green); 
    box-shadow: 0 4px 20px rgba(77, 124, 15, 0.15);
}

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; transition: background 0.2s;
}

summary.faq-question:hover { background-color: #F9FAFB; }

.faq-section .faq-item[open] summary.faq-question {
    color: var(--accent-mc-green);
    background: var(--accent-mc-light);
}

.faq-question::after {
    content: '+'; font-size: 20px;
    color: var(--text-secondary); font-weight: 400; line-height: 1;
}
.faq-question .icon-plus { display: none; }

.faq-section .faq-item[open] summary.faq-question::after {
    content: '−'; color: var(--accent-mc-green);
}

.faq-answer, .faq-item div[itemprop="text"] {
    padding: 20px; color: var(--text-secondary);
    line-height: 1.6; font-size: 15px;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { font-size: 20px; gap: 12px; margin-bottom: 20px; }
    .header-icon { width: 40px; height: 40px; border-radius: 12px; }
    .header-icon svg { width: 20px; height: 20px; }
    
    .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; }
}