| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265 |
- /* ============================================================
- ЗКЭ-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; }
- }
|