/* ======================================================
ОБЩИЕ ПЕРЕМЕННЫЕ (ТЕПЛАЯ ШОКОЛАДНАЯ ПАЛИТРА)
====================================================== */
:root {
    --bg-main: #0a0806;
    --bg-panel: #1a1209;
    --border: #5a3a1a;
    --text-main: #f5e9d5;
    --text-muted: #b8946b;
    --accent: #d4a55a;
    --accent-light: #e0a45b;
    --danger: #ff5555;
    --warning: #ffaa55;
    --success: #55ff55;
    --system-red: #ff5555;
    --system-yellow: #ffff55;
    --system-green: #55ff55;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle, #2a1b13, #120c09);
    font-family: "JetBrains Mono", "Share Tech Mono", monospace;
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ======================================================
ЭФФЕКТЫ МОНИТОРА
====================================================== */
.grain {
    position: fixed;
    inset: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="https://www.w3.org/2000/svg" width="200" height="200"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8"/></filter><rect width="100%25" height="100%25" filter="url(%23n)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 1;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 30%,
        rgba(10, 8, 6, 0.8) 70%,
        rgba(10, 8, 6, 0.95) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 180, 100, 0.3),
        transparent
    );
    animation: scan 6s linear infinite;
    pointer-events: none;
    z-index: 3;
    opacity: 0.15;
}

@keyframes scan {
    from { transform: translateY(-100%); }
    to { transform: translateY(100vh); }
}

.static-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0.03;
    pointer-events: none;
    z-index: 4;
    animation: static-flicker 0.15s infinite;
}

@keyframes static-flicker {
    0%, 100% { 
        background-image: url('data:image/svg+xml,<svg xmlns="https://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.15"/></svg>'); 
    }
    50% { 
        background-image: url('data:image/svg+xml,<svg xmlns="https://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.2"/></svg>'); 
    }
}

/* ======================================================
БЛОК 1. BOOT ЭКРАН (ОБНОВЛЕННЫЙ)
====================================================== */
#boot-screen {
    position: fixed;
    inset: 0;
    background: #0d0806;
    padding: 40px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: "JetBrains Mono", monospace;
}

.boot-container {
    width: 100%;
    max-width: 900px;
    background: rgba(15, 10, 5, 0.9);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    position: relative;
    box-shadow: 
        0 0 50px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.system-init {
    width: 100%;
}

.sys-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sys-log-title {
    color: var(--accent);
    font-size: 1.2rem; /* Увеличили размер для заголовка */
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sys-log-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.sys-log-content {
    background: rgba(10, 8, 6, 0.8);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.85rem;
}

/* Терминал с выравниванием по левому краю */
#boot-terminal {
    font-family: "JetBrains Mono", monospace;
    color: #f5e9d5; /* Более светлый цвет для читаемости */
    line-height: 1.6; /* Увеличили межстрочный интервал */
    white-space: pre-wrap;
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 1rem; /* Увеличили размер текста */
}

/* Прогресс-бар загрузки */
.boot-progress {
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(30, 20, 10, 0.8);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ffaa55);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 2px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.progress-label {
    color: var(--text-muted);
}

.progress-percent {
    color: var(--accent);
    font-weight: bold;
}

/* Контейнер статусов */
.sys-status-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.status-item {
    display: flex;
    flex-direction: column;
}

.status-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.status-value {
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: bold;
}

/* Курсор */
#boot-cursor {
    margin-top: 20px;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Мигающая анимация */
.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}


/* ======================================================
НАВИГАЦИОННЫЕ КНОПКИ - ИСПРАВЛЕННЫЕ
====================================================== */
#main-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
    background: rgba(10, 8, 6, 0.9);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    /* Центрируем содержимое по горизонтали */
    justify-content: center;
    align-items: center;
}

.nav-btn {
    background: var(--bg-panel);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 12px 24px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    /* Единая минимальная ширина для всех кнопок */
    min-width: 160px;
    /* Выравнивание текста по центру */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Единая высота */
    height: 48px;
}

.nav-btn:hover {
    background: rgba(50, 35, 15, 0.9);
    border-color: var(--accent);
}

.nav-btn.active {
    background: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
    font-weight: bold;
}

/* Текст кнопки с фиксированным положением */
.nav-btn .btn-text {
    position: relative;
    z-index: 1;
    /* Предотвращаем перенос текста */
    white-space: nowrap;
}

/* Анимационный эффект при наведении */
.nav-btn .btn-status {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 170, 85, 0.2), transparent);
    transition: left 0.3s ease;
}

.nav-btn:hover .btn-status {
    left: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@media (max-width: 1200px) {
    #main-nav {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 95vw;
    }
    
    .nav-btn {
        min-width: 140px;
        font-size: 0.85rem;
        padding: 10px 16px;
    }
}

@media (max-width: 768px) {
    #main-nav {
        flex-wrap: wrap;
        justify-content: center;
        top: 10px;
        padding: 10px;
        gap: 8px;
        max-width: 95vw;
    }
    
    .nav-btn {
        min-width: 120px;
        height: 42px;
        font-size: 0.8rem;
        padding: 8px 12px;
        flex: 1;
        max-width: calc(50% - 4px);
    }
}

@media (max-width: 480px) {
    .nav-btn {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* ======================================================
БЛОК 2. МОНИТОР
====================================================== */
.monitor {
    margin: 80px 20px 20px 20px;
    padding: 20px;
    background: var(--bg-panel);
    border: 2px solid var(--border);
    border-radius: 24px;
    box-shadow: 
        inset 0 0 60px rgba(0,0,0,0.7),
        0 0 30px rgba(120, 70, 20, 0.2),
        0 0 0 1px rgba(90, 60, 30, 0.3);
    position: relative;
    transform: perspective(500px) rotateX(0.5deg);
    width: 95vw;
    max-width: 1400px;
    height: calc(90vh - 60px);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(3px);
}

/* ЭФФЕКТ СТЕКЛА */
.monitor::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    box-shadow: inset 0 0 80px rgba(255,200,120,0.08);
    pointer-events: none;
    z-index: 1;
}

/* ВЕРХНЯЯ ПАНЕЛЬ */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: linear-gradient(to bottom, #2a1a0c, #1a1007);
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    font-size: 0.85rem;
    z-index: 2;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.sys-label {
    color: var(--accent);
    font-weight: bold;
}

.sys-status {
    color: var(--success);
    font-weight: bold;
}

.sys-title {
    color: var(--text-main);
    font-weight: bold;
    letter-spacing: 1px;
}

.sys-date {
    color: var(--accent);
}

/* ======================================================
ОСНОВНОЙ КОНТЕНТ
====================================================== */
.layout {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.content-block {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

.content-block.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

/* ЗАГОЛОВКИ БЛОКОВ */
.block-header {
    margin-bottom: 30px;
    text-align: center;
}

.block-header h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.block-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ======================================================
БЛОК ИСТОРИИ
====================================================== */
.history-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 20px;
}

.history-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.history-text .highlight {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: bold;
    margin: 30px 0;
}

.system-question {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 170, 85, 0.1);
    border: 1px solid var(--accent);
    border-radius: 4px;
    text-align: center;
}

.system-question p {
    margin-bottom: 20px;
}

/* ======================================================
АРХИВ ЖИТЕЛЕЙ
====================================================== */
.resident-main {
    position: relative;
    overflow-y: auto;
    padding: 0 10px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

/* ЗАГЛУШКА - ИЗНАЧАЛЬНО ВИДИМА */
#placeholder {
    text-align: center;
    margin-top: 120px;
    opacity: 0.6;
    animation: glitch 1.5s infinite;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* КАРТОЧКА ЖИТЕЛЯ - ИЗНАЧАЛЬНО СКРЫТА */
#resident-card {
    display: none;
    flex-direction: column;
    height: 100%;
}

#resident-card:not(.hidden) {
    display: flex;
}

/* Убедимся, что hidden класс работает правильно */
.hidden {
    display: none !important;
}

/* ======================================================
СПИСОК ЖИТЕЛЕЙ - КАРТОЧКИ В ЛЕВОМ МЕНЮ
====================================================== */
.resident-cards {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resident-cards li {
    background: rgba(30, 20, 10, 0.8);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resident-cards li:hover {
    background: rgba(50, 35, 15, 0.9);
    border-color: var(--accent);
    transform: translateX(3px);
}

.resident-cards li.active {
    background: rgba(60, 40, 15, 0.95);
    border-color: var(--warning);
    box-shadow: 0 0 10px rgba(255, 170, 85, 0.3);
}

/* Внутренние элементы карточек */
.resident-cards li .card-id {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.resident-cards li .card-name {
    color: var(--text-main);
    font-weight: bold;
    margin-bottom: 5px;
}

.resident-cards li .card-tags {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* Если нужно добавить иконку выбранного элемента */
.resident-cards li.active::before {
    content: "▶";
    color: var(--warning);
    position: absolute;
    left: -15px;
    animation: pulse 1.5s infinite;
}

/* Дополнительные эффекты для карточек */
.resident-cards li {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resident-cards li::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 90, 0.1), transparent);
    transition: left 0.5s;
}

.resident-cards li:hover::after {
    left: 100%;
}

/* Эффект при выборе */
.resident-cards li.active {
    position: relative;
    z-index: 1;
}

.resident-cards li.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    padding: 1px;
    background: linear-gradient(45deg, var(--warning), var(--accent), var(--warning));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Адаптивность для карточек */
@media (max-width: 768px) {
    .resident-cards li {
        padding: 10px;
    }
    
    .resident-cards li .card-name {
        font-size: 0.9rem;
    }
    
    .resident-cards li .card-tags {
        font-size: 0.7rem;
    }
}

/* ЗАГЛУШКА */
#placeholder {
    text-align: center;
    margin-top: 120px;
    opacity: 0.6;
    animation: glitch 1.5s infinite;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#placeholder.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    animation: none;
}

@keyframes glitch {
    0% { transform: translate(0); opacity: 0.6; }
    20% { transform: translate(-2px, 2px); opacity: 0.8; }
    40% { transform: translate(-2px, -2px); opacity: 0.6; }
    60% { transform: translate(2px, 2px); opacity: 0.8; }
    80% { transform: translate(2px, -2px); opacity: 0.6; }
    100% { transform: translate(0); opacity: 0.6; }
}

/* КАРТОЧКА ЖИТЕЛЯ */
.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* ЦЕНТР: ТОРТ */
.cake-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cake {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(#f3e1c4, #d1a97a);
    margin-bottom: 20px;
    position: relative;
    animation: rotate 14s linear infinite;
    box-shadow: 
        0 0 30px rgba(212, 165, 90, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.cake-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(255,200,120,0.25), transparent);
    animation: scan 4s linear infinite;
    border-radius: 50%;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cake-info {
    background: rgba(20, 15, 8, 0.8);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border);
    width: 100%;
    text-align: center;
}

.cake-info .info-title {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.cake-info .info-content {
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ПРАВО: ИНФОРМАЦИЯ */
.info-zone {
    display: flex;
    flex-direction: column;
}

#resident-name {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

/* Стили для resident-details с улучшенным отображением */
.resident-details {
    background: rgba(20, 15, 8, 0.8);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    font-family: "JetBrains Mono", monospace;
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-main);
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* Цвета для разных типов сообщений в анализе */
.resident-details .system-log {
    color: var(--success);
}

.resident-details .detailed-log {
    color: var(--warning);
}

.resident-details .cake-info-text {
    color: var(--accent);
    font-weight: bold;
}

/* Анимация появления строк */
@keyframes lineAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resident-details .log-line {
    animation: lineAppear 0.5s ease-out;
    margin-bottom: 5px;
}

/* Эффект стирания текста */
.text-erase {
    position: relative;
    display: inline-block;
}

.text-erase::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(20, 15, 8, 0.9);
    animation: erase 1.2s forwards;
}

@keyframes erase {
    to {
        width: 100%;
    }
}


/* ======================================================
ПЕРСОНАЛЬНЫЙ АНАЛИЗ - ОБНОВЛЕННЫЙ
====================================================== */
.analysis-questions {
    background: rgba(15, 10, 5, 0.7);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    font-family: "JetBrains Mono", monospace;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.questions-container {
    flex: 1;
}

.question-item {
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

.question-text {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.4;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-btn {
    background: rgba(30, 20, 10, 0.8);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 15px;
    color: var(--text-main);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.answer-btn:hover {
    background: rgba(50, 35, 15, 0.9);
    border-color: var(--accent);
    transform: translateX(5px);
}

.answer-btn.selected {
    background: rgba(212, 165, 90, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.answer-btn .answer-check {
    position: absolute;
    right: 10px;
    color: var(--success);
    opacity: 0;
    transition: opacity 0.3s;
}

.answer-btn.selected .answer-check {
    opacity: 1;
}

.questions-progress {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* Результат анализа */
#analysis-result-container {
    margin-top: 30px;
    animation: fadeIn 0.8s ease-out;
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-header h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.result-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.result-content {
    background: rgba(20, 15, 8, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
}

#final-analysis-log {
    font-family: "JetBrains Mono", monospace;
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.system-btn.secondary {
    background: transparent;
    border-color: var(--text-muted);
    color: var(--text-muted);
}

.system-btn.secondary:hover {
    background: rgba(184, 148, 107, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* Адаптивность */
@media (max-width: 768px) {
    .result-actions {
        flex-direction: column;
    }
    
    .system-btn {
        width: 100%;
    }
}

/* ======================================================
ЗАКАЗ ТОРТА - ОБНОВЛЕННЫЙ
====================================================== */
.order-content {
    padding: 20px;
}

.order-info {
    background: rgba(20, 15, 8, 0.8);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid var(--border);
}

.order-info p {
    margin-bottom: 20px;
    line-height: 1.5;
    color: var(--text-main);
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.param-item {
    display: flex;
    flex-direction: column;
}

.param-item.full-width {
    grid-column: span 2;
}

.param-item label {
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9rem;
}

.param-item input,
.param-item textarea {
    background: rgba(15, 10, 5, 0.7);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    color: var(--text-main);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.param-item input:focus,
.param-item textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(212, 165, 90, 0.3);
}

.param-item textarea {
    min-height: 100px;
    resize: vertical;
}

.order-log {
    background: rgba(15, 10, 5, 0.7);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    font-family: "JetBrains Mono", monospace;
    white-space: pre-wrap;
    line-height: 1.4;
    color: var(--text-main);
}

/* Адаптивность для формы заказа */
@media (max-width: 1200px) {
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .param-item.full-width {
        grid-column: span 1;
    }
}

/* ======================================================
КОНТАКТЫ
====================================================== */
.contacts-content {
    padding: 20px;
}

.contacts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.contact-card {
    background: rgba(30, 20, 10, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.contact-title {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.contact-value {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 10px;
    word-break: break-all;
}

.contact-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.contacts-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ======================================================
АНОМАЛИИ СИСТЕМЫ
====================================================== */
.anomalies-content {
    padding: 20px;
}

.anomalies-container {
    margin-bottom: 40px;
}

.anomaly-item {
    background: rgba(30, 20, 10, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.anomaly-item:hover {
    border-color: var(--warning);
    background: rgba(255, 170, 85, 0.05);
}

.anomaly-title {
    color: var(--warning);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.anomaly-desc {
    color: var(--text-main);
    line-height: 1.6;
}

.anomalies-note {
    background: rgba(255, 85, 85, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 20px;
    color: var(--text-main);
    font-size: 0.9rem;
}

/* ======================================================
КНОПКИ
====================================================== */
.system-btn {
    padding: 12px 24px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 6px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.system-btn:hover {
    background: var(--accent);
    color: var(--bg-main);
    box-shadow: 0 0 15px rgba(212, 165, 90, 0.4);
}

.system-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* КНОПКА С ИКОНКОЙ */
.system-btn .button-icon {
    margin-left: 10px;
    font-size: 1.1rem;
}

.order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    background: linear-gradient(to bottom, var(--accent), #b08030);
    color: var(--bg-main);
    border: none;
}

.order-btn:hover {
    background: linear-gradient(to bottom, #e4b56a, #c09040);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 165, 90, 0.4);
}

.note {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ======================================================
ФУТЕР
====================================================== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(to top, #2a1a0c, #1a1007);
    border-top: 1px solid var(--border);
    margin-top: 20px;
    font-size: 0.8rem;
    border-radius: 0 0 8px 8px;
}

.footer-left,
.footer-center,
.footer-right {
    flex: 1;
}

.footer-center {
    text-align: center;
}

.footer-right {
    text-align: right;
}

/* ======================================================
ИЗОБРАЖЕНИЯ (УПРОЩЕННАЯ ВЕРСИЯ ДЛЯ ОДНОГО ИЗОБРАЖЕНИЯ)
====================================================== */
.history-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-frame {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    background: rgba(20, 15, 8, 0.8);
    width: 100%;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.image-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ЕДИНОЕ ИЗОБРАЖЕНИЕ СИСТЕМЫ */
.single-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: 
        /* ЗАМЕНИТЕ ЭТУ ССЫЛКУ НА ВАШЕ ИЗОБРАЖЕНИЕ */
        url('images/M2HYDZKZDz.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid var(--border);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(212, 165, 90, 0.3);
}

/* Эффект мерцания/сияния */
.single-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        transparent,
        rgba(255, 200, 120, 0.15),
        transparent
    );
    animation: scan 6s linear infinite;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Подпись на изображении */
.single-image::after {
    position: absolute;
    bottom: 15px;
    right: 15px;
    color: var(--accent);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    opacity: 0.7;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .single-image {
        aspect-ratio: 4/3; /* Меняем соотношение сторон на мобильных */
    }
    
    .single-image::after {
        font-size: 0.7rem;
        bottom: 10px;
        right: 10px;
    }
}


.visual-element.cpu::before {
    animation-delay: 0s;
}

.visual-element.memory::before {
    animation-delay: 0.5s;
}

.visual-element.storage::before {
    animation-delay: 1s;
}

.visual-element.neural::before {
    animation-delay: 1.5s;
}

/* Эффект свечения при наведении */
.visual-element::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(212, 165, 90, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.visual-element:hover::after {
    opacity: 1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .system-visual {
        max-width: 200px;
        gap: 10px;
    }
    
    .visual-element {
        font-size: 0.9rem;
    }
} */

/* ======================================================
СКРЫТЫЕ ЭЛЕМЕНТЫ
====================================================== */
.hidden {
    display: none !important;
}

/* ======================================================
АДАПТИВНОСТЬ
====================================================== */
@media (max-width: 1200px) {
    .history-content {
        grid-template-columns: 1fr;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .cake-zone {
        order: 2;
    }
    
    .info-zone {
        order: 1;
    }
    
    .analysis-container {
        grid-template-columns: 1fr;
    }
    
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .param-item.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    #main-nav {
        flex-wrap: wrap;
        justify-content: center;
        top: 10px;
        padding: 10px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .residents-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .topbar,
    .footer {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .monitor {
        margin-top: 120px;
        height: calc(90vh - 100px);
    }
}

/* ======================================================
УВЕДОМЛЕНИЯ СИСТЕМЫ
====================================================== */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.system-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(20, 15, 8, 0.95);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 15px 20px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    color: var(--success);
    font-size: 1.2rem;
}

.notification-text {
    flex: 1;
}

/* ======================================================
ПЕРСОНАЛЬНЫЙ АНАЛИЗ - ОБНОВЛЕННЫЙ СТИЛИ
====================================================== */
.analysis-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.analysis-questions {
    background: rgba(15, 10, 5, 0.7);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    font-family: "JetBrains Mono", monospace;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.questions-container {
    flex: 1;
}

.question-item {
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

.question-text {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.4;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-btn {
    background: rgba(30, 20, 10, 0.8);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 15px;
    color: var(--text-main);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.answer-btn:hover {
    background: rgba(50, 35, 15, 0.9);
    border-color: var(--accent);
    transform: translateX(5px);
}

.answer-btn.selected {
    background: rgba(212, 165, 90, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.answer-btn .answer-check {
    position: absolute;
    right: 10px;
    color: var(--success);
    opacity: 0;
    transition: opacity 0.3s;
}

.answer-btn.selected .answer-check {
    opacity: 1;
}

.questions-progress {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* Результат анализа */
#analysis-result-container {
    margin-top: 30px;
    animation: fadeIn 0.8s ease-out;
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-header h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.result-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.result-content {
    background: rgba(20, 15, 8, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
}

#final-analysis-log {
    font-family: "JetBrains Mono", monospace;
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.system-btn.secondary {
    background: transparent;
    border-color: var(--text-muted);
    color: var(--text-muted);
}

.system-btn.secondary:hover {
    background: rgba(184, 148, 107, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* Адаптивность для анализа */
@media (max-width: 1200px) {
    .analysis-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .result-actions {
        flex-direction: column;
    }
    
    .system-btn {
        width: 100%;
    }
}

/* ======================================================
УВЕДОМЛЕНИЯ
====================================================== */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.system-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(20, 15, 8, 0.95);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 15px 20px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    color: var(--success);
    font-size: 1.2rem;
}

.notification-text {
    flex: 1;
}

/* ======================================================
УВЕДОМЛЕНИЯ О КОПИРОВАНИИ
====================================================== */
.system-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(20, 15, 8, 0.95);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 15px 20px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    color: var(--success);
    font-size: 1.2rem;
}

.notification-text {
    flex: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* В CSS файле добавьте: */
.log-container {
    white-space: pre-wrap; /* Сохраняет переносы строк */
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ======================================================
АРХИВ ЖИТЕЛЕЙ
====================================================== */
.residents-content {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    height: 100%;
    padding: 0 20px;
}

.sidebar {
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 8px;
    background-color: rgba(15, 10, 5, 0.7);
    overflow-y: auto;
}

.resident-main {
    position: relative;
    overflow-y: auto;
    padding: 0 10px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

/* ЗАГЛУШКА */
#placeholder {
    text-align: center;
    margin-top: 120px;
    opacity: 0.6;
    animation: glitch 1.5s infinite;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#placeholder.hidden {
    display: none !important;
}

/* КАРТОЧКА ЖИТЕЛЯ */
.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* ЦЕНТР: ИЗОБРАЖЕНИЕ */
.cake-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* ======================================================
ИЗОБРАЖЕНИЯ ЖИТЕЛЕЙ С ЭФФЕКТОМ РЯБИ
====================================================== */
.cake-image-container {
    width: 260px;
    height: 260px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    background: #1a1209;
}

/* САМО ИЗОБРАЖЕНИЕ */
.cake-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease;
    transform-origin: center center;
}

/* ЭФФЕКТ РЯБИ - АНАЛОГИЧНО single-image */
.cake-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent,
        rgba(255, 200, 120, 0.15),
        transparent
    );
    animation: scan 6s linear infinite;
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
}

/* ЭФФЕКТ МЕРЦАНИЯ */
.cake-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 220, 150, 0.1),
        transparent
    );
    animation: shimmer 8s linear infinite;
    z-index: 3;
    pointer-events: none;
    opacity: 0.3;
}

/* ЭФФЕКТ ПРИ НАВЕДЕНИИ - УВЕЛИЧЕНИЕ + ЯРКОСТЬ */
.cake-image-container:hover .cake-image {
    transform: scale(1.1);
}

.cake-image-container:hover {
    box-shadow: 
        0 8px 30px rgba(212, 165, 90, 0.3),
        0 0 0 1px rgba(212, 165, 90, 0.2);
}

/* Анимация сканирования */
@keyframes scan {
    0% { 
        transform: translateY(-100%);
        opacity: 0.5;
    }
    50% { 
        opacity: 0.8;
    }
    100% { 
        transform: translateY(100%);
        opacity: 0.5;
    }
}

/* Анимация мерцания/сияния */
@keyframes shimmer {
    0% { 
        transform: translateX(-100%);
        opacity: 0.3;
    }
    50% { 
        opacity: 0.5;
    }
    100% { 
        transform: translateX(100%);
        opacity: 0.3;
    }
}

/* ЭФФЕКТ ЗАГРУЗКИ ИЗОБРАЖЕНИЯ */
.cake-image.loading {
    background: linear-gradient(90deg, 
        rgba(30, 20, 10, 0.5) 25%, 
        rgba(212, 165, 90, 0.2) 50%, 
        rgba(30, 20, 10, 0.5) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.cake-image.loading::before,
.cake-image.loading::after {
    display: none; /* Скрываем эффекты при загрузке */
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* РАМКА ДЛЯ ИЗОБРАЖЕНИЯ (дополнительный эффект) */
.cake-image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(212, 165, 90, 0.3);
    border-radius: 4px;
    pointer-events: none;
    z-index: 4;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(212, 165, 90, 0.1);
}

/* ЭФФЕКТ ВИНЬЕТКИ */
.cake-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(10, 8, 6, 0.5) 70%,
        rgba(10, 8, 6, 0.8) 100%
    );
    pointer-events: none;
    z-index: 5;
    border-radius: 4px;
}

/* РАЗНЫЕ ТИПЫ ЭФФЕКТОВ */
.cake-image.blue-tint::before {
    background: linear-gradient(
        transparent,
        rgba(100, 150, 255, 0.15),
        transparent
    );
}

.cake-image.red-tint::before {
    background: linear-gradient(
        transparent,
        rgba(255, 100, 100, 0.15),
        transparent
    );
}

.cake-image.green-tint::before {
    background: linear-gradient(
        transparent,
        rgba(100, 255, 150, 0.15),
        transparent
    );
}

/* МЕНЬШАЯ ИНТЕНСИВНОСТЬ ДЛЯ СПИСКА ЖИТЕЛЕЙ (если нужно в миниатюрах) */
.miniature-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

.miniature-image .cake-image::before {
    animation: scan 10s linear infinite;
    opacity: 0.3;
}



/* ПРАВО: ИНФОРМАЦИЯ */
.info-zone {
    display: flex;
    flex-direction: column;
}

.resident-name {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

/* ДЕТАЛИ ЖИТЕЛЯ */
.resident-details {
    background: rgba(20, 15, 8, 0.8);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    font-family: "JetBrains Mono", monospace;
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-main);
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    transition: all 0.3s ease;
    flex: 1;
}

/* ЭФФЕКТ ЗАГРУЗКИ ИЗОБРАЖЕНИЯ */
.cake-image.loading {
    background: linear-gradient(90deg, 
        rgba(30, 20, 10, 0.5) 25%, 
        rgba(212, 165, 90, 0.2) 50%, 
        rgba(30, 20, 10, 0.5) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Адаптивность для изображений жителей */
@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .cake-zone {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .info-zone {
        order: 1;
    }
}

@media (max-width: 768px) {
    .residents-content {
        grid-template-columns: 1fr;
    }
    
    .cake-image-container {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 480px) {
    .cake-image-container {
        width: 180px;
        height: 180px;
    }
}

/* НАСТРОЙКИ ЭФФЕКТОВ */
.cake-image {
    /* Медленная рябь */
    --scan-speed: 6s;
    --shimmer-speed: 8s;
    --scan-opacity: 0.5;
    --shimmer-opacity: 0.3;
}

.cake-image::before {
    animation: scan var(--scan-speed, 6s) linear infinite;
    opacity: var(--scan-opacity, 0.5);
}

.cake-image::after {
    animation: shimmer var(--shimmer-speed, 8s) linear infinite;
    opacity: var(--shimmer-opacity, 0.3);
}

/* Более быстрые эффекты для активной карточки */
.resident-card.active .cake-image {
    --scan-speed: 4s;
    --shimmer-speed: 6s;
    --scan-opacity: 0.7;
    --shimmer-opacity: 0.5;
}

/* Эффект при наведении */
.cake-image-container:hover .cake-image {
    --scan-speed: 3s;
    --shimmer-speed: 5s;
    --scan-opacity: 0.8;
    --shimmer-opacity: 0.6;
}