/* CSS переменные и базовые стили будут добавлены в следующих шагах */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", "Roboto", "Ubuntu", "Helvetica Neue", sans-serif;
    background: #0a0712;
    color: #f3e8ff;
    overflow-x: hidden;
    position: relative;
}

:root {
    --circuit-bg-x: 0px;
    --circuit-bg-y: 0px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="circuit" x="0" y="0" width="400" height="400" patternUnits="userSpaceOnUse"><rect width="400" height="400" fill="none"/><circle cx="50" cy="50" r="3" fill="%23a78bfa"/><circle cx="120" cy="30" r="2.5" fill="%23c084fc"/><circle cx="200" cy="50" r="4" fill="%23a78bfa"/><circle cx="280" cy="30" r="2.5" fill="%23c084fc"/><circle cx="350" cy="50" r="3" fill="%23a78bfa"/><circle cx="30" cy="120" r="2.5" fill="%23c084fc"/><circle cx="80" cy="100" r="2" fill="%2388a0ff"/><circle cx="150" cy="120" r="3" fill="%23a78bfa"/><circle cx="250" cy="100" r="2" fill="%2388a0ff"/><circle cx="320" cy="120" r="2.5" fill="%23c084fc"/><circle cx="370" cy="100" r="2" fill="%2388a0ff"/><circle cx="50" cy="200" r="4" fill="%23a78bfa"/><circle cx="200" cy="200" r="5" fill="%23c084fc"/><circle cx="350" cy="200" r="4" fill="%23a78bfa"/><circle cx="30" cy="280" r="2.5" fill="%23c084fc"/><circle cx="80" cy="300" r="2" fill="%2388a0ff"/><circle cx="150" cy="280" r="3" fill="%23a78bfa"/><circle cx="250" cy="300" r="2" fill="%2388a0ff"/><circle cx="320" cy="280" r="2.5" fill="%23c084fc"/><circle cx="370" cy="300" r="2" fill="%2388a0ff"/><circle cx="50" cy="350" r="3" fill="%23a78bfa"/><circle cx="120" cy="370" r="2.5" fill="%23c084fc"/><circle cx="200" cy="350" r="4" fill="%23a78bfa"/><circle cx="280" cy="370" r="2.5" fill="%23c084fc"/><circle cx="350" cy="350" r="3" fill="%23a78bfa"/><path d="M 50 50 L 50 80 Q 50 100 70 100 L 150 100 Q 150 100 150 120" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 200 50 L 200 100 L 250 100" stroke="%23a78bfa" stroke-width="1" fill="none"/><path d="M 350 50 L 350 80 Q 350 100 330 100 L 320 100 Q 320 100 320 120" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 50 200 L 100 200 Q 120 200 120 180 L 120 150 Q 120 130 140 130 L 150 120" stroke="%23a78bfa" stroke-width="1" fill="none"/><path d="M 200 200 L 180 200 Q 160 200 160 180 L 160 150" stroke="%23c084fc" stroke-width="1.3" fill="none"/><path d="M 200 200 L 220 200 Q 240 200 240 180 L 240 150" stroke="%23c084fc" stroke-width="1.3" fill="none"/><path d="M 200 200 L 200 240 Q 200 260 180 260 L 150 260 Q 150 270 150 280" stroke="%23a78bfa" stroke-width="1" fill="none"/><path d="M 350 200 L 350 240 Q 350 260 330 260 L 320 260 Q 320 270 320 280" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 50 350 L 50 320 Q 50 300 70 300 L 80 300" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 200 350 L 200 300 L 250 300" stroke="%23a78bfa" stroke-width="1" fill="none"/><path d="M 350 350 L 350 320 Q 350 300 370 300" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 120 30 L 80 30 Q 60 30 60 50 L 50 50" stroke="%23c084fc" stroke-width="0.8" fill="none"/><path d="M 120 30 L 160 30 Q 180 30 180 50 L 200 50" stroke="%23c084fc" stroke-width="0.8" fill="none"/><path d="M 280 30 L 240 30 Q 220 30 220 50 L 200 50" stroke="%23c084fc" stroke-width="0.8" fill="none"/><path d="M 280 30 L 320 30 Q 340 30 340 50 L 350 50" stroke="%23c084fc" stroke-width="0.8" fill="none"/><path d="M 30 120 L 50 120 Q 70 120 70 140 L 70 160" stroke="%23c084fc" stroke-width="0.7" fill="none"/><path d="M 30 280 L 50 280 Q 70 280 70 300 L 80 300" stroke="%23c084fc" stroke-width="0.7" fill="none"/><line x1="80" y1="100" x2="100" y2="100" stroke="%2388a0ff" stroke-width="0.6"/><line x1="250" y1="100" x2="280" y2="100" stroke="%2388a0ff" stroke-width="0.6"/><line x1="370" y1="100" x2="390" y2="100" stroke="%2388a0ff" stroke-width="0.6"/><line x1="80" y1="300" x2="100" y2="300" stroke="%2388a0ff" stroke-width="0.6"/><line x1="250" y1="300" x2="280" y2="300" stroke="%2388a0ff" stroke-width="0.6"/><line x1="370" y1="300" x2="390" y2="300" stroke="%2388a0ff" stroke-width="0.6"/><rect x="195" y="195" width="10" height="10" fill="%23c084fc" opacity="0.3"/><rect x="185" y="185" width="30" height="30" fill="none" stroke="%23c084fc" stroke-width="1.2"/><rect x="178" y="178" width="44" height="44" fill="none" stroke="%23a78bfa" stroke-width="0.6" opacity="0.6"/><line x1="185" y1="200" x2="215" y2="200" stroke="%23c084fc" stroke-width="0.5" opacity="0.7"/><line x1="200" y1="185" x2="200" y2="215" stroke="%23c084fc" stroke-width="0.5" opacity="0.7"/><line x1="190" y1="185" x2="190" y2="215" stroke="%23a78bfa" stroke-width="0.4" opacity="0.5"/><line x1="210" y1="185" x2="210" y2="215" stroke="%23a78bfa" stroke-width="0.4" opacity="0.5"/><line x1="185" y1="190" x2="215" y2="190" stroke="%23a78bfa" stroke-width="0.4" opacity="0.5"/><line x1="185" y1="210" x2="215" y2="210" stroke="%23a78bfa" stroke-width="0.4" opacity="0.5"/><circle cx="100" cy="160" r="1.5" fill="%2388a0ff"/><circle cx="130" cy="170" r="1.5" fill="%2388a0ff"/><circle cx="270" cy="160" r="1.5" fill="%2388a0ff"/><circle cx="300" cy="170" r="1.5" fill="%2388a0ff"/><circle cx="100" cy="240" r="1.5" fill="%2388a0ff"/><circle cx="130" cy="230" r="1.5" fill="%2388a0ff"/><circle cx="270" cy="240" r="1.5" fill="%2388a0ff"/><circle cx="300" cy="230" r="1.5" fill="%2388a0ff"/><path d="M 100 160 L 100 180 Q 100 190 110 190 L 130 190 Q 140 190 140 180 L 140 170 L 130 170" stroke="%2388a0ff" stroke-width="0.5" fill="none" opacity="0.8"/><path d="M 270 160 L 270 180 Q 270 190 280 190 L 300 190 Q 310 190 310 180 L 310 170 L 300 170" stroke="%2388a0ff" stroke-width="0.5" fill="none" opacity="0.8"/><rect x="45" y="45" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="195" y="45" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="345" y="45" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="45" y="195" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="345" y="195" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="45" y="345" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="195" y="345" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="345" y="345" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/></pattern></defs><rect width="400" height="400" fill="url(%23circuit)"/></svg>');
    background-repeat: repeat;
    background-position: var(--circuit-bg-x) var(--circuit-bg-y);
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out;
    font-family: "Courier New", monospace;
}

.loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="circuit-loading" x="0" y="0" width="400" height="400" patternUnits="userSpaceOnUse"><rect width="400" height="400" fill="none"/><circle cx="50" cy="50" r="3" fill="%23a78bfa"/><circle cx="120" cy="30" r="2.5" fill="%23c084fc"/><circle cx="200" cy="50" r="4" fill="%23a78bfa"/><circle cx="280" cy="30" r="2.5" fill="%23c084fc"/><circle cx="350" cy="50" r="3" fill="%23a78bfa"/><circle cx="30" cy="120" r="2.5" fill="%23c084fc"/><circle cx="80" cy="100" r="2" fill="%2388a0ff"/><circle cx="150" cy="120" r="3" fill="%23a78bfa"/><circle cx="250" cy="100" r="2" fill="%2388a0ff"/><circle cx="320" cy="120" r="2.5" fill="%23c084fc"/><circle cx="370" cy="100" r="2" fill="%2388a0ff"/><circle cx="50" cy="200" r="4" fill="%23a78bfa"/><circle cx="200" cy="200" r="5" fill="%23c084fc"/><circle cx="350" cy="200" r="4" fill="%23a78bfa"/><circle cx="30" cy="280" r="2.5" fill="%23c084fc"/><circle cx="80" cy="300" r="2" fill="%2388a0ff"/><circle cx="150" cy="280" r="3" fill="%23a78bfa"/><circle cx="250" cy="300" r="2" fill="%2388a0ff"/><circle cx="320" cy="280" r="2.5" fill="%23c084fc"/><circle cx="370" cy="300" r="2" fill="%2388a0ff"/><circle cx="50" cy="350" r="3" fill="%23a78bfa"/><circle cx="120" cy="370" r="2.5" fill="%23c084fc"/><circle cx="200" cy="350" r="4" fill="%23a78bfa"/><circle cx="280" cy="370" r="2.5" fill="%23c084fc"/><circle cx="350" cy="350" r="3" fill="%23a78bfa"/><path d="M 50 50 L 50 80 Q 50 100 70 100 L 150 100 Q 150 100 150 120" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 200 50 L 200 100 L 250 100" stroke="%23a78bfa" stroke-width="1" fill="none"/><path d="M 350 50 L 350 80 Q 350 100 330 100 L 320 100 Q 320 100 320 120" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 50 200 L 100 200 Q 120 200 120 180 L 120 150 Q 120 130 140 130 L 150 120" stroke="%23a78bfa" stroke-width="1" fill="none"/><path d="M 200 200 L 180 200 Q 160 200 160 180 L 160 150" stroke="%23c084fc" stroke-width="1.3" fill="none"/><path d="M 200 200 L 220 200 Q 240 200 240 180 L 240 150" stroke="%23c084fc" stroke-width="1.3" fill="none"/><path d="M 200 200 L 200 240 Q 200 260 180 260 L 150 260 Q 150 270 150 280" stroke="%23a78bfa" stroke-width="1" fill="none"/><path d="M 350 200 L 350 240 Q 350 260 330 260 L 320 260 Q 320 270 320 280" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 50 350 L 50 320 Q 50 300 70 300 L 80 300" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 200 350 L 200 300 L 250 300" stroke="%23a78bfa" stroke-width="1" fill="none"/><path d="M 350 350 L 350 320 Q 350 300 370 300" stroke="%23a78bfa" stroke-width="1.2" fill="none"/><path d="M 120 30 L 80 30 Q 60 30 60 50 L 50 50" stroke="%23c084fc" stroke-width="0.8" fill="none"/><path d="M 120 30 L 160 30 Q 180 30 180 50 L 200 50" stroke="%23c084fc" stroke-width="0.8" fill="none"/><path d="M 280 30 L 240 30 Q 220 30 220 50 L 200 50" stroke="%23c084fc" stroke-width="0.8" fill="none"/><path d="M 280 30 L 320 30 Q 340 30 340 50 L 350 50" stroke="%23c084fc" stroke-width="0.8" fill="none"/><path d="M 30 120 L 50 120 Q 70 120 70 140 L 70 160" stroke="%23c084fc" stroke-width="0.7" fill="none"/><path d="M 30 280 L 50 280 Q 70 280 70 300 L 80 300" stroke="%23c084fc" stroke-width="0.7" fill="none"/><line x1="80" y1="100" x2="100" y2="100" stroke="%2388a0ff" stroke-width="0.6"/><line x1="250" y1="100" x2="280" y2="100" stroke="%2388a0ff" stroke-width="0.6"/><line x1="370" y1="100" x2="390" y2="100" stroke="%2388a0ff" stroke-width="0.6"/><line x1="80" y1="300" x2="100" y2="300" stroke="%2388a0ff" stroke-width="0.6"/><line x1="250" y1="300" x2="280" y2="300" stroke="%2388a0ff" stroke-width="0.6"/><line x1="370" y1="300" x2="390" y2="300" stroke="%2388a0ff" stroke-width="0.6"/><rect x="195" y="195" width="10" height="10" fill="%23c084fc" opacity="0.3"/><rect x="185" y="185" width="30" height="30" fill="none" stroke="%23c084fc" stroke-width="1.2"/><rect x="178" y="178" width="44" height="44" fill="none" stroke="%23a78bfa" stroke-width="0.6" opacity="0.6"/><line x1="185" y1="200" x2="215" y2="200" stroke="%23c084fc" stroke-width="0.5" opacity="0.7"/><line x1="200" y1="185" x2="200" y2="215" stroke="%23c084fc" stroke-width="0.5" opacity="0.7"/><line x1="190" y1="185" x2="190" y2="215" stroke="%23a78bfa" stroke-width="0.4" opacity="0.5"/><line x1="210" y1="185" x2="210" y2="215" stroke="%23a78bfa" stroke-width="0.4" opacity="0.5"/><line x1="185" y1="190" x2="215" y2="190" stroke="%23a78bfa" stroke-width="0.4" opacity="0.5"/><line x1="185" y1="210" x2="215" y2="210" stroke="%23a78bfa" stroke-width="0.4" opacity="0.5"/><circle cx="100" cy="160" r="1.5" fill="%2388a0ff"/><circle cx="130" cy="170" r="1.5" fill="%2388a0ff"/><circle cx="270" cy="160" r="1.5" fill="%2388a0ff"/><circle cx="300" cy="170" r="1.5" fill="%2388a0ff"/><circle cx="100" cy="240" r="1.5" fill="%2388a0ff"/><circle cx="130" cy="230" r="1.5" fill="%2388a0ff"/><circle cx="270" cy="240" r="1.5" fill="%2388a0ff"/><circle cx="300" cy="230" r="1.5" fill="%2388a0ff"/><path d="M 100 160 L 100 180 Q 100 190 110 190 L 130 190 Q 140 190 140 180 L 140 170 L 130 170" stroke="%2388a0ff" stroke-width="0.5" fill="none" opacity="0.8"/><path d="M 270 160 L 270 180 Q 270 190 280 190 L 300 190 Q 310 190 310 180 L 310 170 L 300 170" stroke="%2388a0ff" stroke-width="0.5" fill="none" opacity="0.8"/><rect x="45" y="45" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="195" y="45" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="345" y="45" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="45" y="195" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="345" y="195" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="45" y="345" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="195" y="345" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/><rect x="345" y="345" width="10" height="10" fill="none" stroke="%23a78bfa" stroke-width="0.7" rx="1"/></pattern></defs><rect width="400" height="400" fill="url(%23circuit-loading)"/></svg>');
    background-repeat: repeat;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    font-family: "Courier New", monospace;
    font-size: 2rem;
    font-weight: bold;
    color: #00ffff;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.loading-log {
    width: 600px;
    max-width: 90%;
    margin-bottom: 2rem;
}

.loading-log-item {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #00ffff;
    min-height: 1.2em;
    display: flex;
    align-items: center;
}

.loading-log-item.typing {
    position: relative;
}

.loading-log-item.typing::after {
    content: '▮';
    color: #00ffff;
    animation: blink 1s infinite;
    margin-left: 2px;
}

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

.loading-log-code {
    color: #00ffff;
    font-weight: bold;
}

.loading-log-text {
    color: #00ffff;
    flex: 1;
    margin-left: 0.5rem;
}

.loading-log-ok {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.loading-progress {
    width: 400px;
    max-width: 90%;
    height: 30px;
    background: #000000;
    border: 2px solid #00ffff;
    position: relative;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: #00ff00;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.loading-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ff00;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    z-index: 1;
    display: none;
}

.main-interface {
    display: none;
    min-height: 100vh;
}

.main-interface.loaded {
    display: block;
}

.header {
    background: linear-gradient(135deg, #171125, #211630);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(182, 103, 255, 0.38);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(182, 103, 255, 0.1);
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #b667ff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.header-controls {
    display: flex;
    gap: 1rem;
}

.main-content {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

.right-panel {
    background: linear-gradient(135deg, #171125, #211630);
    border-radius: 18px;
    padding: 1rem;
    border: 1px solid rgba(182, 103, 255, 0.38);
    box-shadow: 0 0 22px rgba(182, 103, 255, 0.28);
    height: fit-content;
}

.section {
    background: linear-gradient(135deg, #171125, #211630);
    border-radius: 18px;
    padding: 1.5rem;
    border: 1px solid rgba(182, 103, 255, 0.38);
    box-shadow: 0 0 22px rgba(182, 103, 255, 0.28);
    transition: all 0.3s ease;
}

.section:hover {
    box-shadow: 0 0 30px rgba(182, 103, 255, 0.4);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(182, 103, 255, 0.2);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #b667ff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-content {
    display: none;
}

.section-content.expanded {
    display: block;
}

.collapsed-section {
    background: linear-gradient(135deg, #171125, #211630);
    border-radius: 18px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(182, 103, 255, 0.38);
    cursor: pointer;
    transition: all 0.3s ease;
}

.collapsed-section:hover {
    background: linear-gradient(135deg, #211630, #2a1a3a);
}

.collapsed-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #a394c4;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* CSS переменные */
:root {
    --bg: #0a0712;                    /* Основной фон - темно-фиолетовый */
    --panel: #171125;                 /* Фон панелей - темно-фиолетовый */
    --panel-alt: #211630;             /* Альтернативный фон панелей */
    --accent: #b667ff;                /* Основной акцент - ярко-фиолетовый */
    --accent-2: #ff6acb;              /* Вторичный акцент - розовый */
    --text: #f3e8ff;                  /* Основной текст - светло-фиолетовый */
    --muted: #a394c4;                 /* Приглушенный текст - серо-фиолетовый */
    --danger: #ff5b87;                /* Опасность - красновато-розовый */
    --success: #7df4c6;               /* Успех - светло-зеленый */
    --border: rgba(182, 103, 255, 0.38); /* Границы - полупрозрачный фиолетовый */
    --shadow: 0 0 22px rgba(182, 103, 255, 0.28); /* Тени - фиолетовое свечение */
}

/* Стили для кнопок */
.pill-button {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.pill-button:hover {
    background: linear-gradient(135deg, var(--panel-alt), var(--accent));
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(182, 103, 255, 0.4);
    transform: translateY(-2px);
}

.pill-button:active {
    transform: translateY(0);
}

.pill-button.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 600;
}

.pill-button.primary-button:hover {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 35px rgba(182, 103, 255, 0.6);
}

.pill-button.danger-button {
    background: linear-gradient(135deg, var(--danger), #ff3d6b);
    border-color: var(--danger);
    color: white;
}

.pill-button.danger-button:hover {
    background: linear-gradient(135deg, #ff3d6b, var(--danger));
    box-shadow: 0 0 30px rgba(255, 91, 135, 0.5);
}

.pill-button.muted-button {
    background: linear-gradient(135deg, rgba(163, 148, 196, 0.1), rgba(163, 148, 196, 0.05));
    border-color: rgba(163, 148, 196, 0.3);
    color: var(--muted);
}

.pill-button.muted-button:hover {
    background: linear-gradient(135deg, rgba(163, 148, 196, 0.2), rgba(163, 148, 196, 0.1));
    border-color: var(--muted);
    color: var(--text);
}

.pill-button.success-button {
    background: linear-gradient(135deg, var(--success), #5dd4a8);
    border-color: var(--success);
    color: var(--bg);
}

.pill-button.success-button:hover {
    background: linear-gradient(135deg, #5dd4a8, var(--success));
    box-shadow: 0 0 30px rgba(58, 44, 247, 0.5);
}

.pill-button.dark-blue-button {
    background: linear-gradient(135deg, #8da3e3, #536cbf);
    border-color: #1e3a8a;
    color: var(--bg);
}

.pill-button.dark-blue-button:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    box-shadow: 0 0 30px rgba(30, 58, 138, 0.5);
}

/* Стили для полей ввода */
.input-field {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.input-field::placeholder {
    color: var(--muted);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
}

.input-label {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.input-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-row .input-field {
    flex: 1;
}

.stat-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    width: 60px;
    transition: all 0.3s ease;
}

.stat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.3);
}

/* Стили для числовых полей (spinner) */
input[type="number"] {
    text-align: center !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    text-indent: 0 !important;
    direction: ltr !important;
    unicode-bidi: bidi-override !important;
}

/* Специальные стили для .stat-value */
.stat-value {
    text-align: center !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    text-indent: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    direction: ltr !important;
    unicode-bidi: bidi-override !important;
}

/* Принудительное центрирование для всех числовых полей */
input[type="number"].stat-value {
    text-align: center !important;
    padding: 0.5rem !important;
    text-indent: 0 !important;
    direction: ltr !important;
}

/* Принудительное центрирование для .input-field числовых полей */
input[type="number"].input-field {
    text-align: center !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    text-indent: 0 !important;
    direction: ltr !important;
}

/* Принудительное центрирование для профессиональных навыков */
.professional-skill-level {
    text-align: center !important;
    padding-left: 0.3rem !important;
    padding-right: 0.3rem !important;
    text-indent: 0 !important;
    direction: ltr !important;
}

/* Дополнительные стили для принудительного центрирования */
.stat-value::-webkit-input-placeholder {
    text-align: center !important;
}

.stat-value::-moz-placeholder {
    text-align: center !important;
}

.stat-value:-ms-input-placeholder {
    text-align: center !important;
}

.stat-value::placeholder {
    text-align: center !important;
}

/* Дополнительные стили для браузерной совместимости */
input[type="number"]::-webkit-textfield-decoration-container {
    text-align: center !important;
}

/* Скрываем стрелки для числовых полей */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox специфичные стили */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Стили для кнопок +/- */

/* Фикс для профессиональных навыков */
.professional-skills-section {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.professional-skills-content {
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
}

.professional-skill-row {
    min-width: 0 !important;
}

/* Кнопки для профессиональных навыков */
.prof-skill-info-btn {
    background: rgba(91, 155, 255, 0.2);
    border: 1px solid rgba(91, 155, 255, 0.4);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5b9bff;
    font-size: 0.7rem;
    font-weight: 600;
    font-style: italic;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.prof-skill-info-btn:hover {
    background: rgba(91, 155, 255, 0.3);
    border-color: #5b9bff;
    transform: scale(1.1);
}

.prof-skill-remove-btn {
    background: rgba(255, 91, 135, 0.2);
    border: 1px solid rgba(255, 91, 135, 0.4);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff5b87;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.prof-skill-remove-btn:hover {
    background: rgba(255, 91, 135, 0.3);
    border-color: #ff5b87;
    transform: scale(1.1);
}

.professional-skill-name,
.professional-skill-level {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Стили для банкомата */
.atm-button {
    transition: all 0.2s ease;
}

.atm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.atm-button:active {
    transform: translateY(0);
}

.deposit-button:hover {
    color: var(--success) !important;
}

/* Принудительное центрирование для всех браузеров */
input[type="number"] {
    text-align: center !important;
    text-align-last: center !important;
}

/* Дополнительные стили для WebKit браузеров */
input[type="number"]::-webkit-input-placeholder {
    text-align: center !important;
}

/* Дополнительные стили для Mozilla */
input[type="number"]::-moz-placeholder {
    text-align: center !important;
}

/* Дополнительные стили для IE */
input[type="number"]:-ms-input-placeholder {
    text-align: center !important;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    position: relative;
}

input[type="number"]::-webkit-outer-spin-button {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

input[type="number"]::-webkit-inner-spin-button {
    background: transparent;
    border: none;
}

input[type="number"]::-webkit-inner-spin-button:before {
    content: "▲";
    color: var(--accent);
    font-size: 10px;
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
}

input[type="number"]::-webkit-inner-spin-button:after {
    content: "▼";
    color: var(--accent);
    font-size: 10px;
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
}

/* Firefox */
input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
    text-align: center !important;
}

input[type="number"]::-moz-number-spin-box {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

input[type="number"]::-moz-number-spin-up,
input[type="number"]::-moz-number-spin-down {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 10px;
}

.stat-label {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-width: 60px;
}

/* Анимация кубиков */
.dice {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--bg);
    font-size: 1.2rem;
}

/* Общий класс для d4 треугольников */
.d4-triangle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    position: relative;
    clip-path: polygon(50% 10%, 10% 90%, 90% 90%);
    border-radius: 4px;
    margin: 0 0.25rem;
    text-align: center;
    line-height: 1;
}

/* Специальный d4 треугольник для инициативы */
#initiativeD4.d4-triangle {
    width: 40px;
    height: 40px;
    display: flex !important; /* Принудительно устанавливаем flex */
    align-items: flex-end !important; /* Выравниваем по нижнему краю */
    justify-content: center !important;
    font-weight: bold;
    font-size: 1.2rem;
    position: relative;
    clip-path: polygon(50% 10%, 10% 90%, 90% 90%);
    border-radius: 4px;
    margin: 0 0.25rem;
    text-align: center;
    line-height: 1;
    padding-top: 0;
    padding-bottom: 8px; /* Отступ снизу для красивого позиционирования */
}

.d4-penalty {
    background: linear-gradient(135deg, #ff9aa2, #ff5b87);
    color: var(--bg);
}

.d4-bonus {
    background: linear-gradient(135deg, #b8f4d0, #7df4c6);
    color: var(--bg);
}

.d4-triangle.rolling {
    animation: roll 1.5s ease-in-out;
}

.dice.rolling {
    animation: roll 1.5s ease-in-out;
}

@keyframes roll {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(0.9); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.dice-result {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.dice-special {
    width: 100%;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.dice-special.fail {
    color: var(--danger);
    animation: pulse-fail 1s ease-in-out 0s 3;
}

.dice-special.crit {
    color: #7bd7ff;
    animation: pulse-crit 1s ease-in-out 0s 3;
}

@keyframes pulse-fail {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes pulse-crit {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Drag & Drop стили */
.draggable-module {
    transition: all 0.2s ease;
}

.draggable-module:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(182, 103, 255, 0.3);
}

.draggable-module:active {
    transform: scale(0.98);
}

.drop-zone {
    transition: all 0.3s ease;
}

.drop-zone.drag-over {
    background: rgba(58, 44, 247, 0.3) !important;
    border-color: var(--success) !important;
    transform: scale(1.02);
}

.implant-slot {
    transition: all 0.2s ease;
}

.implant-slot:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(182, 103, 255, 0.4);
}

/* Адаптивность для схемы тела с имплантами */
@media (max-width: 768px) {
    .implant-slot {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .implant-slot {
        font-size: 0.7rem;
    }
}

/* Кастомные скроллбары */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 13, 35, 0.8);
    border-radius: 6px;
    border: 1px solid var(--border);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent), rgba(182, 103, 255, 0.8));
    border-radius: 6px;
    border: 1px solid rgba(182, 103, 255, 0.3);
    transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(182, 103, 255, 0.9), var(--accent));
    border-color: rgba(182, 103, 255, 0.5);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, var(--accent), rgba(182, 103, 255, 1));
}

::-webkit-scrollbar-corner {
    background: rgba(20, 13, 35, 0.8);
}

/* Firefox скроллбары */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(20, 13, 35, 0.8);
}

/* Анимация точек загрузки */
.loading-dots::after {
    content: '.';
    animation: dotsAnimation 1s ease-in-out infinite;
}

@keyframes dotsAnimation {
    0% { content: '.'; }
    25% { content: '..'; }
    50% { content: '...'; }
    75% { content: '....'; }
    100% { content: '.....'; }
}

/* Поля ввода для проверки навыков */
.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.field input,
.field select {
    width: 100%;
    background: rgba(20, 13, 35, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    color: var(--text);
    font-size: 0.95rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(182, 103, 255, 0.4);
}

/* Стили для слайдеров */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(182, 103, 255, 0.2);
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
    box-shadow: 0 0 10px rgba(182, 103, 255, 0.5);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.7);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(182, 103, 255, 0.5);
}

/* Стили для прогресс-баров */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(182, 103, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(182, 103, 255, 0.5);
}

/* Стили для списков */
.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.list-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--border);
}

.list-item:last-child {
    margin-bottom: 0;
}

/* Стили для карточек */
.card {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0 30px rgba(182, 103, 255, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(182, 103, 255, 0.2);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card-content {
    color: var(--text);
    line-height: 1.5;
}

/* Стили для таблиц */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(182, 103, 255, 0.2);
}

.table th {
    background: rgba(182, 103, 255, 0.1);
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.table td {
    color: var(--text);
}

.table tr:hover {
    background: rgba(182, 103, 255, 0.05);
}

/* Стили для анимаций */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

/* Вложенные модальные окна (уведомления о покупке) будут иметь более высокий z-index */
.modal-overlay + .modal-overlay {
    z-index: 10000;
}

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

.modal {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    animation: slideUp 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: slideUp 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, rgba(182, 103, 255, 0.1), rgba(182, 103, 255, 0.05));
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Стили для магазина транспорта */
.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

/* Адаптивность для магазинов */
@media (max-width: 768px) {
    .shop-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .shop-items-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Стили для карточек транспорта */
.vehicle-card {
    margin-bottom: 1.5rem;
}

.vehicle-card:last-child {
    margin-bottom: 0;
}

.shop-item {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    min-height: auto;
    max-width: 100%;
    overflow: hidden;
}

.shop-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(182, 103, 255, 0.2);
}

.shop-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.shop-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.shop-item-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.shop-item-stats {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.shop-stat {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(138, 43, 226, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    color: var(--text);
    font-weight: 500;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.shop-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.shop-item-price::after {
    content: "";
    width: 16px;
    height: 16px;
    background-image: url('https://static.tildacdn.com/tild3939-6162-4633-a238-623334613265/photo.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.shop-item-buy-btn {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(138, 43, 226, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    width: 100%;
}

.shop-item-buy-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.25), rgba(138, 43, 226, 0.2));
    border-color: rgba(138, 43, 226, 0.5);
    transform: translateY(-1px);
}

.shop-item-buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-item-buy-btn::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: url('https://static.tildacdn.com/tild6363-3833-4263-a639-623835363566/money_1.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.shop-item-available-btn {
    background: linear-gradient(135deg, var(--success), rgba(76, 175, 80, 0.8));
    border: 1px solid var(--success);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    width: 100%;
}

.shop-item-available-btn:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.9), var(--success));
    transform: translateY(-1px);
}

.shop-item-available-btn::before {
    content: "✓";
    font-weight: bold;
    font-size: 1.1rem;
}

/* Стили для маленьких кнопок управления ПЗ/ОС */
.btn-small {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(138, 43, 226, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: var(--text);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
}

.btn-small:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.25), rgba(138, 43, 226, 0.2));
    border-color: rgba(138, 43, 226, 0.5);
    transform: translateY(-1px);
}

.btn-small.danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(220, 53, 69, 0.1));
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.btn-small.danger:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.25), rgba(220, 53, 69, 0.2));
    border-color: rgba(220, 53, 69, 0.5);
}

.btn-small.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(40, 167, 69, 0.1));
    border-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.btn-small.success:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.25), rgba(40, 167, 69, 0.2));
    border-color: rgba(40, 167, 69, 0.5);
}

.btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.icon-button {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* Стили для уведомлений */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(58, 44, 247, 0.1), var(--panel));
}

.notification.error {
    border-color: var(--danger);
    background: linear-gradient(135deg, rgba(255, 91, 135, 0.1), var(--panel));
}

/* Стили для лога бросков */
.roll-entry {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.roll-entry:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--border);
}

.roll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.roll-skill {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.roll-time {
    color: var(--muted);
    font-size: 0.8rem;
}

.roll-details {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
}

.roll-critical {
    color: var(--danger);
    font-weight: bold;
    margin-top: 0.5rem;
    text-align: center;
}

.roll-log-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.roll-log-container::-webkit-scrollbar {
    width: 6px;
}

.roll-log-container::-webkit-scrollbar-track {
    background: rgba(182, 103, 255, 0.1);
    border-radius: 3px;
}

.roll-log-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.roll-log-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-2);
}

/* Стили для консоли лога бросков */
.roll-log-console {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: 200px;
}

.console-header {
    background: rgba(182, 103, 255, 0.1);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-title {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.console-content {
    max-height: 150px;
    overflow-y: auto;
    padding: 0.75rem;
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

.console-content::-webkit-scrollbar {
    width: 6px;
}

.console-content::-webkit-scrollbar-track {
    background: rgba(182, 103, 255, 0.1);
}

.console-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.console-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-2);
}

.roll-log-entry {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(182, 103, 255, 0.1);
}

.roll-log-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.roll-log-time {
    color: var(--muted);
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.roll-log-text {
    color: var(--text);
}

.roll-log-success {
    color: var(--success);
}

.roll-log-failure {
    color: var(--danger);
}

/* Полноширинная секция */
.full-width-section {
    width: 100%;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.full-width-section .section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.full-width-section .section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

/* ПОЛНОСТЬЮ НОВЫЙ ПРАВИЛЬНЫЙ ДИЗАЙН БЛОКА "ОБЩАЯ ИНФОРМАЦИЯ" */
.character-sheet-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.05), rgba(19, 31, 42, 0.1));
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(138, 43, 226, 0.1);
}

/* Аватар секция - фиксированная ширина */
.avatar-section {
    display: grid;
    grid-template-rows: auto auto auto auto auto auto;
    gap: 1rem;
    align-content: start;
    min-width: 0;
}

.avatar-placeholder {
    width: 100%;
    aspect-ratio: auto;
    min-height: 200px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(19, 31, 42, 0.2));
    border: 2px solid rgba(138, 43, 226, 0.2);
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.avatar-placeholder:hover {
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.2);
}

.avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
}

/* Кнопки аватара */
.avatar-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.avatar-button {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(19, 31, 42, 0.2));
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.avatar-button:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(19, 31, 42, 0.3));
    border-color: rgba(138, 43, 226, 0.4);
}

/* Карточки для элементов аватара */
.health-box,
.money-box,
.reputation-section,
.professional-skills-section {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.05), rgba(19, 31, 42, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.15);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.health-box:hover,
.money-box:hover,
.reputation-section:hover,
.professional-skills-section:hover {
    border-color: rgba(138, 43, 226, 0.3);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.08), rgba(19, 31, 42, 0.15));
}

/* Иконки и заголовки */
.health-icon,
.money-icon {
    text-align: center;
    margin-bottom: 0.5rem;
}

.health-icon img,
.money-icon img {
    width: 20px;
    height: 20px;
}

.health-label,
.money-label,
.reputation-label,
.professional-skills-label {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: 0.3px;
}

/* Поля ввода */
.health-values {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.health-input,
.money-input {
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.health-input:focus,
.money-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.1);
    outline: none;
}

.health-separator {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
}

.deposit-button {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(19, 31, 42, 0.2));
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 4px;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.4rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.deposit-button:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(19, 31, 42, 0.3));
    border-color: var(--accent);
}

/* Репутация */
.reputation-controls {
    display: grid;
    gap: 0.75rem;
}


.reputation-value {
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}

/* Профессиональные навыки */
.professional-skills-content {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.1);
    border-radius: 6px;
    padding: 0.75rem;
}

.professional-skills-content .pill-button {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--accent), rgba(138, 43, 226, 0.8));
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.professional-skills-content .pill-button:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.9), var(--accent));
}

/* БЛОК ХАРАКТЕРИСТИК - ПРАВИЛЬНЫЙ С ПЕРЕНОСОМ */
.character-stats-section {
    display: grid;
    grid-template-rows: auto auto auto auto auto auto;
    gap: 1rem;
    align-content: start;
    min-width: 0;
}

.input-group {
    display: grid;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.input-field {
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.05), rgba(19, 31, 42, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.15);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.1);
    outline: none;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.08), rgba(19, 31, 42, 0.15));
}

/* Адаптивная сетка - 15 элементов в одном блоке */
.stats-grid-derived {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.input-group-compact,
.stat-dual-compact,
.stat-box-compact,
.derived-stat-compact {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.05), rgba(19, 31, 42, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.15);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    min-width: 150px;
    min-height: 80px;
    overflow: visible;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.5rem;
}

.input-group-compact:hover,
.stat-dual-compact:hover,
.stat-box-compact:hover,
.derived-stat-compact:hover {
    border-color: rgba(138, 43, 226, 0.3);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.08), rgba(19, 31, 42, 0.15));
}

.input-label-compact,
.stat-label-compact,
.derived-label-compact {
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.input-field-compact,
.stat-value-compact,
.dual-value-compact {
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.input-field-compact:focus,
.stat-value-compact:focus,
.dual-value-compact:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.1);
    outline: none;
}

/* .dual-values-compact определён ниже в строке ~3475 */

.dual-separator-compact {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
}

.stat-formula-compact {
    font-size: 0.55rem;
    color: var(--muted);
    font-style: italic;
    text-align: center;
    margin-top: 0.4rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.derived-value-compact {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
}

/* Инициатива - особый стиль */
.initiative-compact {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    padding: 0.75rem;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.08), rgba(19, 31, 42, 0.15));
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 8px;
    min-width: 200px;
    min-height: 80px;
    overflow: visible;
}

.initiative-compact:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.12), rgba(19, 31, 42, 0.2));
    border-color: rgba(138, 43, 226, 0.4);
}

.initiative-icon-compact {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.initiative-text-compact {
    text-align: center;
    min-width: 0;
}

.initiative-title-compact {
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.initiative-result-compact {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 0.2rem;
    white-space: nowrap;
}

.initiative-modifier-compact {
    text-align: center;
    min-width: 0;
}

.initiative-modifier-label {
    font-size: 0.55rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
    font-weight: 600;
    white-space: nowrap;
}

.initiative-modifier-input {
    width: 45px;
    text-align: center;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.initiative-modifier-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.1);
    outline: none;
}

/* Секции травм и предыстории */
.injuries-section,
.backstory-section {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.05), rgba(19, 31, 42, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.15);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.injuries-section:hover,
.backstory-section:hover {
    border-color: rgba(138, 43, 226, 0.3);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.08), rgba(19, 31, 42, 0.15));
}

.injuries-label,
.backstory-title {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.75rem;
}

.injuries-list {
    min-height: 1.5rem;
}

.backstory-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.backstory-header > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.backstory-content {
    display: grid;
    gap: 0.5rem;
}

.backstory-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.15);
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--text);
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.backstory-item:hover {
    border-color: rgba(138, 43, 226, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

.backstory-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Адаптивность для предыстории */
@media (max-width: 768px) {
    .backstory-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .backstory-header > div {
        width: 100%;
        justify-content: flex-start;
    }
}

.avatar-button {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

/* Стили для секции "Дека" */
.deck-stats-section {
    margin-bottom: 1.5rem;
}

.deck-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.deck-stats-grid .input-group.full-width {
    width: 100%;
}

.deck-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .deck-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.deck-programs-section,
.deck-chips-section {
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.program-item,
.chip-item {
    background: rgba(20, 13, 35, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.program-info,
.chip-info {
    flex: 1;
}

.program-name,
.chip-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.program-details,
.chip-details {
    font-size: 0.85rem;
    color: var(--muted);
}

.program-actions,
.chip-actions {
    display: flex;
    gap: 0.5rem;
}

/* Стили для секции "Киберимпланты" */
.implant-item {
    background: rgba(20, 13, 35, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.implant-info {
    flex: 1;
}

.implant-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.implant-category {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.implant-details {
    font-size: 0.85rem;
    color: var(--muted);
}

.implant-actions {
    display: flex;
    gap: 0.5rem;
}

.category-section {
    margin-bottom: 1.5rem;
}

.category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Стили для секции "Оружие" */
.weapon-item {
    background: rgba(20, 13, 35, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.weapon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.weapon-name {
    font-weight: 600;
    color: var(--text);
    font-size: 1.1rem;
}

.weapon-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.weapon-stat {
    font-size: 0.85rem;
    color: var(--muted);
}

.weapon-stat strong {
    color: var(--accent);
}

.weapon-notes {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Стили для секции "Броня" */
.armor-zones {
    display: grid;
    gap: 1rem;
}

.armor-zone {
    background: rgba(20, 13, 35, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.armor-zone-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.armor-zone-controls {
    display: flex;
    gap: 1rem;
}

/* Стили для секции "Собственность" */
.property-subsection {
    margin-bottom: 2rem;
}

.property-item {
    background: rgba(20, 13, 35, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.property-name {
    font-weight: 600;
    color: var(--text);
    font-size: 1.1rem;
}

.property-description {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.vehicle-image-wrapper {
    margin-top: 0.75rem;
}

.vehicle-image {
    width: 100%;
    max-width: 300px;
    height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-image-placeholder {
    color: var(--muted);
    font-size: 2rem;
}

.vehicle-image-actions {
    display: flex;
    gap: 0.5rem;
}

/* Стили для критических травм */
.injuries-section {
    margin-top: 1.5rem;
}

.injuries-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.injuries-list {
    margin-top: 1rem;
}

.injury-item {
    background: rgba(20, 13, 35, 0.92);
    border: 1px solid rgba(255, 91, 135, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.injury-text {
    flex: 1;
    color: var(--text);
    font-size: 0.9rem;
}

.injury-remove {
    background: var(--danger);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.injury-remove:hover {
    opacity: 0.8;
}

.basic-info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.experience-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stats-section {
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-box {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.stat-label {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.stat-value {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center !important;
    width: 100%;
    transition: all 0.3s ease;
}

.stat-value:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.3);
}

.luck-box {
    grid-column: span 1;
}

.luck-values {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.luck-separator {
    color: var(--muted);
    font-weight: bold;
}

.derived-stats-section {
    margin-bottom: 1.5rem;
}

.derived-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 120px;
    gap: 1rem;
}

.derived-stat-box {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.derived-stat-label {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.derived-stat-value {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

.derived-stat-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
}

.derived-stat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.3);
}

.health-money-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.health-box, .money-box {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.health-icon, .money-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.health-label, .money-label {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.health-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    width: 60px;
    transition: all 0.3s ease;
}

.health-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.3);
}

.health-separator {
    color: var(--muted);
    font-weight: bold;
}

.money-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    width: 100px;
    transition: all 0.3s ease;
}

.money-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.3);
}

.money-unit {
    color: var(--muted);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.reputation-section {
    margin-bottom: 1.5rem;
}

.reputation-label {
    color: #00ffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
    font-family: 'Courier New', monospace;
}

/* Градиентный слайдер репутации - КИБЕРПАНК СТИЛЬ */
.reputation-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, 
        #ff0040 0%,     /* Неоновый красный */
        #ff0080 25%,    /* Розово-красный */
        #8000ff 50%,    /* Фиолетовый */
        #4000ff 75%,    /* Синий */
        #0040ff 100%    /* Неоновый синий */
    );
    outline: none;
    cursor: pointer;
    box-shadow: 
        0 0 15px rgba(255, 0, 64, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.reputation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f8f8, #e8e8e8);
    border: 2px solid #00aaff;
    cursor: pointer;
    box-shadow: 
        0 0 8px rgba(0, 170, 255, 0.4),
        0 0 16px rgba(0, 170, 255, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.reputation-slider::-webkit-slider-thumb:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 12px rgba(0, 170, 255, 0.6),
        0 0 24px rgba(0, 170, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.reputation-slider::-webkit-slider-thumb:active {
    transform: scale(0.98);
    box-shadow: 
        0 0 6px rgba(0, 170, 255, 0.5),
        0 0 12px rgba(0, 170, 255, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.reputation-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f8f8, #e8e8e8);
    border: 2px solid #00aaff;
    cursor: pointer;
    box-shadow: 
        0 0 8px rgba(0, 170, 255, 0.4),
        0 0 16px rgba(0, 170, 255, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.reputation-slider::-moz-range-thumb:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 12px rgba(0, 170, 255, 0.6),
        0 0 24px rgba(0, 170, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.reputation-slider::-moz-range-thumb:active {
    transform: scale(0.98);
    box-shadow: 
        0 0 6px rgba(0, 170, 255, 0.5),
        0 0 12px rgba(0, 170, 255, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.reputation-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.reputation-slider {
    flex: 1;
    width: 100%;
}

.reputation-min, .reputation-max {
    color: var(--muted);
    font-size: 0.8rem;
    min-width: 30px;
}

.reputation-value {
    color: #00ffff;
    font-weight: bold;
    font-size: 1.4rem;
    min-width: 30px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
}

/* Стили для лога бросков и универсальной бросалки */
.roll-log-console {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.console-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.console-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

.injuries-section {
    margin-bottom: 1.5rem;
}

.injuries-label {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.injuries-list {
    margin-top: 0.5rem;
}

.backstory-section {
    margin-bottom: 1.5rem;
}

.backstory-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.backstory-icon {
    font-size: 1.2rem;
}

.backstory-label {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex: 1;
}

.expand-button {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.backstory-textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.backstory-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.3);
}

.backstory-textarea::placeholder {
    color: var(--muted);
}

/* Заглушка для мобильных устройств */
.mobile-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.mobile-warning-content {
    text-align: center;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.mobile-warning-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.mobile-warning-title {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.mobile-warning-text {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.mobile-warning-specs {
    background: rgba(255, 91, 135, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 1rem;
    display: grid;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.mobile-warning-specs div:first-child {
    color: var(--danger);
    font-weight: 600;
}

.mobile-warning-specs div:last-child {
    color: var(--success);
    font-weight: 600;
}

/* Улучшенная адаптивная верстка для планшетов */
@media (max-width: 1200px) and (min-width: 1024px) {
    .container {
        padding: 1rem;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .modal {
        max-width: 90vw !important;
        max-height: 90vh !important;
        margin: 1rem;
        overflow-y: auto;
    }
    
    .section {
        min-height: auto;
    }
    
    /* Улучшаем отображение основной информации на планшетах */
    .main-content > div:first-child {
        grid-template-columns: auto 1fr !important;
        gap: 1rem;
    }
    
    .avatar-placeholder {
        height: 250px !important;
    }
    
    /* Компактные кнопки для планшетов */
    .pill-button {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    /* Компактные input поля */
    .input-field, .stat-value {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    /* Улучшаем отображение характеристик */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
        gap: 0.75rem;
    }
    
    .stat-box {
        padding: 0.75rem;
    }
    
    /* Компактный header */
    .header {
        padding: 1rem;
        gap: 1rem;
    }
    
    .header-title {
        font-size: 1.3rem;
    }
    
    /* Компактные секции */
    .section-header {
        padding: 0.75rem 1rem;
    }
    
    .section-content {
        padding: 1rem;
    }
}

/* Адаптивная сетка для больших блоков */
@media (max-width: 1400px) {
    /* На средних экранах - 2 колонки */
    .sections-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 900px) {
    /* На узких экранах - 1 колонка */
    .sections-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Стили для сенсорного управления */
.touch-device .modal {
    max-height: 95vh !important;
    margin: 2.5vh auto !important;
}

.touch-device .modal-body {
    padding: 1rem !important;
    max-height: calc(95vh - 120px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.touch-device .modal-header {
    padding: 1rem !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: var(--bg-secondary) !important;
    border-bottom: 2px solid var(--border) !important;
}

.touch-device .shop-item {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    border-radius: 12px !important;
    border: 2px solid var(--border) !important;
    background: var(--bg-secondary) !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.touch-device .shop-item:hover {
    border-color: var(--accent) !important;
    background: rgba(182, 103, 255, 0.1) !important;
}

.touch-device .pill-button {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
    touch-action: manipulation !important;
}

.touch-device .shop-navigation {
    position: sticky !important;
    bottom: 0 !important;
    background: var(--bg-secondary) !important;
    border-top: 2px solid var(--border) !important;
    padding: 1rem !important;
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
}

.touch-device .shop-nav-button {
    flex: 1 !important;
    max-width: 200px !important;
    min-height: 48px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.touch-device .shop-search {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    background: var(--bg-secondary) !important;
    padding: 1rem !important;
    border-bottom: 1px solid var(--border) !important;
}

.touch-device .shop-search input {
    width: 100% !important;
    padding: 0.75rem !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
    border: 2px solid var(--border) !important;
}

/* Улучшенная прокрутка для сенсорных устройств */
.touch-device .modal-body::-webkit-scrollbar {
    width: 8px !important;
}

.touch-device .modal-body::-webkit-scrollbar-track {
    background: var(--bg-primary) !important;
    border-radius: 4px !important;
}

.touch-device .modal-body::-webkit-scrollbar-thumb {
    background: var(--accent) !important;
    border-radius: 4px !important;
}

.touch-device .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover) !important;
}

/* Стили для встроенных кнопок +/- */
.numeric-input-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
}

.numeric-input-container input {
    border: none !important;
    background: transparent !important;
    padding: 0.5rem !important;
    text-align: center !important;
    width: 60px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--text) !important;
}

/* Центровка контейнера в stat-box */
.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-box .numeric-input-container {
    display: flex;
    justify-content: center;
}

.numeric-input-button {
    background: rgba(182, 103, 255, 0.1);
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    width: 30px;
    height: 100%;
    min-height: 40px;
}

.numeric-input-button:hover {
    background: rgba(182, 103, 255, 0.2);
}

.numeric-input-button:active {
    background: rgba(182, 103, 255, 0.3);
}

/* Стили для сенсорных устройств */
.touch-device .numeric-input-button {
    min-height: 22px;
    font-size: 1rem;
}

.touch-device .numeric-input-container input {
    padding-right: 70px !important;
    padding-left: 35px !important;
}

/* Временно закомментировано для тестирования адаптивности
@media (max-width: 1023px) {
    Скрываем основной контент на экранах меньше 1024px
    .container {
        display: none !important;
    }
    
    .loading-screen {
        display: none !important;
    }
    
    .mobile-warning {
        display: flex !important;
    }
}
*/

/* Компактный дизайн для блоков характеристик */
.stats-grid-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stats-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.stats-grid-derived {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

/* Компактные блоки характеристик */
.stat-box-compact {
    background: linear-gradient(135deg, rgba(182, 103, 255, 0.08), rgba(58, 44, 247, 0.05));
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-box-compact:hover {
    border-color: rgba(182, 103, 255, 0.4);
    background: linear-gradient(135deg, rgba(182, 103, 255, 0.12), rgba(58, 44, 247, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 103, 255, 0.15);
}

.stat-label-compact {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.stat-value-compact {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(182, 103, 255, 0.3);
    border-radius: 6px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.4rem 0.5rem;
    margin: 0.25rem 0;
    transition: all 0.2s ease;
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
}

.stat-value-compact:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(182, 103, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

/* Компактные кнопки +/- */
.numeric-controls-compact {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    flex-wrap: nowrap;
    align-items: center;
}

.numeric-btn-compact {
    background: rgba(182, 103, 255, 0.1);
    border: 1px solid rgba(182, 103, 255, 0.3);
    border-radius: 4px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
}

.numeric-btn-compact:hover {
    background: rgba(182, 103, 255, 0.2);
    border-color: var(--accent);
    transform: scale(1.1);
}

.numeric-btn-compact:active {
    transform: scale(0.95);
    background: rgba(182, 103, 255, 0.3);
}

/* Специальные стили для блоков с двумя значениями (ОСОЗНАННОСТЬ, УДАЧА) */
.stat-dual-compact {
    background: linear-gradient(135deg, rgba(58, 44, 247, 0.08), rgba(182, 103, 255, 0.05));
    border: 1px solid rgba(58, 44, 247, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-dual-compact:hover {
    border-color: rgba(58, 44, 247, 0.4);
    background: linear-gradient(135deg, rgba(58, 44, 247, 0.12), rgba(182, 103, 255, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58, 44, 247, 0.15);
}

.dual-values-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.25rem 0;
}

.dual-value-compact {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(58, 44, 247, 0.3);
    border-radius: 6px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.25rem 0.4rem;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 50px;
    max-width: 80px;
    box-sizing: border-box;
}

.dual-value-compact:focus {
    outline: none;
    border-color: var(--success);
    box-shadow: 0 0 8px rgba(58, 44, 247, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.dual-separator-compact {
    color: var(--success);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Формула под блоком */
.stat-formula-compact {
    font-size: 0.6rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 0.25rem;
    line-height: 1.2;
}

/* Компактные блоки для производных характеристик */
.derived-stat-compact {
    background: linear-gradient(135deg, rgba(91, 155, 255, 0.08), rgba(182, 103, 255, 0.05));
    border: 1px solid rgba(91, 155, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.derived-stat-compact:hover {
    border-color: rgba(91, 155, 255, 0.4);
    background: linear-gradient(135deg, rgba(91, 155, 255, 0.12), rgba(182, 103, 255, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 155, 255, 0.15);
}

.derived-label-compact {
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.derived-value-compact {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

/* Компактные блоки для очков опыта и ролевых очков */
.input-group-compact {
    background: linear-gradient(135deg, rgba(182, 103, 255, 0.08), rgba(58, 44, 247, 0.05));
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.input-group-compact:hover {
    border-color: rgba(182, 103, 255, 0.4);
    background: linear-gradient(135deg, rgba(182, 103, 255, 0.12), rgba(58, 44, 247, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 103, 255, 0.15);
}

.input-label-compact {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.input-field-compact {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(182, 103, 255, 0.3);
    border-radius: 6px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.3rem 0.5rem;
    margin: 0.25rem 0;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Интегрированное поле ввода с кнопками +/- */
.integrated-numeric-input {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(182, 103, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    transition: all 0.2s ease;
    margin: 5px;
    height: 24px;
}

.integrated-numeric-input:focus-within {
    border-color: rgba(182, 103, 255, 0.6);
    box-shadow: 0 0 8px rgba(182, 103, 255, 0.3);
}

.integrated-numeric-btn {
    background: rgba(182, 103, 255, 0.1);
    border: none;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    width: 20px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.integrated-numeric-btn:hover {
    background: rgba(182, 103, 255, 0.2);
    color: var(--text);
}

.integrated-numeric-btn:active {
    background: rgba(182, 103, 255, 0.3);
    transform: scale(0.95);
}

.integrated-numeric-field {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    padding: 0.2rem 0.3rem;
    flex: 1;
    outline: none;
    min-width: 0;
    height: 24px;
}

.integrated-numeric-field:focus {
    background: rgba(0, 0, 0, 0.1);
}
.skills-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skill-item-compact {
    background: linear-gradient(135deg, rgba(182, 103, 255, 0.08), rgba(58, 44, 247, 0.05));
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-width: 0;
}

.skill-item-compact:hover {
    border-color: rgba(182, 103, 255, 0.4);
    background: linear-gradient(135deg, rgba(182, 103, 255, 0.12), rgba(58, 44, 247, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(182, 103, 255, 0.15);
}

.skill-name-compact {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
    line-height: 1.2;
    padding-right: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.skill-level-compact {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(182, 103, 255, 0.3);
    border-radius: 6px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.3rem 0.5rem;
    margin: 0.25rem 0;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.skill-level-compact:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(182, 103, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.skill-info-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.skill-stat-compact {
    font-weight: 500;
}

.skill-dice-btn-compact {
    background: rgba(182, 103, 255, 0.1);
    border: 1px solid rgba(182, 103, 255, 0.3);
    border-radius: 4px;
    color: var(--accent);
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.skill-dice-btn-compact:hover {
    background: rgba(182, 103, 255, 0.2);
    border-color: var(--accent);
    transform: scale(1.1);
}

.skill-remove-btn-compact {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(255, 91, 135, 0.1);
    border: 1px solid rgba(255, 91, 135, 0.3);
    border-radius: 4px;
    color: var(--danger);
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.skill-remove-btn-compact:hover {
    background: rgba(255, 91, 135, 0.2);
    border-color: var(--danger);
    transform: scale(1.1);
}

/* Компактные кнопки +/- для навыков */
.skill-numeric-controls-compact {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.25rem 0;
    flex-wrap: nowrap;
    align-items: center;
}

.skill-numeric-btn-compact {
    background: rgba(182, 103, 255, 0.1);
    border: 1px solid rgba(182, 103, 255, 0.3);
    border-radius: 4px;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
}

.skill-numeric-btn-compact:hover {
    background: rgba(182, 103, 255, 0.2);
    border-color: var(--accent);
    transform: scale(1.1);
}

.skill-numeric-btn-compact:active {
    transform: scale(0.95);
    background: rgba(182, 103, 255, 0.3);
}

/* Адаптация для средних экранов - 2 колонки для больших блоков */
@media (max-width: 1300px) and (min-width: 901px) {
    .sections-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    
    /* Адаптация блока профессиональных навыков */
    .professional-skills-section {
        max-width: 100% !important;
        min-width: unset !important;
    }
}

/* Адаптация для больших планшетов - 4 колонки */
@media (max-width: 1200px) and (min-width: 901px) {
    .stats-grid-derived {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Адаптация для планшетов - 1-2 колонки в зависимости от размера */
@media (max-width: 900px) {
    .sections-grid {
        grid-template-columns: 1fr;
    }
    
    /* Адаптация блока профессиональных навыков */
    .professional-skills-section {
        max-width: 100% !important;
        min-width: unset !important;
        overflow-x: auto !important;
    }
    
    /* Адаптация таблицы профессиональных навыков */
    .professional-skills-section .input-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        min-width: 100% !important;
    }
    
    /* Адаптация блоков характеристик для планшетов */
    .stats-grid-top {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .stats-grid-main {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
    
    .stats-grid-derived {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Адаптация навыков для планшетов */
    .skills-grid-compact {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .professional-skills-section .input-field {
        flex: 1 !important;
        min-width: 0 !important;
    }
}

/* Адаптация для мобильных устройств - блоки характеристик перетекают под профессиональные навыки */
@media (max-width: 768px) {
    /* На мобильных устройствах делаем одну колонку */
    .character-sheet-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Адаптация блоков характеристик для мобильных */
    .stats-grid-top {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    
    .stats-grid-main {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.3rem;
    }
    
    .stats-grid-derived {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }
    
    /* Уменьшаем размеры элементов на мобильных */
    .stat-box-compact, .derived-stat-compact, .input-group-compact, .stat-dual-compact {
        padding: 0.4rem;
        min-height: 50px;
    }
    
    .stat-label-compact, .derived-label-compact, .input-label-compact {
        font-size: 0.65rem;
    }
    
    .stat-value-compact, .derived-value-compact, .input-field-compact {
        font-size: 0.95rem;
        padding: 0.4rem 0.4rem;
        min-width: 50px;
        min-height: 40px;
    }
    
    .dual-value-compact {
        font-size: 0.95rem;
        padding: 0.4rem 0.3rem;
        min-width: 45px;
        max-width: 70px;
    }
    
    .numeric-btn-compact {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    /* Адаптация навыков для мобильных */
    .skills-grid-compact {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.3rem;
    }
    
    .skill-item-compact {
        padding: 0.4rem;
        min-height: 70px;
    }
    
    .skill-name-compact {
        font-size: 0.65rem;
    }
    
    .skill-level-compact {
        font-size: 1rem;
        padding: 0.25rem 0.4rem;
    }
    
    .skill-info-compact {
        font-size: 0.6rem;
    }
    
    .skill-dice-btn-compact {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
    
    .skill-remove-btn-compact {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .skill-numeric-btn-compact {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
}

/* Дополнительные медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sections-grid {
        grid-template-columns: 1fr;
    }
    
    /* Верхняя панель на мобильных устройствах */
    .main-content > div:first-child {
        grid-template-columns: 1fr !important;
    }
}

.notes-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(19, 31, 42, 0.8);
}

.dice-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(19, 31, 42, 0.8);
}

.distance-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(19, 31, 42, 0.8);
}

.log-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(19, 31, 42, 0.8);
}

.distance-button:active {
    transform: scale(0.95);
}

.notes-button:active {
    transform: scale(0.95);
}

/* Стили для заметок */
.note-window {
    position: fixed;
    background: linear-gradient(135deg, #131f2a, #1a2633);
    border: 2px solid #2a3d4f;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(19, 31, 42, 0.6);
    z-index: 2000;
    min-width: 300px;
    min-height: 200px;
    resize: both;
    overflow: hidden;
}

.note-header {
    background: rgba(19, 31, 42, 0.8);
    padding: 0.5rem;
    border-bottom: 1px solid #2a3d4f;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.note-title {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
    margin-right: 0.5rem;
}

.note-title-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.note-controls {
    display: flex;
    gap: 0.25rem;
}

.note-control-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;  
    font-weight: bold;
    transition: all 0.2s ease;
    color: #ffffff;
}

.note-minimize {
    color: #ffffff;
}

.note-close {
    color: #ffffff;
}

.note-control-btn:hover {
    transform: scale(1.1);
}

.note-content {
    padding: 1rem;
    height: calc(100% - 50px);
    overflow: auto;
    background: #131f2a;
}

.note-textarea {
    width: 100%;
    height: 100%;
    background: #131f2a;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: none;
    outline: none;
}

.note-textarea::placeholder {
    color: var(--muted);
}

.notes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-modal {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 2px solid var(--accent);
    border-radius: 18px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    box-shadow: 0 8px 32px rgba(182, 103, 255, 0.3);
}

.notes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.notes-modal-title {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.notes-modal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notes-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.note-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-item-info {
    flex: 1;
}

.note-item-title {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.note-item-preview {
    color: var(--muted);
    font-size: 0.85rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-item-actions {
    display: flex;
    gap: 0.5rem;
}

.notes-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Стили для панели свернутых заметок */
.minimized-notes-panel {
    position: fixed;
    bottom: 20px;
    left: 100px; /* 20px от края + 60px ширина кнопки заметок + 20px отступ */
    right: 20px;
    height: auto;
    z-index: 1500;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-end;
    pointer-events: none;
}

.minimized-note {
    background: linear-gradient(135deg, #131f2a, #1a2633);
    border: 1px solid #2a3d4f;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(19, 31, 42, 0.6);
    transition: all 0.3s ease;
    max-width: 200px;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.minimized-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 31, 42, 0.8);
}

.minimized-note-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.minimized-note-close {
    background: transparent;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.minimized-note-close:hover {
    transform: scale(1.2);
}

/* Стили для выпадающих списков */
select.input-field {
    background: linear-gradient(135deg, var(--panel), var(--panel-alt));
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.75rem;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b667ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

select.input-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(182, 103, 255, 0.3);
}

select.input-field:hover {
    border-color: var(--accent);
}

/* Стили для опций в выпадающих списках */
select.input-field option {
    background: var(--panel);
    color: var(--text);
    padding: 0.5rem;
}

select.input-field option:hover {
    background: var(--accent);
    color: var(--bg);
}

select.input-field option:checked {
    background: var(--accent);
    color: var(--bg);
}

/* Адаптивность для блока характеристик */
@media (max-width: 1200px) {
    .stats-grid-derived {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 0.3rem;
    }
}

@media (max-width: 992px) {
    .stats-grid-derived {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.25rem;
    }
}

@media (max-width: 768px) {
    .stats-grid-derived {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.2rem;
    }
}

/* ПРАВИЛЬНАЯ АДАПТИВНОСТЬ - ЭЛЕМЕНТЫ НЕ СЖИМАЮТСЯ, А ПЕРЕНОСЯТСЯ */
@media (max-width: 1200px) {
    .character-sheet-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .avatar-section {
        display: grid;
        grid-template-columns: 200px 1fr;
        grid-template-rows: auto auto auto auto auto;
        gap: 1rem;
        align-items: start;
    }
    
    .avatar-placeholder {
        grid-row: 1 / 6;
        aspect-ratio: 1;
    }
    
    .stats-grid-derived {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
        gap: 0.6rem;
    }
}

@media (max-width: 768px) {
    .character-sheet-layout {
        padding: 0.75rem;
        gap: 1rem;
    }
    
    .avatar-section {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto auto;
        gap: 0.75rem;
    }
    
    .avatar-placeholder {
        grid-row: auto;
        aspect-ratio: 1;
        max-width: 200px;
        justify-self: center;
    }
    
    .stats-grid-derived {
        grid-template-columns: repeat(3, minmax(100px, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .character-sheet-layout {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .avatar-placeholder {
        max-width: 150px;
    }
    
    .stats-grid-derived {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
        gap: 0.4rem;
    }
}

@media (max-width: 480px) {
    .character-sheet-layout {
        padding: 0.4rem;
        gap: 0.5rem;
    }
    
    .avatar-placeholder {
        max-width: 120px;
    }
    
    .stats-grid-derived {
        grid-template-columns: repeat(2, minmax(90px, 1fr));
        gap: 0.3rem;
    }
    
    /* Дополнительная адаптация полей ввода для очень маленьких экранов */
    .stat-value-compact {
        font-size: 0.9rem;
        padding: 0.4rem 0.25rem;
        min-width: 45px;
        min-height: 38px;
    }
    
    .dual-value-compact {
        font-size: 0.9rem;
        padding: 0.4rem 0.2rem;
        min-width: 42px;
        max-width: 60px;
    }
    
    .input-field-compact {
        font-size: 0.9rem;
        padding: 0.4rem 0.25rem;
        min-height: 38px;
    }
    
    .dual-separator-compact {
        font-size: 0.85rem;
        padding: 0 0.15rem;
    }
    
    /* Уменьшаем минимальные размеры блоков для маленьких экранов */
    .stat-box-compact, .stat-dual-compact {
        padding: 0.35rem;
        min-height: 45px;
    }
}

/* Дополнительная адаптация для очень маленьких экранов < 400px */
@media (max-width: 400px) {
    .stats-grid-derived {
        grid-template-columns: repeat(2, minmax(85px, 1fr));
        gap: 0.25rem;
    }
    
    .stat-value-compact, .dual-value-compact {
        font-size: 0.85rem;
        padding: 0.35rem 0.2rem;
    }
    
    .input-field-compact {
        font-size: 0.85rem;
        padding: 0.35rem 0.2rem;
    }
    
    .stat-label-compact, .derived-label-compact {
        font-size: 0.6rem;
    }
}

/* Стили для выпадающих списков */
select {
    background: var(--bg-primary) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3) !important;
    transition: all 0.3s ease !important;
}

select:hover {
    border-color: #9d4edd !important;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5) !important;
}

select:focus {
    outline: none !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.7) !important;
}

/* Стили для опций в выпадающих списках */
select option {
    background: #250f5c !important;
    color: var(--text) !important;
    padding: 0.5rem !important;
    border: none !important;
}

select option:hover {
    background: rgba(138, 43, 226, 0.4) !important;
}

select option:checked {
    background: var(--accent) !important;
    color: white !important;
}

/* Стили для выпадающих списков в модалах */
.modal select {
    background: var(--bg-primary) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3) !important;
    width: 100% !important;
}

.modal select option {
    background: #250f5c!important;
    color: var(--text) !important;
    padding: 0.5rem !important;
}

/* Стили для выпадающих списков в полях */
.field select {
    background: var(--bg-primary) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3) !important;
    width: 100% !important;
}

.field select option {
    background: #250f5c!important;
    color: var(--text) !important;
    padding: 0.5rem !important;
}

/* Стили для выпадающих списков в карточках */
.property-item select {
    background: var(--bg-primary) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3) !important;
    width: 100% !important;
}

.property-item select option {
    background: #250f5c!important;
    color: var(--text) !important;
    padding: 0.5rem !important;
}

/* Стили для выпадающих списков в поп-апах выбора деки */
.modal-overlay select {
    background: var(--bg-primary) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3) !important;
    width: 100% !important;
}

.modal-overlay select option {
    background: #250f5c!important;
    color: var(--text) !important;
    padding: 0.5rem !important;
}

/* Стили для выпадающих списков в магазинах */
.modal-body select {
    background: var(--bg-primary) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3) !important;
    width: 100% !important;
}

.modal-body select option {
    background: #250f5c!important;
    color: var(--text) !important;
    padding: 0.5rem !important;
}

/* Стили для выпадающих списков в окнах установки */
.modal select[id*="deckSelect"],
.modal select[id*="programInstallTarget"],
.modal select[id*="programDeckSelect"] {
    background: var(--bg-primary) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-size: 1rem !important;
    padding: 0.75rem !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3) !important;
    width: 100% !important;
}

.modal select[id*="deckSelect"] option,
.modal select[id*="programInstallTarget"] option,
.modal select[id*="programDeckSelect"] option {
    background: #250f5c!important;
    color: var(--text) !important;
    padding: 0.5rem !important;
}

/* Стили для компактной кнопки "Бросок Инициативы" */
.initiative-compact {
    background: linear-gradient(135deg, rgba(58, 44, 247, 0.08), rgba(182, 103, 255, 0.05));
    border: 1px solid rgba(58, 44, 247, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.initiative-compact:hover {
    border-color: rgba(58, 44, 247, 0.4);
    background: linear-gradient(135deg, rgba(58, 44, 247, 0.12), rgba(182, 103, 255, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58, 44, 247, 0.15);
}

.initiative-icon-compact {
    width: 35px;
    height: 35px;
    object-fit: contain;
    flex-shrink: 0;
}

.initiative-text-compact {
    flex: 1;
    text-align: left;
}

.initiative-title-compact {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.1rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.initiative-result-compact {
    font-size: 0.6rem;
    color: var(--text);
    font-weight: 600;
}

.initiative-modifier-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 50px;
}

.initiative-modifier-label {
    font-size: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    text-align: center;
}

.initiative-modifier-input {
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--text);
    padding: 0.2rem 0.3rem;
    font-size: 0.7rem;
    text-align: center;
    width: 100%;
    max-width: 40px;
}

/* ============================================ */
/* СЧЕТЧИКИ - Механический дизайн */
/* ============================================ */

/* Модал со списком счетчиков */
.counters-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.counters-modal {
    background: linear-gradient(135deg, #171125, #211630);
    border-radius: 18px;
    padding: 2rem;
    border: 2px solid rgba(182, 103, 255, 0.5);
    box-shadow: 0 8px 40px rgba(182, 103, 255, 0.4);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.counters-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(182, 103, 255, 0.3);
}

.counters-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.counters-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.counter-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(182, 103, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.counter-item:hover {
    border-color: rgba(182, 103, 255, 0.5);
    background: rgba(182, 103, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(182, 103, 255, 0.2);
}

.counter-item-info {
    flex: 1;
}

.counter-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.counter-item-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

.counter-item-actions {
    display: flex;
    gap: 0.5rem;
}

.counters-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Окно счетчика - КОМПАКТНАЯ ВЕРСИЯ С ЭФФЕКТОМ МАТОВОГО СТЕКЛА */
.counter-window {
    position: fixed;
    background: linear-gradient(135deg, rgba(26, 42, 74, 0.95), rgba(42, 58, 90, 0.95));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8), 
        0 0 0 2px rgba(91, 155, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1500;
    min-width: 180px;
    max-width: 220px;
    overflow: hidden;
    border: 2px solid rgba(91, 155, 255, 0.8);
    background-image: 
        linear-gradient(135deg, rgba(91, 155, 255, 0.1) 25%, transparent 25%),
        linear-gradient(225deg, rgba(91, 155, 255, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, rgba(91, 155, 255, 0.1) 25%, transparent 25%),
        linear-gradient(315deg, rgba(91, 155, 255, 0.1) 25%, transparent 25%);
    background-size: 10px 10px;
    background-position: 5px 0, 5px 0, 0 0, 0 0;
}

.counter-header {
    background: linear-gradient(135deg, rgba(91, 155, 255, 0.5), rgba(58, 123, 247, 0.45));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.3rem 0.5rem;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(91, 155, 255, 0.6);
    user-select: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.counter-title-input {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(91, 155, 255, 0.7);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem;
    flex: 1;
    margin-right: 0.3rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.counter-title-input:focus {
    outline: none;
    border-color: #5b9bff;
    box-shadow: 0 0 8px rgba(91, 155, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Кнопка свернуть в заголовке */
.counter-minimize-btn {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid #5b9bff;
    border-radius: 4px;
    color: #5b9bff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-left: 0.2rem;
    min-width: 24px;
    min-height: 24px;
}

/* Кнопка сброса между + и - */
.counter-reset-btn {
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
    border: 1px solid #5a5a5a;
    color: #e0e0e0;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    user-select: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    width: 42px;
    height: 24px;
    border-radius: 4px;
}

.counter-minimize-btn:hover {
    background: rgba(91, 155, 255, 0.6);
    border-color: #5b9bff;
    transform: scale(1.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.counter-reset-btn:hover {
    background: linear-gradient(180deg, #5a5a5a 0%, #4a4a4a 100%);
    border-color: #6a6a6a;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.counter-content {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

/* Механический дисплей счетчика - КОМПАКТНАЯ ВЕРСИЯ */
.counter-display {
    display: flex;
    gap: 0.15rem;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    min-height: 35px;
    padding: 0 0.2rem;
}

.counter-digit {
    position: relative;
    width: 18px;
    height: 28px;
    background: linear-gradient(180deg, rgba(10, 21, 37, 0.9) 0%, rgba(26, 37, 53, 0.9) 50%, rgba(10, 21, 37, 0.9) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(91, 155, 255, 0.7);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 
        inset 0 1px 4px rgba(0, 0, 0, 0.8),
        0 2px 6px rgba(91, 155, 255, 0.6),
        0 0 10px rgba(91, 155, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.counter-digit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.counter-digit-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.counter-digit-value {
    font-family: 'Courier New', 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 1.1rem;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 
        0 0 5px rgba(0, 255, 255, 0.8),
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 15px rgba(0, 255, 255, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

/* Анимация переворота вверх - КОМПАКТНАЯ */
@keyframes flipUp {
    0% {
        transform: translateY(0) rotateX(0deg);
    }
    50% {
        transform: translateY(-4px) rotateX(12deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0) rotateX(0deg);
    }
}

/* Анимация переворота вниз - КОМПАКТНАЯ */
@keyframes flipDown {
    0% {
        transform: translateY(0) rotateX(0deg);
    }
    50% {
        transform: translateY(4px) rotateX(-12deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0) rotateX(0deg);
    }
}

.counter-digit.flip-up .counter-digit-inner {
    animation: flipUp 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.counter-digit.flip-down .counter-digit-inner {
    animation: flipDown 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Кнопки управления счетчиком - ПРЯМОУГОЛЬНЫЕ СЕРЫЕ */
.counter-buttons {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.counter-btn {
    width: 42px;
    height: 24px;
    border-radius: 4px;
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
    border: 1px solid #5a5a5a;
    color: #e0e0e0;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    user-select: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.counter-btn:hover {
    background: linear-gradient(180deg, #5a5a5a 0%, #4a4a4a 100%);
    border-color: #6a6a6a;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.counter-btn:active {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

/* Редактируемые цифры */
.counter-digit-editable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.counter-digit-editable:hover {
    border-color: rgba(91, 155, 255, 0.9);
    box-shadow: 
        inset 0 1px 4px rgba(0, 0, 0, 0.8),
        0 2px 8px rgba(91, 155, 255, 0.7),
        0 0 15px rgba(91, 155, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Кнопка hover эффекты для плавающих кнопок */
.counter-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(19, 31, 42, 0.8);
    border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* СВЕТЛАЯ ТЕМА                                                             */
/* ═══════════════════════════════════════════════════════════════════════ */

body.light-theme {
    background: #d2d2d2;
    color: #2d2d2d;
}

body.light-theme::before {
    opacity: 0.1;
    background-image: url('data:image/svg+xml;utf8,<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="circuit" x="0" y="0" width="400" height="400" patternUnits="userSpaceOnUse"><rect width="400" height="400" fill="none"/><circle cx="50" cy="50" r="3" fill="%23666666"/><circle cx="120" cy="30" r="2.5" fill="%23777777"/><circle cx="200" cy="50" r="4" fill="%23666666"/><circle cx="280" cy="30" r="2.5" fill="%23777777"/><circle cx="350" cy="50" r="3" fill="%23666666"/><circle cx="30" cy="120" r="2.5" fill="%23777777"/><circle cx="80" cy="100" r="2" fill="%23888888"/><circle cx="150" cy="120" r="3" fill="%23666666"/><circle cx="250" cy="100" r="2" fill="%23888888"/><circle cx="320" cy="120" r="2.5" fill="%23777777"/><circle cx="370" cy="100" r="2" fill="%23888888"/><circle cx="50" cy="200" r="4" fill="%23666666"/><circle cx="200" cy="200" r="5" fill="%23777777"/><circle cx="350" cy="200" r="4" fill="%23666666"/><circle cx="30" cy="280" r="2.5" fill="%23777777"/><circle cx="80" cy="300" r="2" fill="%23888888"/><circle cx="150" cy="280" r="3" fill="%23666666"/><circle cx="250" cy="300" r="2" fill="%23888888"/><circle cx="320" cy="280" r="2.5" fill="%23777777"/><circle cx="370" cy="300" r="2" fill="%23888888"/><circle cx="50" cy="350" r="3" fill="%23666666"/><circle cx="120" cy="370" r="2.5" fill="%23777777"/><circle cx="200" cy="350" r="4" fill="%23666666"/><circle cx="280" cy="370" r="2.5" fill="%23777777"/><circle cx="350" cy="350" r="3" fill="%23666666"/><path d="M 50 50 L 50 80 Q 50 100 70 100 L 150 100 Q 150 100 150 120" stroke="%23666666" stroke-width="1.2" fill="none"/><path d="M 200 50 L 200 100 L 250 100" stroke="%23666666" stroke-width="1" fill="none"/><path d="M 350 50 L 350 80 Q 350 100 330 100 L 320 100 Q 320 100 320 120" stroke="%23666666" stroke-width="1.2" fill="none"/><path d="M 50 200 L 100 200 Q 120 200 120 180 L 120 150 Q 120 130 140 130 L 150 120" stroke="%23666666" stroke-width="1" fill="none"/><path d="M 200 200 L 180 200 Q 160 200 160 180 L 160 150" stroke="%23777777" stroke-width="1.3" fill="none"/><path d="M 200 200 L 220 200 Q 240 200 240 180 L 240 150" stroke="%23777777" stroke-width="1.3" fill="none"/><path d="M 200 200 L 200 240 Q 200 260 180 260 L 150 260 Q 150 270 150 280" stroke="%23666666" stroke-width="1" fill="none"/><path d="M 350 200 L 350 240 Q 350 260 330 260 L 320 260 Q 320 270 320 280" stroke="%23666666" stroke-width="1.2" fill="none"/><path d="M 50 350 L 50 320 Q 50 300 70 300 L 80 300" stroke="%23666666" stroke-width="1.2" fill="none"/><path d="M 200 350 L 200 300 L 250 300" stroke="%23666666" stroke-width="1" fill="none"/><path d="M 350 350 L 350 320 Q 350 300 370 300" stroke="%23666666" stroke-width="1.2" fill="none"/><path d="M 120 30 L 80 30 Q 60 30 60 50 L 50 50" stroke="%23777777" stroke-width="0.8" fill="none"/><path d="M 120 30 L 160 30 Q 180 30 180 50 L 200 50" stroke="%23777777" stroke-width="0.8" fill="none"/><path d="M 280 30 L 240 30 Q 220 30 220 50 L 200 50" stroke="%23777777" stroke-width="0.8" fill="none"/><path d="M 280 30 L 320 30 Q 340 30 340 50 L 350 50" stroke="%23777777" stroke-width="0.8" fill="none"/><path d="M 30 120 L 50 120 Q 70 120 70 140 L 70 160" stroke="%23777777" stroke-width="0.7" fill="none"/><path d="M 30 280 L 50 280 Q 70 280 70 300 L 80 300" stroke="%23777777" stroke-width="0.7" fill="none"/><line x1="80" y1="100" x2="100" y2="100" stroke="%23888888" stroke-width="0.6"/><line x1="250" y1="100" x2="280" y2="100" stroke="%23888888" stroke-width="0.6"/><line x1="370" y1="100" x2="390" y2="100" stroke="%23888888" stroke-width="0.6"/><line x1="80" y1="300" x2="100" y2="300" stroke="%23888888" stroke-width="0.6"/><line x1="250" y1="300" x2="280" y2="300" stroke="%23888888" stroke-width="0.6"/><line x1="370" y1="300" x2="390" y2="300" stroke="%23888888" stroke-width="0.6"/><rect x="195" y="195" width="10" height="10" fill="%23777777" opacity="0.3"/><rect x="185" y="185" width="30" height="30" fill="none" stroke="%23777777" stroke-width="1.2"/><rect x="178" y="178" width="44" height="44" fill="none" stroke="%23666666" stroke-width="0.6" opacity="0.6"/><line x1="185" y1="200" x2="215" y2="200" stroke="%23777777" stroke-width="0.5" opacity="0.7"/><line x1="200" y1="185" x2="200" y2="215" stroke="%23777777" stroke-width="0.5" opacity="0.7"/><line x1="190" y1="185" x2="190" y2="215" stroke="%23666666" stroke-width="0.4" opacity="0.5"/><line x1="210" y1="185" x2="210" y2="215" stroke="%23666666" stroke-width="0.4" opacity="0.5"/><line x1="185" y1="190" x2="215" y2="190" stroke="%23666666" stroke-width="0.4" opacity="0.5"/><line x1="185" y1="210" x2="215" y2="210" stroke="%23666666" stroke-width="0.4" opacity="0.5"/><circle cx="100" cy="160" r="1.5" fill="%23888888"/><circle cx="130" cy="170" r="1.5" fill="%23888888"/><circle cx="270" cy="160" r="1.5" fill="%23888888"/><circle cx="300" cy="170" r="1.5" fill="%23888888"/><circle cx="100" cy="240" r="1.5" fill="%23888888"/><circle cx="130" cy="230" r="1.5" fill="%23888888"/><circle cx="270" cy="240" r="1.5" fill="%23888888"/><circle cx="300" cy="230" r="1.5" fill="%23888888"/><path d="M 100 160 L 100 180 Q 100 190 110 190 L 130 190 Q 140 190 140 180 L 140 170 L 130 170" stroke="%23888888" stroke-width="0.5" fill="none" opacity="0.8"/><path d="M 270 160 L 270 180 Q 270 190 280 190 L 300 190 Q 310 190 310 180 L 310 170 L 300 170" stroke="%23888888" stroke-width="0.5" fill="none" opacity="0.8"/><rect x="45" y="45" width="10" height="10" fill="none" stroke="%23666666" stroke-width="0.7" rx="1"/><rect x="195" y="45" width="10" height="10" fill="none" stroke="%23666666" stroke-width="0.7" rx="1"/><rect x="345" y="45" width="10" height="10" fill="none" stroke="%23666666" stroke-width="0.7" rx="1"/><rect x="45" y="195" width="10" height="10" fill="none" stroke="%23666666" stroke-width="0.7" rx="1"/><rect x="345" y="195" width="10" height="10" fill="none" stroke="%23666666" stroke-width="0.7" rx="1"/><rect x="45" y="345" width="10" height="10" fill="none" stroke="%23666666" stroke-width="0.7" rx="1"/><rect x="195" y="345" width="10" height="10" fill="none" stroke="%23666666" stroke-width="0.7" rx="1"/><rect x="345" y="345" width="10" height="10" fill="none" stroke="%23666666" stroke-width="0.7" rx="1"/></pattern></defs><rect width="400" height="400" fill="url(%23circuit)"/></svg>');
}

body.light-theme .main-interface {
    --bg: #d2d2d2;
    --panel: #e8e8e8;
    --panel-alt: #e0e0e0;
    --accent: #4a4a4a;
    --accent-2: #666666;
    --text: #2d2d2d;
    --muted: #6e6e73;
    --danger: #8b0000;
    --success: #006400;
    --warning: #8b5a00;
    --border: rgba(74, 74, 74, 0.4);
    --shadow: 0 0 22px rgba(74, 74, 74, 0.2);
}

body.light-theme .section,
body.light-theme .modal {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
}

body.light-theme .input-field,
body.light-theme .input-field-compact,
body.light-theme textarea {
    background: #e8e8e8;
    border-color: rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .loading-screen {
    background: #d2d2d2;
}

body.light-theme .loading-screen::before {
    opacity: 0.1;
}

/* Дополнительные стили для полной инверсии */
body.light-theme .pill-button {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border-color: rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .pill-button.primary-button {
    background: linear-gradient(135deg, #4a4a4a, #666666);
    color: #e8e8e8;
}

body.light-theme .pill-button.danger-button {
    background: linear-gradient(135deg, #8b0000, #a00000);
    color: #e8e8e8;
}

body.light-theme .pill-button.success-button {
    background: linear-gradient(135deg, #006400, #008000);
    color: #e8e8e8;
}

body.light-theme .pill-button.warning-button {
    background: linear-gradient(135deg, #8b5a00, #b8860b);
    color: #e8e8e8;
}

body.light-theme .header {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border-bottom: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .section-title {
    color: #4a4a4a;
}

body.light-theme .input-label {
    color: #4a4a4a;
}

body.light-theme .floating-log-window {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .floating-log-header {
    background: linear-gradient(135deg, #e0e0e0, #d8d8d8);
    border-bottom: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .counter-button,
body.light-theme .distance-button,
body.light-theme .dice-button,
body.light-theme .notes-button,
body.light-theme .log-button {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .minimized-log {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
}

/* Стили счетчиков для светлой темы */
body.light-theme .counter-window {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.95), rgba(224, 224, 224, 0.95));
}

body.light-theme .counter-header {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.3), rgba(102, 102, 102, 0.25));
}

body.light-theme .counter-minimize-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #4a4a4a;
    color: #2d2d2d;
}

body.light-theme .counter-minimize-btn:hover {
    background: rgba(74, 74, 74, 0.6);
    border-color: #4a4a4a;
    color: #e8e8e8;
}

body.light-theme .counter-reset-btn {
    background: linear-gradient(180deg, #e0e0e0 0%, #d0d0d0 100%);
    border: 1px solid #8a8a8a;
    color: #2d2d2d;
}

body.light-theme .counter-reset-btn:hover {
    background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
    border-color: #9a9a9a;
}

body.light-theme .counter-title-input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ СВЕТЛОЙ ТЕМЫ - ЧИТАЕМОСТЬ ТЕКСТА              */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Заголовки в светлой теме */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
    color: #2d2d2d;
}

body.light-theme .header-title {
    color: #4a4a4a;
}

/* Обычный текст в светлой теме */
body.light-theme p,
body.light-theme span,
body.light-theme div {
    color: #2d2d2d;
}

/* Ссылки в светлой теме */
body.light-theme a {
    color: #4a4a4a;
}

body.light-theme a:hover {
    color: #666666;
}

/* Карточки в светлой теме */
body.light-theme .card {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .card-title {
    color: #2d2d2d;
}

body.light-theme .card-content {
    color: #2d2d2d;
}

/* Таблицы в светлой теме */
body.light-theme .table th {
    background: rgba(74, 74, 74, 0.1);
    color: #2d2d2d;
}

body.light-theme .table td {
    color: #2d2d2d;
}

body.light-theme .table tr:hover {
    background: rgba(74, 74, 74, 0.05);
}

/* Списки в светлой теме */
body.light-theme .list-item {
    background: rgba(74, 74, 74, 0.1);
    color: #2d2d2d;
}

body.light-theme .list-item:hover {
    background: rgba(74, 74, 74, 0.2);
}

/* Прогресс-бары в светлой теме */
body.light-theme .progress-bar {
    background: rgba(74, 74, 74, 0.2);
    border: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .progress-fill {
    background: linear-gradient(90deg, #4a4a4a, #666666);
}

/* Уведомления в светлой теме */
body.light-theme .notification {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .notification.success {
    border-color: #006400;
    background: linear-gradient(135deg, #e8f5e8, #e0f0e0);
}

body.light-theme .notification.error {
    border-color: #8b0000;
    background: linear-gradient(135deg, #f5e8e8, #f0e0e0);
}

/* Модальные окна в светлой теме */
body.light-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

body.light-theme .modal-content {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .modal-header {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.1), rgba(74, 74, 74, 0.05));
    border-bottom: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .modal-header h3 {
    color: #2d2d2d;
}

body.light-theme .modal-body {
    color: #2d2d2d;
}

/* Выпадающие списки в светлой теме */
body.light-theme select {
    background: #e8e8e8;
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme select option {
    background: #e8e8e8;
    color: #2d2d2d;
}

/* Тултипы в светлой теме */
body.light-theme .tooltip {
    background: #2d2d2d;
    color: #e8e8e8;
    border: 1px solid rgba(74, 74, 74, 0.4);
}

/* Бейджи в светлой теме */
body.light-theme .badge {
    background: #4a4a4a;
    color: #e8e8e8;
}

/* Алерты в светлой теме */
body.light-theme .alert {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .alert.success {
    background: linear-gradient(135deg, #e8f5e8, #e0f0e0);
    border-color: #006400;
}

body.light-theme .alert.error {
    background: linear-gradient(135deg, #f5e8e8, #f0e0e0);
    border-color: #8b0000;
}

body.light-theme .alert.warning {
    background: linear-gradient(135deg, #f5f0e8, #f0ebe0);
    border-color: #8b5a00;
}

/* Навигация в светлой теме */
body.light-theme .nav {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border-bottom: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .nav-item {
    color: #2d2d2d;
}

body.light-theme .nav-item:hover {
    background: rgba(74, 74, 74, 0.1);
}

body.light-theme .nav-item.active {
    background: rgba(74, 74, 74, 0.2);
    color: #2d2d2d;
}

/* Табы в светлой теме */
body.light-theme .tab {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .tab:hover {
    background: rgba(74, 74, 74, 0.1);
}

body.light-theme .tab.active {
    background: rgba(74, 74, 74, 0.2);
    color: #2d2d2d;
}

/* Аккордеоны в светлой теме */
body.light-theme .accordion {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .accordion-header {
    background: rgba(74, 74, 74, 0.1);
    color: #2d2d2d;
}

body.light-theme .accordion-content {
    background: #e8e8e8;
    color: #2d2d2d;
}

/* Слайдеры в светлой теме */
body.light-theme .slider {
    background: rgba(74, 74, 74, 0.2);
}

body.light-theme .slider-thumb {
    background: #4a4a4a;
}

/* Чекбоксы в светлой теме */
body.light-theme .checkbox {
    border: 2px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .checkbox:checked {
    background: #4a4a4a;
}

/* Радиокнопки в светлой теме */
body.light-theme .radio {
    border: 2px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .radio:checked {
    background: #4a4a4a;
}

/* Переключатели в светлой теме */
body.light-theme .toggle {
    background: rgba(74, 74, 74, 0.2);
}

body.light-theme .toggle.active {
    background: #4a4a4a;
}

/* Спиннеры в светлой теме */
body.light-theme .spinner {
    border-color: rgba(74, 74, 74, 0.2);
    border-top-color: #4a4a4a;
}

/* Сайдбары в светлой теме */
body.light-theme .sidebar {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border-right: 1px solid rgba(74, 74, 74, 0.4);
}

/* Футеры в светлой теме */
body.light-theme .footer {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border-top: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

/* Контейнеры в светлой теме */
body.light-theme .container {
    background: transparent;
}

/* Сетки в светлой теме */
body.light-theme .grid {
    background: transparent;
}

/* Флексбоксы в светлой теме */
body.light-theme .flex {
    background: transparent;
}

/* Утилитарные классы для светлой темы */
body.light-theme .text-primary { color: #4a4a4a; }
body.light-theme .text-secondary { color: #6e6e73; }
body.light-theme .text-success { color: #006400; }
body.light-theme .text-danger { color: #8b0000; }
body.light-theme .text-warning { color: #8b5a00; }
body.light-theme .text-muted { color: #6e6e73; }

body.light-theme .bg-primary { background: #4a4a4a; }
body.light-theme .bg-secondary { background: #6e6e73; }
body.light-theme .bg-success { background: #006400; }
body.light-theme .bg-danger { background: #8b0000; }
body.light-theme .bg-warning { background: #8b5a00; }
body.light-theme .bg-light { background: #e8e8e8; }
body.light-theme .bg-dark { background: #2d2d2d; }

body.light-theme .border-primary { border-color: #4a4a4a; }
body.light-theme .border-secondary { border-color: #6e6e73; }
body.light-theme .border-success { border-color: #006400; }
body.light-theme .border-danger { border-color: #8b0000; }
body.light-theme .border-warning { border-color: #8b5a00; }

/* Состояния hover, focus, active для светлой темы */
body.light-theme .btn:hover,
body.light-theme button:hover {
    background: rgba(74, 74, 74, 0.1);
}

body.light-theme .btn:focus,
body.light-theme button:focus {
    outline: 2px solid #4a4a4a;
    outline-offset: 2px;
}

body.light-theme .btn:active,
body.light-theme button:active {
    background: rgba(74, 74, 74, 0.2);
}

/* Disabled состояния для светлой темы */
body.light-theme .btn:disabled,
body.light-theme button:disabled,
body.light-theme input:disabled,
body.light-theme select:disabled,
body.light-theme textarea:disabled {
    background: rgba(74, 74, 74, 0.1);
    color: #6e6e73;
    opacity: 0.6;
}

/* Selected состояния для светлой темы */
body.light-theme .selected {
    background: rgba(74, 74, 74, 0.2);
    color: #2d2d2d;
}

/* Дополнительные стили для улучшения читаемости */
body.light-theme .muted {
    color: #6e6e73;
}

body.light-theme .text-center {
    text-align: center;
}

body.light-theme .text-left {
    text-align: left;
}

body.light-theme .text-right {
    text-align: right;
}

/* Стили для загрузочного экрана в светлой теме */
body.light-theme .loading-logo {
    color: #4a4a4a;
    text-shadow: 0 0 10px rgba(74, 74, 74, 0.5);
}

body.light-theme .loading-log-item {
    color: #4a4a4a;
}

body.light-theme .loading-log-code {
    color: #4a4a4a;
}

body.light-theme .loading-log-text {
    color: #4a4a4a;
}

body.light-theme .loading-log-ok {
    color: #006400;
    text-shadow: 0 0 5px rgba(0, 100, 0, 0.5);
}

body.light-theme .loading-progress {
    background: #e8e8e8;
    border: 2px solid #4a4a4a;
}

body.light-theme .loading-progress-bar {
    background: #006400;
    box-shadow: 0 0 10px rgba(0, 100, 0, 0.5);
}

body.light-theme .loading-progress-text {
    color: #006400;
    text-shadow: 0 0 5px rgba(0, 100, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* СПЕЦИФИЧЕСКИЕ КОМПОНЕНТЫ ПРОЕКТА ДЛЯ СВЕТЛОЙ ТЕМЫ                      */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Поля ввода в светлой теме */
body.light-theme .input-field {
    background: #e8e8e8;
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .input-field:focus {
    border-color: #4a4a4a;
    box-shadow: 0 0 0 2px rgba(74, 74, 74, 0.1);
}

body.light-theme .input-field::placeholder {
    color: #6e6e73;
}

body.light-theme .input-field-compact {
    background: #e8e8e8;
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .input-field-compact:focus {
    border-color: #4a4a4a;
    box-shadow: 0 0 0 2px rgba(74, 74, 74, 0.1);
}

/* Группы полей ввода в светлой теме */
body.light-theme .input-group {
    background: transparent;
}

body.light-theme .input-group-compact {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.08), rgba(102, 102, 102, 0.05));
    border: 1px solid rgba(74, 74, 74, 0.2);
}

body.light-theme .input-group-compact:hover {
    border-color: rgba(74, 74, 74, 0.4);
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.12), rgba(102, 102, 102, 0.08));
}

/* Сетки характеристик в светлой теме */
body.light-theme .stats-grid,
body.light-theme .stats-grid-top,
body.light-theme .stats-grid-main,
body.light-theme .stats-grid-derived {
    background: transparent;
}

body.light-theme .stat-box-compact,
body.light-theme .stat-dual-compact {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.08), rgba(102, 102, 102, 0.05));
    border: 1px solid rgba(74, 74, 74, 0.2);
}

body.light-theme .stat-box-compact:hover,
body.light-theme .stat-dual-compact:hover {
    border-color: rgba(74, 74, 74, 0.4);
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.12), rgba(102, 102, 102, 0.08));
}

body.light-theme .stat-value-compact,
body.light-theme .dual-value-compact {
    background: #e8e8e8;
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .stat-value-compact:focus,
body.light-theme .dual-value-compact:focus {
    border-color: #4a4a4a;
    box-shadow: 0 0 0 2px rgba(74, 74, 74, 0.1);
}

/* Секции травм и предыстории в светлой теме */
body.light-theme .injuries-section,
body.light-theme .backstory-section {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.05), rgba(102, 102, 102, 0.1));
    border: 1px solid rgba(74, 74, 74, 0.15);
}

body.light-theme .injuries-section:hover,
body.light-theme .backstory-section:hover {
    border-color: rgba(74, 74, 74, 0.3);
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.08), rgba(102, 102, 102, 0.15));
}

body.light-theme .injuries-label,
body.light-theme .backstory-title,
body.light-theme .backstory-label {
    color: #4a4a4a;
}

body.light-theme .backstory-item {
    background: rgba(74, 74, 74, 0.1);
    border: 1px solid rgba(74, 74, 74, 0.15);
    color: #2d2d2d;
}

body.light-theme .backstory-item:hover {
    border-color: rgba(74, 74, 74, 0.3);
    background: rgba(74, 74, 74, 0.2);
}

body.light-theme .backstory-textarea {
    background: #e8e8e8;
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .backstory-textarea:focus {
    border-color: #4a4a4a;
    box-shadow: 0 0 0 2px rgba(74, 74, 74, 0.1);
}

body.light-theme .backstory-textarea::placeholder {
    color: #6e6e73;
}

/* Контейнер предыстории в светлой теме */
body.light-theme .backstory-display {
    background: transparent !important;
    border: 1px solid rgba(74, 74, 74, 0.2) !important;
}

/* Кубики в светлой теме */
body.light-theme .dice {
    background: #e8e8e8;
    border: 2px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .dice-result {
    color: #2d2d2d;
}

body.light-theme .dice-special.fail {
    color: #8b0000;
}

body.light-theme .dice-special.crit {
    color: #006400;
}

/* Счетчики в светлой теме */
body.light-theme .counter-button,
body.light-theme .distance-button,
body.light-theme .dice-button,
body.light-theme .notes-button,
body.light-theme .log-button {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .counter-button:hover,
body.light-theme .distance-button:hover,
body.light-theme .dice-button:hover,
body.light-theme .notes-button:hover,
body.light-theme .log-button:hover {
    background: rgba(74, 74, 74, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* БУРГЕР-МЕНЮ СТИЛИ                                                      */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Основной контейнер бургер-меню */
.burger-menu-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

/* Главная кнопка бургера */
.burger-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #131f2a, #1a2633);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(19, 31, 42, 0.6);
    transition: all 0.3s ease;
    border: 2px solid #2a3d4f;
}

.burger-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(19, 31, 42, 0.8);
    border-color: var(--accent);
}

.burger-button:active {
    transform: scale(0.95);
}

/* Контейнер для элементов меню */
.burger-menu-items {
    position: absolute;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.burger-menu-items.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Элементы меню */
.burger-menu-item {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #131f2a, #1a2633);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(19, 31, 42, 0.6);
    transition: all 0.3s ease;
    border: 2px solid #2a3d4f;
    transform: scale(0);
    z-index: 1001;
    opacity: 0;
}

.burger-menu-item:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(19, 31, 42, 0.8);
    border-color: var(--accent);
}

.burger-menu-item:active {
    transform: scale(0.95) !important;
}

/* Позиционирование элементов в четверть круга с правильными расстояниями */
/* Правильное вертикальное расположение с отступом 20px */
.burger-menu-item:nth-child(1) {
    /* Счетчики - самый верхний */
    bottom: 420px;
    left: 0;
    z-index: 1001;
}

.burger-menu-item:nth-child(2) {
    /* Расстояние */
    bottom: 340px;
    left: 0;
    z-index: 1001;
}

.burger-menu-item:nth-child(3) {
    /* Кубики */
    bottom: 260px;
    left: 0;
    z-index: 1001;
}

.burger-menu-item:nth-child(4) {
    /* Логи */
    bottom: 180px;
    left: 0;
    z-index: 1001;
}

.burger-menu-item:nth-child(5) {
    /* Заметки - самый нижний */
    bottom: 100px;
    left: 0;
    z-index: 1001;
}

/* Простая анимация появления элементов */
.burger-menu-item.animate-in {
    animation: burgerItemAppear 0.4s ease-out forwards;
    transform: scale(1) !important;
    opacity: 1 !important;
}

.burger-menu-item.animate-out {
    animation: burgerItemDisappear 0.3s ease-in forwards;
}

@keyframes burgerItemAppear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes burgerItemDisappear {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Светлая тема для бургер-меню */
body.light-theme .burger-button,
body.light-theme .burger-menu-item {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .burger-button:hover,
body.light-theme .burger-menu-item:hover {
    background: rgba(74, 74, 74, 0.1);
    border-color: var(--accent);
}

/* Плавающие окна логов в светлой теме */
body.light-theme .floating-log-window {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .floating-log-header {
    background: linear-gradient(135deg, #e0e0e0, #d8d8d8);
    border-bottom: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .minimized-log {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

/* Подзаголовки секций в светлой теме */
body.light-theme .section-subtitle {
    color: #4a4a4a;
}

/* Полноширинные секции в светлой теме */
body.light-theme .full-width-section {
    background: transparent;
}

body.light-theme .full-width-section .section-title {
    color: #4a4a4a;
}

/* Профессиональные навыки в светлой теме */
body.light-theme .professional-skills-content .pill-button {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .professional-skills-content .pill-button:hover {
    background: rgba(74, 74, 74, 0.1);
}

/* Сетка деки в светлой теме */
body.light-theme .deck-stats-grid {
    background: transparent;
}

/* Дополнительные стили для улучшения контрастности */
body.light-theme .character-info {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .character-info h3,
body.light-theme .character-info h4 {
    color: #4a4a4a;
}

body.light-theme .character-info p {
    color: #2d2d2d;
}

/* Стили для заметок в светлой теме */
body.light-theme .notes-section {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .notes-textarea {
    background: #e8e8e8;
    border: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme .notes-textarea:focus {
    border-color: #4a4a4a;
    box-shadow: 0 0 0 2px rgba(74, 74, 74, 0.1);
}

body.light-theme .notes-textarea::placeholder {
    color: #6e6e73;
}

/* Стили для логов в светлой теме */
body.light-theme .log-section {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .log-content {
    background: #e8e8e8;
    color: #2d2d2d;
}

/* Стили для дистанции в светлой теме */
body.light-theme .distance-section {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 1px solid rgba(74, 74, 74, 0.4);
}

body.light-theme .distance-display {
    color: #2d2d2d;
}

/* Стили для специальных кнопок в светлой теме */
body.light-theme .pill-button.muted-button {
    background: linear-gradient(135deg, rgba(110, 110, 115, 0.1), rgba(110, 110, 115, 0.05));
    border-color: rgba(110, 110, 115, 0.3);
    color: #2d2d2d;
}

body.light-theme .pill-button.muted-button:hover {
    background: linear-gradient(135deg, rgba(110, 110, 115, 0.2), rgba(110, 110, 115, 0.1));
    border-color: #6e6e73;
}

body.light-theme .pill-button.dark-blue-button {
    background: linear-gradient(135deg, #4a4a4a, #666666);
    border-color: #2d2d2d;
    color: #e8e8e8;
}

body.light-theme .pill-button.dark-blue-button:hover {
    background: linear-gradient(135deg, #666666, #4a4a4a);
    box-shadow: 0 0 30px rgba(74, 74, 74, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* АДАПТИВНОСТЬ И МЕДИА-ЗАПРОСЫ ДЛЯ СВЕТЛОЙ ТЕМЫ                          */
/* ═══════════════════════════════════════════════════════════════════════ */

/* Мобильная адаптивность для светлой темы */
@media (max-width: 768px) {
    body.light-theme .section {
        background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
        border: 1px solid rgba(74, 74, 74, 0.4);
    }
    
    body.light-theme .modal {
        background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
        border: 2px solid rgba(74, 74, 74, 0.4);
    }
    
    body.light-theme .pill-button {
        background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
        border: 1px solid rgba(74, 74, 74, 0.4);
        color: #2d2d2d;
    }
    
    body.light-theme .input-field {
        background: #e8e8e8;
        border: 1px solid rgba(74, 74, 74, 0.4);
        color: #2d2d2d;
    }
}

/* Планшетная адаптивность для светлой темы */
@media (max-width: 1200px) and (min-width: 769px) {
    body.light-theme .section {
        background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
        border: 1px solid rgba(74, 74, 74, 0.4);
    }
    
    body.light-theme .modal {
        background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
        border: 2px solid rgba(74, 74, 74, 0.4);
    }
    
    body.light-theme .pill-button {
        background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
        border: 1px solid rgba(74, 74, 74, 0.4);
        color: #2d2d2d;
    }
}

/* Десктопная адаптивность для светлой темы */
@media (min-width: 1201px) {
    body.light-theme .section {
        background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
        border: 1px solid rgba(74, 74, 74, 0.4);
    }
    
    body.light-theme .modal {
        background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
        border: 2px solid rgba(74, 74, 74, 0.4);
    }
}

/* Стили печати для светлой темы */
@media print {
    body.light-theme {
        background: white !important;
        color: black !important;
    }
    
    body.light-theme .section,
    body.light-theme .modal,
    body.light-theme .card {
        background: white !important;
        border: 1px solid black !important;
        color: black !important;
    }
    
    body.light-theme .pill-button {
        background: white !important;
        border: 1px solid black !important;
        color: black !important;
    }
    
    body.light-theme .input-field {
        background: white !important;
        border: 1px solid black !important;
        color: black !important;
    }
}

/* Высокий контраст для светлой темы */
@media (prefers-contrast: high) {
    body.light-theme {
        background: white;
        color: black;
    }
    
    body.light-theme .section,
    body.light-theme .modal,
    body.light-theme .card {
        background: white;
        border: 2px solid black;
        color: black;
    }
    
    body.light-theme .pill-button {
        background: white;
        border: 2px solid black;
        color: black;
    }
    
    body.light-theme .pill-button:hover {
        background: black;
        color: white;
    }
    
    body.light-theme .input-field {
        background: white;
        border: 2px solid black;
        color: black;
    }
    
    body.light-theme .input-field:focus {
        border-color: black;
        box-shadow: 0 0 0 2px black;
    }
}

/* Уменьшенная анимация для светлой темы */
@media (prefers-reduced-motion: reduce) {
    body.light-theme * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body.light-theme .dice.rolling {
        animation: none !important;
    }
    
    body.light-theme .loading-progress-bar {
        transition: none !important;
    }
}

/* Сенсорные устройства для светлой темы */
body.light-theme.touch-device .pill-button {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

body.light-theme.touch-device .pill-button:hover {
    background: rgba(74, 74, 74, 0.1);
}

body.light-theme.touch-device .modal {
    background: linear-gradient(135deg, #e8e8e8, #e0e0e0);
    border: 2px solid rgba(74, 74, 74, 0.4);
}

body.light-theme.touch-device .modal-body {
    background: #e8e8e8;
    color: #2d2d2d;
}

body.light-theme.touch-device .modal-header {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.1), rgba(74, 74, 74, 0.05));
    border-bottom: 1px solid rgba(74, 74, 74, 0.4);
    color: #2d2d2d;
}

/* Дополнительные стили для улучшения читаемости в светлой теме */
body.light-theme .scrollbar-thumb {
    background: rgba(74, 74, 74, 0.3);
}

body.light-theme .scrollbar-thumb:hover {
    background: rgba(74, 74, 74, 0.5);
}

body.light-theme .scrollbar-track {
    background: rgba(74, 74, 74, 0.1);
}

/* Стили для выделения текста в светлой теме */
body.light-theme ::selection {
    background: rgba(74, 74, 74, 0.3);
    color: #2d2d2d;
}

body.light-theme ::-moz-selection {
    background: rgba(74, 74, 74, 0.3);
    color: #2d2d2d;
}

/* Стили для фокуса в светлой теме */
body.light-theme *:focus {
    outline: 2px solid #4a4a4a;
    outline-offset: 2px;
}

body.light-theme *:focus:not(:focus-visible) {
    outline: none;
}

body.light-theme *:focus-visible {
    outline: 2px solid #4a4a4a;
    outline-offset: 2px;
}

/* Стили для активных элементов в светлой теме */
body.light-theme .active,
body.light-theme .selected {
    background: rgba(74, 74, 74, 0.2);
    color: #2d2d2d;
}

body.light-theme .active:hover,
body.light-theme .selected:hover {
    background: rgba(74, 74, 74, 0.3);
}

/* Стили для неактивных элементов в светлой теме */
body.light-theme .disabled,
body.light-theme .inactive {
    background: rgba(74, 74, 74, 0.1);
    color: #6e6e73;
    opacity: 0.6;
}

/* Стили для ошибок в светлой теме */
body.light-theme .error {
    background: linear-gradient(135deg, #f5e8e8, #f0e0e0);
    border: 1px solid #8b0000;
    color: #8b0000;
}

/* Стили для успеха в светлой теме */
body.light-theme .success {
    background: linear-gradient(135deg, #e8f5e8, #e0f0e0);
    border: 1px solid #006400;
    color: #006400;
}

/* Стили для предупреждений в светлой теме */
body.light-theme .warning {
    background: linear-gradient(135deg, #f5f0e8, #f0ebe0);
    border: 1px solid #8b5a00;
    color: #8b5a00;
}

/* Стили для информации в светлой теме */
body.light-theme .info {
    background: linear-gradient(135deg, #e8f0f5, #e0e8f0);
    border: 1px solid #4a4a4a;
    color: #2d2d2d;
}

/* Стили для магазинов в светлой теме */
body.light-theme .shop-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid rgba(74, 74, 74, 0.2);
    color: #2d2d2d;
}

body.light-theme .shop-item:hover {
    box-shadow: 0 8px 25px rgba(74, 74, 74, 0.15);
}

body.light-theme .shop-item-title {
    color: #4a4a4a;
}

body.light-theme .shop-item-description {
    color: #6e6e73;
}

body.light-theme .shop-item-price {
    color: #28a745;
}

body.light-theme .shop-item-buy-btn {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.1), rgba(74, 74, 74, 0.05));
    border: 1px solid rgba(74, 74, 74, 0.3);
    color: #2d2d2d;
}

body.light-theme .shop-item-buy-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.2), rgba(74, 74, 74, 0.15));
    border-color: rgba(74, 74, 74, 0.5);
}

body.light-theme .shop-item-available-btn {
    background: linear-gradient(135deg, #28a745, rgba(40, 167, 69, 0.8));
    border: 1px solid #28a745;
    color: white;
}

body.light-theme .shop-item-available-btn:hover {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.9), #28a745);
}

body.light-theme .shop-stat {
    background: rgba(74, 74, 74, 0.1);
    color: #2d2d2d;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

body.light-theme .touch-device .shop-item {
    background: #f8f9fa !important;
    border: 2px solid rgba(74, 74, 74, 0.2) !important;
}

body.light-theme .touch-device .shop-item:hover {
    border-color: #4a4a4a !important;
    background: rgba(74, 74, 74, 0.05) !important;
}