style.css 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265
  1. /* ============================================================
  2. ЗКЭ-4-10 — Кодовый замок СССР
  3. Стили: советский промышленный ретро-футуризм
  4. ============================================================ */
  5. /* ---------- Переменные ---------- */
  6. :root {
  7. /* Фон и панели */
  8. --bg-deep: #0d0f11;
  9. --bg-panel: #1a1d22;
  10. --bg-panel-2: #22262c;
  11. --bg-inset: #0e1114;
  12. --border-metal: #3a4048;
  13. --border-light: #4d545e;
  14. /* Текст */
  15. --text-primary: #d8dde3;
  16. --text-secondary: #8a929c;
  17. --text-dim: #5a616a;
  18. /* Акценты */
  19. --accent-amber: #ffb627;
  20. --accent-amber-2: #ff8c00;
  21. --accent-red: #e63946;
  22. --accent-green: #4ade80;
  23. --accent-cyan: #4fc3f7;
  24. --accent-gold: #c9a227;
  25. /* Металл */
  26. --metal-1: #8b8b8b;
  27. --metal-2: #c9c9c9;
  28. --metal-3: #6b6b6b;
  29. /* Тени и свечения */
  30. --glow-amber: 0 0 12px rgba(255, 182, 39, 0.7);
  31. --glow-red: 0 0 12px rgba(230, 57, 70, 0.7);
  32. --glow-green: 0 0 12px rgba(74, 222, 128, 0.7);
  33. --glow-cyan: 0 0 10px rgba(79, 195, 247, 0.6);
  34. --shadow-panel: 0 4px 20px rgba(0, 0, 0, 0.6);
  35. --shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.8);
  36. --shadow-key: 0 3px 0 #0a0c0e, 0 4px 8px rgba(0, 0, 0, 0.5);
  37. --shadow-key-act: 0 1px 0 #0a0c0e, 0 2px 4px rgba(0, 0, 0, 0.5);
  38. /* Шрифты */
  39. --font-serif: 'PT Serif', Georgia, serif;
  40. --font-slab: 'Roboto Slab', 'PT Serif', serif;
  41. --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  42. /* Прочее */
  43. --radius: 8px;
  44. --radius-sm: 4px;
  45. --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  46. }
  47. /* ---------- Сброс и база ---------- */
  48. *,
  49. *::before,
  50. *::after {
  51. box-sizing: border-box;
  52. margin: 0;
  53. padding: 0;
  54. }
  55. html {
  56. scroll-behavior: smooth;
  57. -webkit-text-size-adjust: 100%;
  58. }
  59. body {
  60. font-family: var(--font-slab);
  61. font-size: 15px;
  62. line-height: 1.5;
  63. color: var(--text-primary);
  64. background-color: var(--bg-deep);
  65. background-image:
  66. radial-gradient(circle at 20% 10%, rgba(79, 195, 247, 0.05), transparent 40%),
  67. radial-gradient(circle at 80% 90%, rgba(255, 182, 39, 0.05), transparent 40%),
  68. repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px),
  69. repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
  70. min-height: 100vh;
  71. overflow-x: hidden;
  72. }
  73. button {
  74. font-family: inherit;
  75. cursor: pointer;
  76. border: none;
  77. background: none;
  78. color: inherit;
  79. }
  80. h1, h2, h3 {
  81. font-family: var(--font-slab);
  82. font-weight: 700;
  83. letter-spacing: 0.02em;
  84. }
  85. /* Кастомный скроллбар */
  86. ::-webkit-scrollbar { width: 10px; height: 10px; }
  87. ::-webkit-scrollbar-track { background: var(--bg-inset); }
  88. ::-webkit-scrollbar-thumb {
  89. background: linear-gradient(180deg, #3a4048, #262b31);
  90. border-radius: 6px;
  91. border: 2px solid var(--bg-inset);
  92. }
  93. ::-webkit-scrollbar-thumb:hover { background: #4d545e; }
  94. /* ---------- Шапка ---------- */
  95. .app-header {
  96. position: sticky;
  97. top: 0;
  98. z-index: 100;
  99. background: linear-gradient(180deg, #1f242a 0%, #15181c 100%);
  100. border-bottom: 2px solid var(--border-metal);
  101. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  102. backdrop-filter: blur(6px);
  103. }
  104. .header-content {
  105. max-width: 1600px;
  106. margin: 0 auto;
  107. padding: 12px 24px;
  108. display: flex;
  109. align-items: center;
  110. justify-content: space-between;
  111. gap: 20px;
  112. flex-wrap: wrap;
  113. }
  114. .header-title h1 {
  115. font-size: 26px;
  116. font-weight: 700;
  117. letter-spacing: 0.08em;
  118. color: var(--accent-amber);
  119. text-shadow: 0 0 12px rgba(255, 182, 39, 0.4);
  120. font-family: var(--font-mono);
  121. }
  122. .header-title .subtitle {
  123. font-size: 12px;
  124. color: var(--text-secondary);
  125. letter-spacing: 0.14em;
  126. text-transform: uppercase;
  127. margin-top: 2px;
  128. }
  129. .header-nav {
  130. display: flex;
  131. gap: 8px;
  132. }
  133. .nav-btn {
  134. width: 40px;
  135. height: 40px;
  136. border-radius: var(--radius-sm);
  137. background: linear-gradient(180deg, #2c323a, #1e2227);
  138. border: 1px solid var(--border-metal);
  139. color: var(--text-secondary);
  140. font-size: 18px;
  141. display: grid;
  142. place-items: center;
  143. transition: var(--transition);
  144. box-shadow: 0 2px 0 rgba(0,0,0,0.5);
  145. }
  146. .nav-btn:hover {
  147. color: var(--accent-amber);
  148. border-color: var(--accent-amber);
  149. box-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 0 12px rgba(255, 182, 39, 0.35);
  150. transform: translateY(-1px);
  151. }
  152. .nav-btn:active {
  153. transform: translateY(1px);
  154. box-shadow: 0 0 0 rgba(0,0,0,0.5);
  155. }
  156. .nav-btn.muted { color: var(--text-dim); opacity: 0.6; }
  157. /* Полоса прогресса */
  158. .progress-line {
  159. height: 3px;
  160. background: var(--bg-inset);
  161. overflow: hidden;
  162. }
  163. .progress-fill {
  164. height: 100%;
  165. width: 0%;
  166. background: linear-gradient(90deg, var(--accent-amber), var(--accent-amber-2));
  167. box-shadow: 0 0 8px var(--accent-amber);
  168. transition: width 0.5s ease-out;
  169. }
  170. /* ---------- Основной макет ---------- */
  171. .app-main {
  172. max-width: 1600px;
  173. margin: 0 auto;
  174. padding: 20px 24px 10px;
  175. display: grid;
  176. grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.7fr);
  177. grid-template-rows: auto auto;
  178. grid-template-areas:
  179. "lock circuit"
  180. "lock keyboard";
  181. gap: 20px;
  182. }
  183. .panel-lock { grid-area: lock; }
  184. .panel-circuit { grid-area: circuit; }
  185. .panel-keyboard { grid-area: keyboard; }
  186. /* ---------- Панель (общая) ---------- */
  187. .panel {
  188. background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  189. border: 1px solid var(--border-metal);
  190. border-radius: var(--radius);
  191. box-shadow: var(--shadow-panel);
  192. padding: 16px;
  193. position: relative;
  194. display: flex;
  195. flex-direction: column;
  196. overflow: hidden;
  197. }
  198. .panel::before {
  199. content: '';
  200. position: absolute;
  201. inset: 0;
  202. border-radius: var(--radius);
  203. pointer-events: none;
  204. background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.15) 100%);
  205. }
  206. .panel-header {
  207. display: flex;
  208. align-items: center;
  209. gap: 10px;
  210. padding-bottom: 12px;
  211. margin-bottom: 14px;
  212. border-bottom: 1px solid var(--border-metal);
  213. }
  214. .panel-tag {
  215. font-family: var(--font-mono);
  216. font-size: 12px;
  217. color: var(--accent-amber);
  218. background: rgba(255, 182, 39, 0.1);
  219. border: 1px solid rgba(255, 182, 39, 0.3);
  220. padding: 2px 8px;
  221. border-radius: 3px;
  222. letter-spacing: 0.1em;
  223. }
  224. .panel-header h2 {
  225. font-size: 16px;
  226. font-weight: 500;
  227. color: var(--text-primary);
  228. letter-spacing: 0.04em;
  229. flex: 1;
  230. }
  231. /* ============================================================
  232. ЛЕВАЯ ПАНЕЛЬ: ЗАЩЁЛКА
  233. ============================================================ */
  234. .panel-lock {
  235. grid-row: span 2;
  236. }
  237. .lock-scene {
  238. flex: 1;
  239. display: flex;
  240. flex-direction: column;
  241. align-items: center;
  242. justify-content: center;
  243. position: relative;
  244. background: radial-gradient(ellipse at center, rgba(79, 195, 247, 0.04), transparent 60%);
  245. border-radius: var(--radius-sm);
  246. padding: 10px;
  247. min-height: 380px;
  248. }
  249. #lock-svg {
  250. width: 100%;
  251. max-width: 340px;
  252. height: auto;
  253. filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
  254. }
  255. /* Анимация ригеля */
  256. #bolt-group {
  257. transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  258. }
  259. .panel-lock.unlocked #bolt-group {
  260. transform: translateX(95px);
  261. }
  262. .panel-lock.unlocked #spring-group {
  263. transform: translateX(70px) scaleX(0.5);
  264. transform-origin: left center;
  265. transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  266. }
  267. #spring-group { transition: transform 0.55s ease-out; }
  268. /* Свечение электромагнита */
  269. #magnet-glow {
  270. transition: opacity 0.25s ease-in-out;
  271. }
  272. .panel-lock.magnet-on #magnet-glow {
  273. opacity: 1;
  274. animation: magnetPulse 1.2s ease-in-out infinite;
  275. }
  276. @keyframes magnetPulse {
  277. 0%, 100% { opacity: 0.7; }
  278. 50% { opacity: 1; }
  279. }
  280. /* Индикатор состояния замка */
  281. .lock-status {
  282. display: flex;
  283. align-items: center;
  284. gap: 10px;
  285. padding: 8px 16px;
  286. background: var(--bg-inset);
  287. border: 1px solid var(--border-metal);
  288. border-radius: var(--radius-sm);
  289. margin-top: 12px;
  290. font-family: var(--font-mono);
  291. font-size: 13px;
  292. letter-spacing: 0.05em;
  293. box-shadow: var(--shadow-inset);
  294. }
  295. .status-dot {
  296. width: 10px;
  297. height: 10px;
  298. border-radius: 50%;
  299. background: var(--accent-red);
  300. box-shadow: 0 0 8px var(--accent-red);
  301. transition: var(--transition);
  302. animation: statusBlink 2s infinite;
  303. }
  304. @keyframes statusBlink {
  305. 0%, 100% { opacity: 1; }
  306. 50% { opacity: 0.55; }
  307. }
  308. .lock-status.open .status-dot {
  309. background: var(--accent-green);
  310. box-shadow: 0 0 10px var(--accent-green);
  311. animation: none;
  312. }
  313. .lock-status.open .status-text { color: var(--accent-green); }
  314. .lock-status.error .status-dot {
  315. background: var(--accent-red);
  316. box-shadow: 0 0 14px var(--accent-red);
  317. animation: errBlink 0.35s 3;
  318. }
  319. @keyframes errBlink {
  320. 0%, 100% { opacity: 1; }
  321. 50% { opacity: 0.15; }
  322. }
  323. .lock-info {
  324. margin-top: 14px;
  325. padding: 12px;
  326. background: var(--bg-inset);
  327. border-left: 3px solid var(--accent-amber);
  328. border-radius: var(--radius-sm);
  329. font-size: 13px;
  330. color: var(--text-secondary);
  331. line-height: 1.55;
  332. }
  333. .lock-info strong { color: var(--accent-amber); }
  334. /* ============================================================
  335. ПРАВАЯ ВЕРХНЯЯ ПАНЕЛЬ: СХЕМА
  336. ============================================================ */
  337. .panel-circuit {
  338. min-height: 340px;
  339. }
  340. .circuit-legend {
  341. display: flex;
  342. gap: 14px;
  343. font-size: 11px;
  344. color: var(--text-dim);
  345. letter-spacing: 0.03em;
  346. }
  347. .legend-item {
  348. display: flex;
  349. align-items: center;
  350. gap: 5px;
  351. }
  352. .dot {
  353. width: 9px;
  354. height: 9px;
  355. border-radius: 50%;
  356. display: inline-block;
  357. border: 1px solid #000;
  358. }
  359. .dot-off { background: #3a4048; }
  360. .dot-on { background: var(--accent-cyan); box-shadow: 0 0 6px var(--accent-cyan); }
  361. .circuit-wrap {
  362. flex: 1;
  363. display: flex;
  364. flex-direction: column;
  365. gap: 10px;
  366. min-height: 0;
  367. }
  368. #circuit-svg {
  369. width: 100%;
  370. height: auto;
  371. max-height: 340px;
  372. border-radius: var(--radius-sm);
  373. background: #0a0f13;
  374. box-shadow: var(--shadow-inset);
  375. }
  376. /* Кликабельные узлы схемы */
  377. .circuit-node {
  378. cursor: pointer;
  379. transition: filter 0.2s ease;
  380. }
  381. .circuit-node:hover {
  382. filter: drop-shadow(0 0 8px rgba(255, 182, 39, 0.8));
  383. }
  384. .circuit-node.active rect,
  385. .circuit-node.active circle,
  386. .circuit-node.active polygon {
  387. stroke: var(--accent-cyan);
  388. filter: drop-shadow(0 0 6px var(--accent-cyan));
  389. }
  390. .circuit-node.active text {
  391. fill: var(--accent-cyan);
  392. font-weight: 700;
  393. }
  394. .circuit-node.pulse rect {
  395. animation: nodePulse 0.6s ease-in-out;
  396. }
  397. @keyframes nodePulse {
  398. 0% { stroke: #4fc3f7; filter: drop-shadow(0 0 4px #4fc3f7); }
  399. 50% { stroke: #fff; filter: drop-shadow(0 0 16px #4fc3f7); }
  400. 100% { stroke: #4fc3f7; filter: drop-shadow(0 0 4px #4fc3f7); }
  401. }
  402. .circuit-node.error rect {
  403. animation: nodeError 0.35s ease-in-out 3;
  404. }
  405. @keyframes nodeError {
  406. 0%, 100% { stroke: #3a5050; }
  407. 50% { stroke: #e63946; filter: drop-shadow(0 0 10px #e63946); }
  408. }
  409. /* Инфо-окно о схеме */
  410. .circuit-info {
  411. background: var(--bg-inset);
  412. border: 1px solid var(--border-metal);
  413. border-radius: var(--radius-sm);
  414. padding: 10px 14px;
  415. min-height: 52px;
  416. font-size: 13px;
  417. color: var(--text-secondary);
  418. display: flex;
  419. align-items: center;
  420. box-shadow: var(--shadow-inset);
  421. transition: var(--transition);
  422. }
  423. .circuit-info.active {
  424. border-color: var(--accent-cyan);
  425. color: var(--text-primary);
  426. }
  427. .circuit-info strong { color: var(--accent-amber); }
  428. .circuit-info-hint { color: var(--text-dim); font-style: italic; }
  429. /* ============================================================
  430. ПРАВАЯ НИЖНЯЯ ПАНЕЛЬ: КЛАВИАТУРА
  431. ============================================================ */
  432. .panel-keyboard {
  433. min-height: 300px;
  434. }
  435. .kbd-indicators {
  436. display: flex;
  437. gap: 8px;
  438. }
  439. .kbd-ind {
  440. font-family: var(--font-mono);
  441. font-size: 12px;
  442. color: var(--accent-amber);
  443. background: var(--bg-inset);
  444. border: 1px solid var(--border-metal);
  445. padding: 3px 10px;
  446. border-radius: 3px;
  447. letter-spacing: 0.05em;
  448. box-shadow: var(--shadow-inset);
  449. }
  450. .kbd-ind.error-flash {
  451. color: var(--accent-red);
  452. border-color: var(--accent-red);
  453. animation: errBlink 0.35s 3;
  454. }
  455. /* Корпус клавиатуры */
  456. .keyboard-scene {
  457. flex: 1;
  458. display: flex;
  459. align-items: center;
  460. justify-content: center;
  461. padding: 8px;
  462. }
  463. .keyboard-device {
  464. background: linear-gradient(160deg, #2a2f36 0%, #1a1d22 100%);
  465. border: 2px solid var(--border-metal);
  466. border-radius: 10px;
  467. padding: 14px;
  468. box-shadow:
  469. 0 8px 24px rgba(0,0,0,0.7),
  470. inset 0 1px 0 rgba(255,255,255,0.08),
  471. inset 0 -2px 4px rgba(0,0,0,0.6);
  472. width: 100%;
  473. max-width: 420px;
  474. }
  475. /* Верхняя часть корпуса */
  476. .kbd-top {
  477. display: flex;
  478. align-items: center;
  479. justify-content: space-between;
  480. margin-bottom: 12px;
  481. padding: 8px 12px;
  482. background: var(--bg-inset);
  483. border-radius: var(--radius-sm);
  484. box-shadow: var(--shadow-inset);
  485. }
  486. .kbd-lamp {
  487. width: 16px;
  488. height: 16px;
  489. border-radius: 50%;
  490. background: radial-gradient(circle at 30% 30%, #5a3030, #2a1515);
  491. border: 1px solid #1a0a0a;
  492. box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
  493. transition: var(--transition);
  494. }
  495. .kbd-lamp.on {
  496. background: radial-gradient(circle at 30% 30%, #ffdd88, #e63946);
  497. box-shadow:
  498. 0 0 12px rgba(230, 57, 70, 0.9),
  499. 0 0 24px rgba(230, 57, 70, 0.5),
  500. inset 0 1px 2px rgba(0,0,0,0.4);
  501. }
  502. .kbd-lamp.success {
  503. background: radial-gradient(circle at 30% 30%, #bbf7d0, #4ade80);
  504. box-shadow:
  505. 0 0 14px rgba(74, 222, 128, 0.9),
  506. 0 0 28px rgba(74, 222, 128, 0.5);
  507. }
  508. .kbd-brand {
  509. font-family: var(--font-mono);
  510. font-size: 13px;
  511. letter-spacing: 0.2em;
  512. color: var(--text-dim);
  513. text-shadow: 0 1px 0 rgba(255,255,255,0.05);
  514. }
  515. .kbd-led {
  516. width: 8px;
  517. height: 8px;
  518. border-radius: 50%;
  519. background: #4ade80;
  520. box-shadow: 0 0 6px #4ade80;
  521. animation: ledPulse 2.5s infinite;
  522. }
  523. @keyframes ledPulse {
  524. 0%, 100% { opacity: 1; }
  525. 50% { opacity: 0.4; }
  526. }
  527. /* Сетка кнопок */
  528. .keyboard-grid {
  529. display: grid;
  530. grid-template-columns: repeat(3, 1fr);
  531. gap: 8px;
  532. }
  533. .key {
  534. position: relative;
  535. height: 52px;
  536. font-family: var(--font-mono);
  537. font-size: 20px;
  538. font-weight: 700;
  539. color: var(--text-primary);
  540. background: linear-gradient(180deg, #3a4048 0%, #262b31 100%);
  541. border: 1px solid #1a1d22;
  542. border-radius: 6px;
  543. box-shadow:
  544. 0 3px 0 #0a0c0e,
  545. 0 4px 8px rgba(0,0,0,0.5),
  546. inset 0 1px 0 rgba(255,255,255,0.08);
  547. transition: transform 0.06s ease-out, box-shadow 0.06s ease-out, background 0.15s ease;
  548. user-select: none;
  549. -webkit-tap-highlight-color: transparent;
  550. }
  551. .key:hover:not(:disabled) {
  552. background: linear-gradient(180deg, #454c56 0%, #2e343b 100%);
  553. color: var(--accent-amber);
  554. }
  555. .key:active:not(:disabled),
  556. .key.pressed {
  557. transform: translateY(3px);
  558. box-shadow:
  559. 0 0 0 #0a0c0e,
  560. 0 1px 3px rgba(0,0,0,0.6),
  561. inset 0 2px 4px rgba(0,0,0,0.5);
  562. background: linear-gradient(180deg, #1e2227 0%, #2a2f36 100%);
  563. color: var(--accent-amber);
  564. }
  565. .key:focus-visible {
  566. outline: 2px solid var(--accent-cyan);
  567. outline-offset: 2px;
  568. }
  569. .key-disabled,
  570. .key:disabled {
  571. opacity: 0.35;
  572. cursor: not-allowed;
  573. background: linear-gradient(180deg, #262b31 0%, #1a1d22 100%);
  574. color: var(--text-dim);
  575. }
  576. .key-reset {
  577. font-size: 11px;
  578. letter-spacing: 0.1em;
  579. color: var(--accent-amber);
  580. background: linear-gradient(180deg, #4a3a1a 0%, #2e2511 100%);
  581. border-color: #5a4520;
  582. }
  583. .key-reset:hover:not(:disabled) {
  584. background: linear-gradient(180deg, #5a4520 0%, #3a2e15 100%);
  585. color: #ffd87a;
  586. }
  587. /* Нижняя часть: дисплей кода */
  588. .keyboard-footer {
  589. margin-top: 14px;
  590. display: flex;
  591. flex-direction: column;
  592. align-items: center;
  593. gap: 8px;
  594. }
  595. .code-display {
  596. display: flex;
  597. gap: 8px;
  598. padding: 8px 14px;
  599. background: var(--bg-inset);
  600. border: 1px solid var(--border-metal);
  601. border-radius: var(--radius-sm);
  602. box-shadow: var(--shadow-inset);
  603. }
  604. .code-cell {
  605. width: 32px;
  606. height: 42px;
  607. display: grid;
  608. place-items: center;
  609. font-family: var(--font-mono);
  610. font-size: 22px;
  611. color: var(--text-dim);
  612. background: #050708;
  613. border: 1px solid #1a1d22;
  614. border-radius: 3px;
  615. box-shadow: inset 0 2px 6px rgba(0,0,0,0.9);
  616. transition: var(--transition);
  617. }
  618. .code-cell.filled {
  619. color: var(--accent-amber);
  620. text-shadow: 0 0 8px rgba(255, 182, 39, 0.6);
  621. border-color: rgba(255, 182, 39, 0.3);
  622. }
  623. .code-cell.error {
  624. color: var(--accent-red);
  625. text-shadow: 0 0 8px rgba(230, 57, 70, 0.8);
  626. border-color: var(--accent-red);
  627. animation: cellShake 0.35s;
  628. }
  629. .code-cell.success {
  630. color: var(--accent-green);
  631. text-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  632. border-color: var(--accent-green);
  633. }
  634. @keyframes cellShake {
  635. 0%, 100% { transform: translateX(0); }
  636. 20% { transform: translateX(-4px); }
  637. 40% { transform: translateX(4px); }
  638. 60% { transform: translateX(-3px); }
  639. 80% { transform: translateX(3px); }
  640. }
  641. .kbd-hint {
  642. font-size: 12px;
  643. color: var(--text-dim);
  644. text-align: center;
  645. font-style: italic;
  646. }
  647. /* ============================================================
  648. ПОДВАЛ: ЛОГ И КНОПКИ
  649. ============================================================ */
  650. .app-footer {
  651. max-width: 1600px;
  652. margin: 0 auto;
  653. padding: 0 24px 30px;
  654. display: grid;
  655. grid-template-columns: 1fr auto;
  656. gap: 20px;
  657. align-items: start;
  658. }
  659. .log-panel {
  660. background: var(--bg-panel);
  661. border: 1px solid var(--border-metal);
  662. border-radius: var(--radius);
  663. box-shadow: var(--shadow-panel);
  664. overflow: hidden;
  665. max-height: 200px;
  666. display: flex;
  667. flex-direction: column;
  668. }
  669. .log-header {
  670. display: flex;
  671. align-items: center;
  672. justify-content: space-between;
  673. padding: 8px 14px;
  674. background: var(--bg-inset);
  675. border-bottom: 1px solid var(--border-metal);
  676. font-family: var(--font-mono);
  677. font-size: 11px;
  678. letter-spacing: 0.15em;
  679. text-transform: uppercase;
  680. color: var(--text-dim);
  681. }
  682. .log-clear {
  683. font-size: 10px;
  684. color: var(--text-dim);
  685. padding: 3px 8px;
  686. border-radius: 3px;
  687. border: 1px solid var(--border-metal);
  688. transition: var(--transition);
  689. }
  690. .log-clear:hover {
  691. color: var(--accent-red);
  692. border-color: var(--accent-red);
  693. }
  694. .log-list {
  695. list-style: none;
  696. overflow-y: auto;
  697. padding: 6px 0;
  698. flex: 1;
  699. font-family: var(--font-mono);
  700. font-size: 12px;
  701. line-height: 1.7;
  702. }
  703. .log-item {
  704. padding: 3px 14px;
  705. border-left: 3px solid transparent;
  706. color: var(--text-secondary);
  707. animation: logFadeIn 0.3s ease-out;
  708. }
  709. @keyframes logFadeIn {
  710. from { opacity: 0; transform: translateX(-8px); }
  711. to { opacity: 1; transform: translateX(0); }
  712. }
  713. .log-item::before {
  714. content: '› ';
  715. color: var(--text-dim);
  716. margin-right: 4px;
  717. }
  718. .log-info { border-left-color: var(--accent-cyan); color: var(--text-secondary); }
  719. .log-success { border-left-color: var(--accent-green); color: var(--accent-green); }
  720. .log-error { border-left-color: var(--accent-red); color: var(--accent-red); }
  721. .log-warn { border-left-color: var(--accent-amber); color: var(--accent-amber); }
  722. /* Кнопки действий */
  723. .footer-actions {
  724. display: flex;
  725. flex-direction: column;
  726. gap: 10px;
  727. }
  728. .btn {
  729. font-family: var(--font-slab);
  730. font-weight: 500;
  731. font-size: 14px;
  732. letter-spacing: 0.06em;
  733. padding: 12px 26px;
  734. border-radius: var(--radius-sm);
  735. border: 1px solid var(--border-metal);
  736. background: linear-gradient(180deg, #2c323a, #1e2227);
  737. color: var(--text-primary);
  738. transition: var(--transition);
  739. box-shadow: 0 3px 0 #0a0c0e, 0 4px 10px rgba(0,0,0,0.5);
  740. white-space: nowrap;
  741. }
  742. .btn:hover {
  743. transform: translateY(-2px);
  744. box-shadow: 0 5px 0 #0a0c0e, 0 6px 14px rgba(0,0,0,0.6);
  745. }
  746. .btn:active {
  747. transform: translateY(1px);
  748. box-shadow: 0 0 0 #0a0c0e, 0 1px 4px rgba(0,0,0,0.5);
  749. }
  750. .btn-primary {
  751. background: linear-gradient(180deg, #4a3810, #2e2511);
  752. border-color: var(--accent-amber);
  753. color: var(--accent-amber);
  754. text-shadow: 0 0 8px rgba(255, 182, 39, 0.4);
  755. }
  756. .btn-primary:hover {
  757. background: linear-gradient(180deg, #5a4520, #3a2e15);
  758. box-shadow: 0 5px 0 #0a0c0e, 0 6px 14px rgba(0,0,0,0.6), 0 0 20px rgba(255, 182, 39, 0.4);
  759. }
  760. .btn-quiz {
  761. font-size: 15px;
  762. padding: 14px 32px;
  763. }
  764. /* ============================================================
  765. МОДАЛЬНЫЕ ОКНА
  766. ============================================================ */
  767. .modal {
  768. position: fixed;
  769. inset: 0;
  770. z-index: 1000;
  771. display: none;
  772. align-items: center;
  773. justify-content: center;
  774. padding: 20px;
  775. }
  776. .modal.visible {
  777. display: flex;
  778. animation: modalIn 0.25s ease-out;
  779. }
  780. @keyframes modalIn {
  781. from { opacity: 0; }
  782. to { opacity: 1; }
  783. }
  784. .modal-backdrop {
  785. position: absolute;
  786. inset: 0;
  787. background: rgba(0, 0, 0, 0.82);
  788. backdrop-filter: blur(4px);
  789. }
  790. .modal-content {
  791. position: relative;
  792. z-index: 1;
  793. width: 100%;
  794. max-width: 720px;
  795. max-height: 88vh;
  796. overflow-y: auto;
  797. background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  798. border: 1px solid var(--border-light);
  799. border-radius: var(--radius);
  800. box-shadow:
  801. 0 20px 60px rgba(0, 0, 0, 0.9),
  802. 0 0 40px rgba(255, 182, 39, 0.1);
  803. padding: 28px 32px;
  804. animation: modalContentIn 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  805. }
  806. @keyframes modalContentIn {
  807. from { transform: translateY(24px) scale(0.96); opacity: 0; }
  808. to { transform: translateY(0) scale(1); opacity: 1; }
  809. }
  810. .modal-content-quiz { max-width: 800px; }
  811. .modal-close {
  812. position: absolute;
  813. top: 14px;
  814. right: 14px;
  815. width: 34px;
  816. height: 34px;
  817. border-radius: 50%;
  818. background: var(--bg-inset);
  819. border: 1px solid var(--border-metal);
  820. color: var(--text-secondary);
  821. font-size: 15px;
  822. display: grid;
  823. place-items: center;
  824. transition: var(--transition);
  825. }
  826. .modal-close:hover {
  827. color: var(--accent-red);
  828. border-color: var(--accent-red);
  829. transform: rotate(90deg);
  830. }
  831. .modal-content h2 {
  832. font-size: 20px;
  833. color: var(--accent-amber);
  834. margin-bottom: 16px;
  835. padding-bottom: 12px;
  836. border-bottom: 1px solid var(--border-metal);
  837. letter-spacing: 0.03em;
  838. }
  839. .modal-body h3 {
  840. font-size: 15px;
  841. color: var(--accent-cyan);
  842. margin: 18px 0 8px;
  843. letter-spacing: 0.04em;
  844. }
  845. .modal-body p,
  846. .modal-body li {
  847. font-size: 14px;
  848. color: var(--text-secondary);
  849. line-height: 1.65;
  850. margin-bottom: 8px;
  851. }
  852. .modal-body ul,
  853. .modal-body ol {
  854. padding-left: 22px;
  855. margin-bottom: 10px;
  856. }
  857. .modal-body li::marker {
  858. color: var(--accent-amber);
  859. }
  860. .modal-body strong { color: var(--accent-amber); }
  861. .modal-note {
  862. margin-top: 18px;
  863. padding: 10px 14px;
  864. background: var(--bg-inset);
  865. border-left: 3px solid var(--accent-cyan);
  866. border-radius: var(--radius-sm);
  867. font-size: 13px;
  868. font-style: italic;
  869. }
  870. /* ============================================================
  871. ТЕСТ
  872. ============================================================ */
  873. .quiz-header {
  874. margin-bottom: 20px;
  875. padding-bottom: 14px;
  876. border-bottom: 1px solid var(--border-metal);
  877. }
  878. .quiz-header h2 {
  879. border: none;
  880. padding: 0;
  881. margin-bottom: 6px;
  882. }
  883. .quiz-progress {
  884. font-family: var(--font-mono);
  885. font-size: 12px;
  886. color: var(--text-dim);
  887. letter-spacing: 0.1em;
  888. }
  889. .quiz-bar {
  890. height: 4px;
  891. background: var(--bg-inset);
  892. border-radius: 3px;
  893. overflow: hidden;
  894. margin-top: 10px;
  895. }
  896. .quiz-bar-fill {
  897. height: 100%;
  898. background: linear-gradient(90deg, var(--accent-amber), var(--accent-amber-2));
  899. transition: width 0.4s ease;
  900. }
  901. .quiz-question {
  902. font-size: 16px;
  903. font-weight: 500;
  904. color: var(--text-primary);
  905. margin-bottom: 18px;
  906. line-height: 1.5;
  907. }
  908. .quiz-answers {
  909. display: flex;
  910. flex-direction: column;
  911. gap: 10px;
  912. margin-bottom: 20px;
  913. }
  914. .quiz-answer {
  915. text-align: left;
  916. padding: 14px 18px;
  917. background: var(--bg-inset);
  918. border: 1px solid var(--border-metal);
  919. border-radius: var(--radius-sm);
  920. color: var(--text-secondary);
  921. font-size: 14px;
  922. font-family: var(--font-slab);
  923. transition: var(--transition);
  924. position: relative;
  925. padding-left: 48px;
  926. }
  927. .quiz-answer::before {
  928. content: attr(data-letter);
  929. position: absolute;
  930. left: 14px;
  931. top: 50%;
  932. transform: translateY(-50%);
  933. width: 22px;
  934. height: 22px;
  935. display: grid;
  936. place-items: center;
  937. background: var(--bg-panel);
  938. border: 1px solid var(--border-metal);
  939. border-radius: 3px;
  940. font-family: var(--font-mono);
  941. font-size: 12px;
  942. color: var(--text-dim);
  943. transition: var(--transition);
  944. }
  945. .quiz-answer:hover:not(:disabled) {
  946. border-color: var(--accent-cyan);
  947. color: var(--text-primary);
  948. transform: translateX(3px);
  949. }
  950. .quiz-answer:hover:not(:disabled)::before {
  951. color: var(--accent-cyan);
  952. border-color: var(--accent-cyan);
  953. }
  954. .quiz-answer.correct {
  955. background: rgba(74, 222, 128, 0.1);
  956. border-color: var(--accent-green);
  957. color: var(--accent-green);
  958. }
  959. .quiz-answer.correct::before {
  960. content: '✓';
  961. color: var(--accent-green);
  962. border-color: var(--accent-green);
  963. background: rgba(74, 222, 128, 0.15);
  964. }
  965. .quiz-answer.wrong {
  966. background: rgba(230, 57, 70, 0.1);
  967. border-color: var(--accent-red);
  968. color: var(--accent-red);
  969. animation: cellShake 0.35s;
  970. }
  971. .quiz-answer.wrong::before {
  972. content: '✕';
  973. color: var(--accent-red);
  974. border-color: var(--accent-red);
  975. background: rgba(230, 57, 70, 0.15);
  976. }
  977. .quiz-answer:disabled {
  978. cursor: default;
  979. }
  980. .quiz-nav {
  981. display: flex;
  982. justify-content: flex-end;
  983. gap: 10px;
  984. }
  985. .quiz-result {
  986. text-align: center;
  987. padding: 20px 0;
  988. }
  989. .quiz-result h2 {
  990. font-size: 26px;
  991. margin-bottom: 20px;
  992. border: none;
  993. }
  994. .quiz-score {
  995. font-family: var(--font-mono);
  996. font-size: 56px;
  997. font-weight: 700;
  998. color: var(--accent-amber);
  999. text-shadow: 0 0 24px rgba(255, 182, 39, 0.6);
  1000. margin: 20px 0;
  1001. letter-spacing: 0.05em;
  1002. }
  1003. .quiz-score.good { color: var(--accent-green); text-shadow: 0 0 24px rgba(74, 222, 128, 0.6); }
  1004. .quiz-score.bad { color: var(--accent-red); text-shadow: 0 0 24px rgba(230, 57, 70, 0.6); }
  1005. .quiz-verdict {
  1006. font-size: 17px;
  1007. color: var(--text-secondary);
  1008. margin-bottom: 24px;
  1009. line-height: 1.6;
  1010. }
  1011. .quiz-verdict strong { color: var(--accent-amber); }
  1012. /* ============================================================
  1013. ТОСТ
  1014. ============================================================ */
  1015. .toast {
  1016. position: fixed;
  1017. bottom: 30px;
  1018. left: 50%;
  1019. transform: translateX(-50%) translateY(120%);
  1020. padding: 14px 26px;
  1021. background: linear-gradient(180deg, #2a2f36, #1a1d22);
  1022. border: 1px solid var(--border-light);
  1023. border-left: 4px solid var(--accent-amber);
  1024. border-radius: var(--radius-sm);
  1025. box-shadow: 0 12px 30px rgba(0,0,0,0.8);
  1026. font-family: var(--font-slab);
  1027. font-size: 14px;
  1028. color: var(--text-primary);
  1029. z-index: 2000;
  1030. transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  1031. max-width: 90vw;
  1032. pointer-events: none;
  1033. }
  1034. .toast.visible {
  1035. transform: translateX(-50%) translateY(0);
  1036. }
  1037. .toast.success { border-left-color: var(--accent-green); }
  1038. .toast.error { border-left-color: var(--accent-red); }
  1039. .toast.info { border-left-color: var(--accent-cyan); }
  1040. /* ============================================================
  1041. АДАПТИВНОСТЬ
  1042. ============================================================ */
  1043. @media (max-width: 1100px) {
  1044. .app-main {
  1045. grid-template-columns: 1fr;
  1046. grid-template-areas:
  1047. "lock"
  1048. "circuit"
  1049. "keyboard";
  1050. }
  1051. .panel-lock { grid-row: auto; }
  1052. .app-footer {
  1053. grid-template-columns: 1fr;
  1054. }
  1055. .footer-actions {
  1056. flex-direction: row;
  1057. justify-content: center;
  1058. }
  1059. }
  1060. @media (max-width: 640px) {
  1061. .header-content { padding: 10px 14px; }
  1062. .header-title h1 { font-size: 20px; }
  1063. .header-title .subtitle { font-size: 10px; }
  1064. .app-main { padding: 14px 12px 6px; gap: 14px; }
  1065. .app-footer { padding: 0 12px 24px; }
  1066. .panel { padding: 12px; }
  1067. .panel-header h2 { font-size: 14px; }
  1068. .key { height: 46px; font-size: 17px; }
  1069. .code-cell { width: 26px; height: 36px; font-size: 18px; }
  1070. .modal-content { padding: 20px 18px; }
  1071. .modal-content h2 { font-size: 17px; }
  1072. .quiz-score { font-size: 42px; }
  1073. .btn-quiz { padding: 12px 20px; font-size: 14px; }
  1074. .circuit-legend { display: none; }
  1075. .nav-btn { width: 36px; height: 36px; font-size: 16px; }
  1076. }
  1077. @media (max-width: 420px) {
  1078. .kbd-indicators { flex-direction: column; gap: 4px; }
  1079. .kbd-ind { font-size: 10px; padding: 2px 6px; }
  1080. .footer-actions { flex-direction: column; }
  1081. .btn { width: 100%; }
  1082. }
  1083. /* ============================================================
  1084. ПРЕДПОЧТЕНИЕ УМЕНЬШЕННОГО ДВИЖЕНИЯ
  1085. ============================================================ */
  1086. @media (prefers-reduced-motion: reduce) {
  1087. *,
  1088. *::before,
  1089. *::after {
  1090. animation-duration: 0.01ms !important;
  1091. animation-iteration-count: 1 !important;
  1092. transition-duration: 0.01ms !important;
  1093. scroll-behavior: auto !important;
  1094. }
  1095. }
  1096. /* ============================================================
  1097. ПЕЧАТЬ
  1098. ============================================================ */
  1099. @media print {
  1100. .app-header, .app-footer, .modal, .toast { display: none !important; }
  1101. body { background: #fff; color: #000; }
  1102. .panel { border: 1px solid #ccc; box-shadow: none; }
  1103. }