Преглед изворни кода

v.0.1 [style.css] [3] - DONE

ypv пре 13 часа
родитељ
комит
8b630fe2d9
2 измењених фајлова са 1268 додато и 1 уклоњено
  1. 1265 0
      css/style.css
  2. 3 1
      docs/issues.md

+ 1265 - 0
css/style.css

@@ -0,0 +1,1265 @@
+/* ============================================================
+   ЗКЭ-4-10 — Кодовый замок СССР
+   Стили: советский промышленный ретро-футуризм
+   ============================================================ */
+
+/* ---------- Переменные ---------- */
+:root {
+    /* Фон и панели */
+    --bg-deep:        #0d0f11;
+    --bg-panel:       #1a1d22;
+    --bg-panel-2:     #22262c;
+    --bg-inset:       #0e1114;
+    --border-metal:   #3a4048;
+    --border-light:   #4d545e;
+
+    /* Текст */
+    --text-primary:   #d8dde3;
+    --text-secondary: #8a929c;
+    --text-dim:       #5a616a;
+
+    /* Акценты */
+    --accent-amber:   #ffb627;
+    --accent-amber-2: #ff8c00;
+    --accent-red:     #e63946;
+    --accent-green:   #4ade80;
+    --accent-cyan:    #4fc3f7;
+    --accent-gold:    #c9a227;
+
+    /* Металл */
+    --metal-1:        #8b8b8b;
+    --metal-2:        #c9c9c9;
+    --metal-3:        #6b6b6b;
+
+    /* Тени и свечения */
+    --glow-amber:     0 0 12px rgba(255, 182, 39, 0.7);
+    --glow-red:       0 0 12px rgba(230, 57, 70, 0.7);
+    --glow-green:     0 0 12px rgba(74, 222, 128, 0.7);
+    --glow-cyan:      0 0 10px rgba(79, 195, 247, 0.6);
+
+    --shadow-panel:   0 4px 20px rgba(0, 0, 0, 0.6);
+    --shadow-inset:   inset 0 1px 3px rgba(0, 0, 0, 0.8);
+    --shadow-key:     0 3px 0 #0a0c0e, 0 4px 8px rgba(0, 0, 0, 0.5);
+    --shadow-key-act: 0 1px 0 #0a0c0e, 0 2px 4px rgba(0, 0, 0, 0.5);
+
+    /* Шрифты */
+    --font-serif:     'PT Serif', Georgia, serif;
+    --font-slab:      'Roboto Slab', 'PT Serif', serif;
+    --font-mono:      'Share Tech Mono', 'Courier New', monospace;
+
+    /* Прочее */
+    --radius:         8px;
+    --radius-sm:      4px;
+    --transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
+}
+
+/* ---------- Сброс и база ---------- */
+*,
+*::before,
+*::after {
+    box-sizing: border-box;
+    margin: 0;
+    padding: 0;
+}
+
+html {
+    scroll-behavior: smooth;
+    -webkit-text-size-adjust: 100%;
+}
+
+body {
+    font-family: var(--font-slab);
+    font-size: 15px;
+    line-height: 1.5;
+    color: var(--text-primary);
+    background-color: var(--bg-deep);
+    background-image:
+        radial-gradient(circle at 20% 10%, rgba(79, 195, 247, 0.05), transparent 40%),
+        radial-gradient(circle at 80% 90%, rgba(255, 182, 39, 0.05), transparent 40%),
+        repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px),
+        repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
+    min-height: 100vh;
+    overflow-x: hidden;
+}
+
+button {
+    font-family: inherit;
+    cursor: pointer;
+    border: none;
+    background: none;
+    color: inherit;
+}
+
+h1, h2, h3 {
+    font-family: var(--font-slab);
+    font-weight: 700;
+    letter-spacing: 0.02em;
+}
+
+/* Кастомный скроллбар */
+::-webkit-scrollbar { width: 10px; height: 10px; }
+::-webkit-scrollbar-track { background: var(--bg-inset); }
+::-webkit-scrollbar-thumb {
+    background: linear-gradient(180deg, #3a4048, #262b31);
+    border-radius: 6px;
+    border: 2px solid var(--bg-inset);
+}
+::-webkit-scrollbar-thumb:hover { background: #4d545e; }
+
+/* ---------- Шапка ---------- */
+.app-header {
+    position: sticky;
+    top: 0;
+    z-index: 100;
+    background: linear-gradient(180deg, #1f242a 0%, #15181c 100%);
+    border-bottom: 2px solid var(--border-metal);
+    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
+    backdrop-filter: blur(6px);
+}
+
+.header-content {
+    max-width: 1600px;
+    margin: 0 auto;
+    padding: 12px 24px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    gap: 20px;
+    flex-wrap: wrap;
+}
+
+.header-title h1 {
+    font-size: 26px;
+    font-weight: 700;
+    letter-spacing: 0.08em;
+    color: var(--accent-amber);
+    text-shadow: 0 0 12px rgba(255, 182, 39, 0.4);
+    font-family: var(--font-mono);
+}
+
+.header-title .subtitle {
+    font-size: 12px;
+    color: var(--text-secondary);
+    letter-spacing: 0.14em;
+    text-transform: uppercase;
+    margin-top: 2px;
+}
+
+.header-nav {
+    display: flex;
+    gap: 8px;
+}
+
+.nav-btn {
+    width: 40px;
+    height: 40px;
+    border-radius: var(--radius-sm);
+    background: linear-gradient(180deg, #2c323a, #1e2227);
+    border: 1px solid var(--border-metal);
+    color: var(--text-secondary);
+    font-size: 18px;
+    display: grid;
+    place-items: center;
+    transition: var(--transition);
+    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
+}
+
+.nav-btn:hover {
+    color: var(--accent-amber);
+    border-color: var(--accent-amber);
+    box-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 0 12px rgba(255, 182, 39, 0.35);
+    transform: translateY(-1px);
+}
+
+.nav-btn:active {
+    transform: translateY(1px);
+    box-shadow: 0 0 0 rgba(0,0,0,0.5);
+}
+
+.nav-btn.muted { color: var(--text-dim); opacity: 0.6; }
+
+/* Полоса прогресса */
+.progress-line {
+    height: 3px;
+    background: var(--bg-inset);
+    overflow: hidden;
+}
+
+.progress-fill {
+    height: 100%;
+    width: 0%;
+    background: linear-gradient(90deg, var(--accent-amber), var(--accent-amber-2));
+    box-shadow: 0 0 8px var(--accent-amber);
+    transition: width 0.5s ease-out;
+}
+
+/* ---------- Основной макет ---------- */
+.app-main {
+    max-width: 1600px;
+    margin: 0 auto;
+    padding: 20px 24px 10px;
+    display: grid;
+    grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.7fr);
+    grid-template-rows: auto auto;
+    grid-template-areas:
+        "lock circuit"
+        "lock keyboard";
+    gap: 20px;
+}
+
+.panel-lock     { grid-area: lock;     }
+.panel-circuit  { grid-area: circuit;  }
+.panel-keyboard { grid-area: keyboard; }
+
+/* ---------- Панель (общая) ---------- */
+.panel {
+    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
+    border: 1px solid var(--border-metal);
+    border-radius: var(--radius);
+    box-shadow: var(--shadow-panel);
+    padding: 16px;
+    position: relative;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+}
+
+.panel::before {
+    content: '';
+    position: absolute;
+    inset: 0;
+    border-radius: var(--radius);
+    pointer-events: none;
+    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.15) 100%);
+}
+
+.panel-header {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+    padding-bottom: 12px;
+    margin-bottom: 14px;
+    border-bottom: 1px solid var(--border-metal);
+}
+
+.panel-tag {
+    font-family: var(--font-mono);
+    font-size: 12px;
+    color: var(--accent-amber);
+    background: rgba(255, 182, 39, 0.1);
+    border: 1px solid rgba(255, 182, 39, 0.3);
+    padding: 2px 8px;
+    border-radius: 3px;
+    letter-spacing: 0.1em;
+}
+
+.panel-header h2 {
+    font-size: 16px;
+    font-weight: 500;
+    color: var(--text-primary);
+    letter-spacing: 0.04em;
+    flex: 1;
+}
+
+/* ============================================================
+   ЛЕВАЯ ПАНЕЛЬ: ЗАЩЁЛКА
+   ============================================================ */
+.panel-lock {
+    grid-row: span 2;
+}
+
+.lock-scene {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    position: relative;
+    background: radial-gradient(ellipse at center, rgba(79, 195, 247, 0.04), transparent 60%);
+    border-radius: var(--radius-sm);
+    padding: 10px;
+    min-height: 380px;
+}
+
+#lock-svg {
+    width: 100%;
+    max-width: 340px;
+    height: auto;
+    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
+}
+
+/* Анимация ригеля */
+#bolt-group {
+    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
+}
+
+.panel-lock.unlocked #bolt-group {
+    transform: translateX(95px);
+}
+
+.panel-lock.unlocked #spring-group {
+    transform: translateX(70px) scaleX(0.5);
+    transform-origin: left center;
+    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
+}
+
+#spring-group { transition: transform 0.55s ease-out; }
+
+/* Свечение электромагнита */
+#magnet-glow {
+    transition: opacity 0.25s ease-in-out;
+}
+
+.panel-lock.magnet-on #magnet-glow {
+    opacity: 1;
+    animation: magnetPulse 1.2s ease-in-out infinite;
+}
+
+@keyframes magnetPulse {
+    0%, 100% { opacity: 0.7; }
+    50%      { opacity: 1; }
+}
+
+/* Индикатор состояния замка */
+.lock-status {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+    padding: 8px 16px;
+    background: var(--bg-inset);
+    border: 1px solid var(--border-metal);
+    border-radius: var(--radius-sm);
+    margin-top: 12px;
+    font-family: var(--font-mono);
+    font-size: 13px;
+    letter-spacing: 0.05em;
+    box-shadow: var(--shadow-inset);
+}
+
+.status-dot {
+    width: 10px;
+    height: 10px;
+    border-radius: 50%;
+    background: var(--accent-red);
+    box-shadow: 0 0 8px var(--accent-red);
+    transition: var(--transition);
+    animation: statusBlink 2s infinite;
+}
+
+@keyframes statusBlink {
+    0%, 100% { opacity: 1; }
+    50%      { opacity: 0.55; }
+}
+
+.lock-status.open .status-dot {
+    background: var(--accent-green);
+    box-shadow: 0 0 10px var(--accent-green);
+    animation: none;
+}
+
+.lock-status.open .status-text { color: var(--accent-green); }
+
+.lock-status.error .status-dot {
+    background: var(--accent-red);
+    box-shadow: 0 0 14px var(--accent-red);
+    animation: errBlink 0.35s 3;
+}
+
+@keyframes errBlink {
+    0%, 100% { opacity: 1; }
+    50%      { opacity: 0.15; }
+}
+
+.lock-info {
+    margin-top: 14px;
+    padding: 12px;
+    background: var(--bg-inset);
+    border-left: 3px solid var(--accent-amber);
+    border-radius: var(--radius-sm);
+    font-size: 13px;
+    color: var(--text-secondary);
+    line-height: 1.55;
+}
+
+.lock-info strong { color: var(--accent-amber); }
+
+/* ============================================================
+   ПРАВАЯ ВЕРХНЯЯ ПАНЕЛЬ: СХЕМА
+   ============================================================ */
+.panel-circuit {
+    min-height: 340px;
+}
+
+.circuit-legend {
+    display: flex;
+    gap: 14px;
+    font-size: 11px;
+    color: var(--text-dim);
+    letter-spacing: 0.03em;
+}
+
+.legend-item {
+    display: flex;
+    align-items: center;
+    gap: 5px;
+}
+
+.dot {
+    width: 9px;
+    height: 9px;
+    border-radius: 50%;
+    display: inline-block;
+    border: 1px solid #000;
+}
+
+.dot-off { background: #3a4048; }
+.dot-on  { background: var(--accent-cyan); box-shadow: 0 0 6px var(--accent-cyan); }
+
+.circuit-wrap {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+    min-height: 0;
+}
+
+#circuit-svg {
+    width: 100%;
+    height: auto;
+    max-height: 340px;
+    border-radius: var(--radius-sm);
+    background: #0a0f13;
+    box-shadow: var(--shadow-inset);
+}
+
+/* Кликабельные узлы схемы */
+.circuit-node {
+    cursor: pointer;
+    transition: filter 0.2s ease;
+}
+
+.circuit-node:hover {
+    filter: drop-shadow(0 0 8px rgba(255, 182, 39, 0.8));
+}
+
+.circuit-node.active rect,
+.circuit-node.active circle,
+.circuit-node.active polygon {
+    stroke: var(--accent-cyan);
+    filter: drop-shadow(0 0 6px var(--accent-cyan));
+}
+
+.circuit-node.active text {
+    fill: var(--accent-cyan);
+    font-weight: 700;
+}
+
+.circuit-node.pulse rect {
+    animation: nodePulse 0.6s ease-in-out;
+}
+
+@keyframes nodePulse {
+    0%   { stroke: #4fc3f7; filter: drop-shadow(0 0 4px #4fc3f7); }
+    50%  { stroke: #fff;   filter: drop-shadow(0 0 16px #4fc3f7); }
+    100% { stroke: #4fc3f7; filter: drop-shadow(0 0 4px #4fc3f7); }
+}
+
+.circuit-node.error rect {
+    animation: nodeError 0.35s ease-in-out 3;
+}
+
+@keyframes nodeError {
+    0%, 100% { stroke: #3a5050; }
+    50%      { stroke: #e63946; filter: drop-shadow(0 0 10px #e63946); }
+}
+
+/* Инфо-окно о схеме */
+.circuit-info {
+    background: var(--bg-inset);
+    border: 1px solid var(--border-metal);
+    border-radius: var(--radius-sm);
+    padding: 10px 14px;
+    min-height: 52px;
+    font-size: 13px;
+    color: var(--text-secondary);
+    display: flex;
+    align-items: center;
+    box-shadow: var(--shadow-inset);
+    transition: var(--transition);
+}
+
+.circuit-info.active {
+    border-color: var(--accent-cyan);
+    color: var(--text-primary);
+}
+
+.circuit-info strong { color: var(--accent-amber); }
+.circuit-info-hint { color: var(--text-dim); font-style: italic; }
+
+/* ============================================================
+   ПРАВАЯ НИЖНЯЯ ПАНЕЛЬ: КЛАВИАТУРА
+   ============================================================ */
+.panel-keyboard {
+    min-height: 300px;
+}
+
+.kbd-indicators {
+    display: flex;
+    gap: 8px;
+}
+
+.kbd-ind {
+    font-family: var(--font-mono);
+    font-size: 12px;
+    color: var(--accent-amber);
+    background: var(--bg-inset);
+    border: 1px solid var(--border-metal);
+    padding: 3px 10px;
+    border-radius: 3px;
+    letter-spacing: 0.05em;
+    box-shadow: var(--shadow-inset);
+}
+
+.kbd-ind.error-flash {
+    color: var(--accent-red);
+    border-color: var(--accent-red);
+    animation: errBlink 0.35s 3;
+}
+
+/* Корпус клавиатуры */
+.keyboard-scene {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding: 8px;
+}
+
+.keyboard-device {
+    background: linear-gradient(160deg, #2a2f36 0%, #1a1d22 100%);
+    border: 2px solid var(--border-metal);
+    border-radius: 10px;
+    padding: 14px;
+    box-shadow:
+        0 8px 24px rgba(0,0,0,0.7),
+        inset 0 1px 0 rgba(255,255,255,0.08),
+        inset 0 -2px 4px rgba(0,0,0,0.6);
+    width: 100%;
+    max-width: 420px;
+}
+
+/* Верхняя часть корпуса */
+.kbd-top {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin-bottom: 12px;
+    padding: 8px 12px;
+    background: var(--bg-inset);
+    border-radius: var(--radius-sm);
+    box-shadow: var(--shadow-inset);
+}
+
+.kbd-lamp {
+    width: 16px;
+    height: 16px;
+    border-radius: 50%;
+    background: radial-gradient(circle at 30% 30%, #5a3030, #2a1515);
+    border: 1px solid #1a0a0a;
+    box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
+    transition: var(--transition);
+}
+
+.kbd-lamp.on {
+    background: radial-gradient(circle at 30% 30%, #ffdd88, #e63946);
+    box-shadow:
+        0 0 12px rgba(230, 57, 70, 0.9),
+        0 0 24px rgba(230, 57, 70, 0.5),
+        inset 0 1px 2px rgba(0,0,0,0.4);
+}
+
+.kbd-lamp.success {
+    background: radial-gradient(circle at 30% 30%, #bbf7d0, #4ade80);
+    box-shadow:
+        0 0 14px rgba(74, 222, 128, 0.9),
+        0 0 28px rgba(74, 222, 128, 0.5);
+}
+
+.kbd-brand {
+    font-family: var(--font-mono);
+    font-size: 13px;
+    letter-spacing: 0.2em;
+    color: var(--text-dim);
+    text-shadow: 0 1px 0 rgba(255,255,255,0.05);
+}
+
+.kbd-led {
+    width: 8px;
+    height: 8px;
+    border-radius: 50%;
+    background: #4ade80;
+    box-shadow: 0 0 6px #4ade80;
+    animation: ledPulse 2.5s infinite;
+}
+
+@keyframes ledPulse {
+    0%, 100% { opacity: 1; }
+    50%      { opacity: 0.4; }
+}
+
+/* Сетка кнопок */
+.keyboard-grid {
+    display: grid;
+    grid-template-columns: repeat(3, 1fr);
+    gap: 8px;
+}
+
+.key {
+    position: relative;
+    height: 52px;
+    font-family: var(--font-mono);
+    font-size: 20px;
+    font-weight: 700;
+    color: var(--text-primary);
+    background: linear-gradient(180deg, #3a4048 0%, #262b31 100%);
+    border: 1px solid #1a1d22;
+    border-radius: 6px;
+    box-shadow:
+        0 3px 0 #0a0c0e,
+        0 4px 8px rgba(0,0,0,0.5),
+        inset 0 1px 0 rgba(255,255,255,0.08);
+    transition: transform 0.06s ease-out, box-shadow 0.06s ease-out, background 0.15s ease;
+    user-select: none;
+    -webkit-tap-highlight-color: transparent;
+}
+
+.key:hover:not(:disabled) {
+    background: linear-gradient(180deg, #454c56 0%, #2e343b 100%);
+    color: var(--accent-amber);
+}
+
+.key:active:not(:disabled),
+.key.pressed {
+    transform: translateY(3px);
+    box-shadow:
+        0 0 0 #0a0c0e,
+        0 1px 3px rgba(0,0,0,0.6),
+        inset 0 2px 4px rgba(0,0,0,0.5);
+    background: linear-gradient(180deg, #1e2227 0%, #2a2f36 100%);
+    color: var(--accent-amber);
+}
+
+.key:focus-visible {
+    outline: 2px solid var(--accent-cyan);
+    outline-offset: 2px;
+}
+
+.key-disabled,
+.key:disabled {
+    opacity: 0.35;
+    cursor: not-allowed;
+    background: linear-gradient(180deg, #262b31 0%, #1a1d22 100%);
+    color: var(--text-dim);
+}
+
+.key-reset {
+    font-size: 11px;
+    letter-spacing: 0.1em;
+    color: var(--accent-amber);
+    background: linear-gradient(180deg, #4a3a1a 0%, #2e2511 100%);
+    border-color: #5a4520;
+}
+
+.key-reset:hover:not(:disabled) {
+    background: linear-gradient(180deg, #5a4520 0%, #3a2e15 100%);
+    color: #ffd87a;
+}
+
+/* Нижняя часть: дисплей кода */
+.keyboard-footer {
+    margin-top: 14px;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    gap: 8px;
+}
+
+.code-display {
+    display: flex;
+    gap: 8px;
+    padding: 8px 14px;
+    background: var(--bg-inset);
+    border: 1px solid var(--border-metal);
+    border-radius: var(--radius-sm);
+    box-shadow: var(--shadow-inset);
+}
+
+.code-cell {
+    width: 32px;
+    height: 42px;
+    display: grid;
+    place-items: center;
+    font-family: var(--font-mono);
+    font-size: 22px;
+    color: var(--text-dim);
+    background: #050708;
+    border: 1px solid #1a1d22;
+    border-radius: 3px;
+    box-shadow: inset 0 2px 6px rgba(0,0,0,0.9);
+    transition: var(--transition);
+}
+
+.code-cell.filled {
+    color: var(--accent-amber);
+    text-shadow: 0 0 8px rgba(255, 182, 39, 0.6);
+    border-color: rgba(255, 182, 39, 0.3);
+}
+
+.code-cell.error {
+    color: var(--accent-red);
+    text-shadow: 0 0 8px rgba(230, 57, 70, 0.8);
+    border-color: var(--accent-red);
+    animation: cellShake 0.35s;
+}
+
+.code-cell.success {
+    color: var(--accent-green);
+    text-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
+    border-color: var(--accent-green);
+}
+
+@keyframes cellShake {
+    0%, 100% { transform: translateX(0); }
+    20%      { transform: translateX(-4px); }
+    40%      { transform: translateX(4px); }
+    60%      { transform: translateX(-3px); }
+    80%      { transform: translateX(3px); }
+}
+
+.kbd-hint {
+    font-size: 12px;
+    color: var(--text-dim);
+    text-align: center;
+    font-style: italic;
+}
+
+/* ============================================================
+   ПОДВАЛ: ЛОГ И КНОПКИ
+   ============================================================ */
+.app-footer {
+    max-width: 1600px;
+    margin: 0 auto;
+    padding: 0 24px 30px;
+    display: grid;
+    grid-template-columns: 1fr auto;
+    gap: 20px;
+    align-items: start;
+}
+
+.log-panel {
+    background: var(--bg-panel);
+    border: 1px solid var(--border-metal);
+    border-radius: var(--radius);
+    box-shadow: var(--shadow-panel);
+    overflow: hidden;
+    max-height: 200px;
+    display: flex;
+    flex-direction: column;
+}
+
+.log-header {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 8px 14px;
+    background: var(--bg-inset);
+    border-bottom: 1px solid var(--border-metal);
+    font-family: var(--font-mono);
+    font-size: 11px;
+    letter-spacing: 0.15em;
+    text-transform: uppercase;
+    color: var(--text-dim);
+}
+
+.log-clear {
+    font-size: 10px;
+    color: var(--text-dim);
+    padding: 3px 8px;
+    border-radius: 3px;
+    border: 1px solid var(--border-metal);
+    transition: var(--transition);
+}
+
+.log-clear:hover {
+    color: var(--accent-red);
+    border-color: var(--accent-red);
+}
+
+.log-list {
+    list-style: none;
+    overflow-y: auto;
+    padding: 6px 0;
+    flex: 1;
+    font-family: var(--font-mono);
+    font-size: 12px;
+    line-height: 1.7;
+}
+
+.log-item {
+    padding: 3px 14px;
+    border-left: 3px solid transparent;
+    color: var(--text-secondary);
+    animation: logFadeIn 0.3s ease-out;
+}
+
+@keyframes logFadeIn {
+    from { opacity: 0; transform: translateX(-8px); }
+    to   { opacity: 1; transform: translateX(0); }
+}
+
+.log-item::before {
+    content: '› ';
+    color: var(--text-dim);
+    margin-right: 4px;
+}
+
+.log-info    { border-left-color: var(--accent-cyan);  color: var(--text-secondary); }
+.log-success { border-left-color: var(--accent-green); color: var(--accent-green); }
+.log-error   { border-left-color: var(--accent-red);   color: var(--accent-red); }
+.log-warn    { border-left-color: var(--accent-amber); color: var(--accent-amber); }
+
+/* Кнопки действий */
+.footer-actions {
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+}
+
+.btn {
+    font-family: var(--font-slab);
+    font-weight: 500;
+    font-size: 14px;
+    letter-spacing: 0.06em;
+    padding: 12px 26px;
+    border-radius: var(--radius-sm);
+    border: 1px solid var(--border-metal);
+    background: linear-gradient(180deg, #2c323a, #1e2227);
+    color: var(--text-primary);
+    transition: var(--transition);
+    box-shadow: 0 3px 0 #0a0c0e, 0 4px 10px rgba(0,0,0,0.5);
+    white-space: nowrap;
+}
+
+.btn:hover {
+    transform: translateY(-2px);
+    box-shadow: 0 5px 0 #0a0c0e, 0 6px 14px rgba(0,0,0,0.6);
+}
+
+.btn:active {
+    transform: translateY(1px);
+    box-shadow: 0 0 0 #0a0c0e, 0 1px 4px rgba(0,0,0,0.5);
+}
+
+.btn-primary {
+    background: linear-gradient(180deg, #4a3810, #2e2511);
+    border-color: var(--accent-amber);
+    color: var(--accent-amber);
+    text-shadow: 0 0 8px rgba(255, 182, 39, 0.4);
+}
+
+.btn-primary:hover {
+    background: linear-gradient(180deg, #5a4520, #3a2e15);
+    box-shadow: 0 5px 0 #0a0c0e, 0 6px 14px rgba(0,0,0,0.6), 0 0 20px rgba(255, 182, 39, 0.4);
+}
+
+.btn-quiz {
+    font-size: 15px;
+    padding: 14px 32px;
+}
+
+/* ============================================================
+   МОДАЛЬНЫЕ ОКНА
+   ============================================================ */
+.modal {
+    position: fixed;
+    inset: 0;
+    z-index: 1000;
+    display: none;
+    align-items: center;
+    justify-content: center;
+    padding: 20px;
+}
+
+.modal.visible {
+    display: flex;
+    animation: modalIn 0.25s ease-out;
+}
+
+@keyframes modalIn {
+    from { opacity: 0; }
+    to   { opacity: 1; }
+}
+
+.modal-backdrop {
+    position: absolute;
+    inset: 0;
+    background: rgba(0, 0, 0, 0.82);
+    backdrop-filter: blur(4px);
+}
+
+.modal-content {
+    position: relative;
+    z-index: 1;
+    width: 100%;
+    max-width: 720px;
+    max-height: 88vh;
+    overflow-y: auto;
+    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
+    border: 1px solid var(--border-light);
+    border-radius: var(--radius);
+    box-shadow:
+        0 20px 60px rgba(0, 0, 0, 0.9),
+        0 0 40px rgba(255, 182, 39, 0.1);
+    padding: 28px 32px;
+    animation: modalContentIn 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
+}
+
+@keyframes modalContentIn {
+    from { transform: translateY(24px) scale(0.96); opacity: 0; }
+    to   { transform: translateY(0) scale(1); opacity: 1; }
+}
+
+.modal-content-quiz { max-width: 800px; }
+
+.modal-close {
+    position: absolute;
+    top: 14px;
+    right: 14px;
+    width: 34px;
+    height: 34px;
+    border-radius: 50%;
+    background: var(--bg-inset);
+    border: 1px solid var(--border-metal);
+    color: var(--text-secondary);
+    font-size: 15px;
+    display: grid;
+    place-items: center;
+    transition: var(--transition);
+}
+
+.modal-close:hover {
+    color: var(--accent-red);
+    border-color: var(--accent-red);
+    transform: rotate(90deg);
+}
+
+.modal-content h2 {
+    font-size: 20px;
+    color: var(--accent-amber);
+    margin-bottom: 16px;
+    padding-bottom: 12px;
+    border-bottom: 1px solid var(--border-metal);
+    letter-spacing: 0.03em;
+}
+
+.modal-body h3 {
+    font-size: 15px;
+    color: var(--accent-cyan);
+    margin: 18px 0 8px;
+    letter-spacing: 0.04em;
+}
+
+.modal-body p,
+.modal-body li {
+    font-size: 14px;
+    color: var(--text-secondary);
+    line-height: 1.65;
+    margin-bottom: 8px;
+}
+
+.modal-body ul,
+.modal-body ol {
+    padding-left: 22px;
+    margin-bottom: 10px;
+}
+
+.modal-body li::marker {
+    color: var(--accent-amber);
+}
+
+.modal-body strong { color: var(--accent-amber); }
+
+.modal-note {
+    margin-top: 18px;
+    padding: 10px 14px;
+    background: var(--bg-inset);
+    border-left: 3px solid var(--accent-cyan);
+    border-radius: var(--radius-sm);
+    font-size: 13px;
+    font-style: italic;
+}
+
+/* ============================================================
+   ТЕСТ
+   ============================================================ */
+.quiz-header {
+    margin-bottom: 20px;
+    padding-bottom: 14px;
+    border-bottom: 1px solid var(--border-metal);
+}
+
+.quiz-header h2 {
+    border: none;
+    padding: 0;
+    margin-bottom: 6px;
+}
+
+.quiz-progress {
+    font-family: var(--font-mono);
+    font-size: 12px;
+    color: var(--text-dim);
+    letter-spacing: 0.1em;
+}
+
+.quiz-bar {
+    height: 4px;
+    background: var(--bg-inset);
+    border-radius: 3px;
+    overflow: hidden;
+    margin-top: 10px;
+}
+
+.quiz-bar-fill {
+    height: 100%;
+    background: linear-gradient(90deg, var(--accent-amber), var(--accent-amber-2));
+    transition: width 0.4s ease;
+}
+
+.quiz-question {
+    font-size: 16px;
+    font-weight: 500;
+    color: var(--text-primary);
+    margin-bottom: 18px;
+    line-height: 1.5;
+}
+
+.quiz-answers {
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+    margin-bottom: 20px;
+}
+
+.quiz-answer {
+    text-align: left;
+    padding: 14px 18px;
+    background: var(--bg-inset);
+    border: 1px solid var(--border-metal);
+    border-radius: var(--radius-sm);
+    color: var(--text-secondary);
+    font-size: 14px;
+    font-family: var(--font-slab);
+    transition: var(--transition);
+    position: relative;
+    padding-left: 48px;
+}
+
+.quiz-answer::before {
+    content: attr(data-letter);
+    position: absolute;
+    left: 14px;
+    top: 50%;
+    transform: translateY(-50%);
+    width: 22px;
+    height: 22px;
+    display: grid;
+    place-items: center;
+    background: var(--bg-panel);
+    border: 1px solid var(--border-metal);
+    border-radius: 3px;
+    font-family: var(--font-mono);
+    font-size: 12px;
+    color: var(--text-dim);
+    transition: var(--transition);
+}
+
+.quiz-answer:hover:not(:disabled) {
+    border-color: var(--accent-cyan);
+    color: var(--text-primary);
+    transform: translateX(3px);
+}
+
+.quiz-answer:hover:not(:disabled)::before {
+    color: var(--accent-cyan);
+    border-color: var(--accent-cyan);
+}
+
+.quiz-answer.correct {
+    background: rgba(74, 222, 128, 0.1);
+    border-color: var(--accent-green);
+    color: var(--accent-green);
+}
+
+.quiz-answer.correct::before {
+    content: '✓';
+    color: var(--accent-green);
+    border-color: var(--accent-green);
+    background: rgba(74, 222, 128, 0.15);
+}
+
+.quiz-answer.wrong {
+    background: rgba(230, 57, 70, 0.1);
+    border-color: var(--accent-red);
+    color: var(--accent-red);
+    animation: cellShake 0.35s;
+}
+
+.quiz-answer.wrong::before {
+    content: '✕';
+    color: var(--accent-red);
+    border-color: var(--accent-red);
+    background: rgba(230, 57, 70, 0.15);
+}
+
+.quiz-answer:disabled {
+    cursor: default;
+}
+
+.quiz-nav {
+    display: flex;
+    justify-content: flex-end;
+    gap: 10px;
+}
+
+.quiz-result {
+    text-align: center;
+    padding: 20px 0;
+}
+
+.quiz-result h2 {
+    font-size: 26px;
+    margin-bottom: 20px;
+    border: none;
+}
+
+.quiz-score {
+    font-family: var(--font-mono);
+    font-size: 56px;
+    font-weight: 700;
+    color: var(--accent-amber);
+    text-shadow: 0 0 24px rgba(255, 182, 39, 0.6);
+    margin: 20px 0;
+    letter-spacing: 0.05em;
+}
+
+.quiz-score.good { color: var(--accent-green); text-shadow: 0 0 24px rgba(74, 222, 128, 0.6); }
+.quiz-score.bad  { color: var(--accent-red);   text-shadow: 0 0 24px rgba(230, 57, 70, 0.6); }
+
+.quiz-verdict {
+    font-size: 17px;
+    color: var(--text-secondary);
+    margin-bottom: 24px;
+    line-height: 1.6;
+}
+
+.quiz-verdict strong { color: var(--accent-amber); }
+
+/* ============================================================
+   ТОСТ
+   ============================================================ */
+.toast {
+    position: fixed;
+    bottom: 30px;
+    left: 50%;
+    transform: translateX(-50%) translateY(120%);
+    padding: 14px 26px;
+    background: linear-gradient(180deg, #2a2f36, #1a1d22);
+    border: 1px solid var(--border-light);
+    border-left: 4px solid var(--accent-amber);
+    border-radius: var(--radius-sm);
+    box-shadow: 0 12px 30px rgba(0,0,0,0.8);
+    font-family: var(--font-slab);
+    font-size: 14px;
+    color: var(--text-primary);
+    z-index: 2000;
+    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
+    max-width: 90vw;
+    pointer-events: none;
+}
+
+.toast.visible {
+    transform: translateX(-50%) translateY(0);
+}
+
+.toast.success { border-left-color: var(--accent-green); }
+.toast.error   { border-left-color: var(--accent-red); }
+.toast.info    { border-left-color: var(--accent-cyan); }
+
+/* ============================================================
+   АДАПТИВНОСТЬ
+   ============================================================ */
+@media (max-width: 1100px) {
+    .app-main {
+        grid-template-columns: 1fr;
+        grid-template-areas:
+            "lock"
+            "circuit"
+            "keyboard";
+    }
+    .panel-lock { grid-row: auto; }
+    .app-footer {
+        grid-template-columns: 1fr;
+    }
+    .footer-actions {
+        flex-direction: row;
+        justify-content: center;
+    }
+}
+
+@media (max-width: 640px) {
+    .header-content { padding: 10px 14px; }
+    .header-title h1 { font-size: 20px; }
+    .header-title .subtitle { font-size: 10px; }
+    .app-main { padding: 14px 12px 6px; gap: 14px; }
+    .app-footer { padding: 0 12px 24px; }
+    .panel { padding: 12px; }
+    .panel-header h2 { font-size: 14px; }
+    .key { height: 46px; font-size: 17px; }
+    .code-cell { width: 26px; height: 36px; font-size: 18px; }
+    .modal-content { padding: 20px 18px; }
+    .modal-content h2 { font-size: 17px; }
+    .quiz-score { font-size: 42px; }
+    .btn-quiz { padding: 12px 20px; font-size: 14px; }
+    .circuit-legend { display: none; }
+    .nav-btn { width: 36px; height: 36px; font-size: 16px; }
+}
+
+@media (max-width: 420px) {
+    .kbd-indicators { flex-direction: column; gap: 4px; }
+    .kbd-ind { font-size: 10px; padding: 2px 6px; }
+    .footer-actions { flex-direction: column; }
+    .btn { width: 100%; }
+}
+
+/* ============================================================
+   ПРЕДПОЧТЕНИЕ УМЕНЬШЕННОГО ДВИЖЕНИЯ
+   ============================================================ */
+@media (prefers-reduced-motion: reduce) {
+    *,
+    *::before,
+    *::after {
+        animation-duration: 0.01ms !important;
+        animation-iteration-count: 1 !important;
+        transition-duration: 0.01ms !important;
+        scroll-behavior: auto !important;
+    }
+}
+
+/* ============================================================
+   ПЕЧАТЬ
+   ============================================================ */
+@media print {
+    .app-header, .app-footer, .modal, .toast { display: none !important; }
+    body { background: #fff; color: #000; }
+    .panel { border: 1px solid #ccc; box-shadow: none; }
+}

+ 3 - 1
docs/issues.md

@@ -1,5 +1,7 @@
+css/style.css, js/audio.js, js/circuit.js, js/keyboard.js, js/quiz.js, js/app.js, manifest.json и sw.js
+
 создай файл css/style.css
 создай файл css/style.css
-v.0.1 [style.css] [3]
+v.0.1 [style.css] [3] - DONE
 
 
 создай файл index.html
 создай файл index.html
 v.0.1 [index] [2]
 v.0.1 [index] [2]