/* style.css — оформление PWA-модели * "Приборы ночного видения и тепловизоры" * Подключается в index.html: */ :root { --bg: #07110f; --bg2: #0a1714; --panel: #0d1a17; --line: #1e3a32; --line2: #2a4b41; --text: #e7f3ee; --muted: #8fb3a7; --accent: #6fe3c1; --accent2: #ffb86b; --danger: #ff7d7d; --nv: #7dffb2; --shadow: rgba(0, 0, 0, 0.35); } * { box-sizing: border-box; } html, body { margin: 0; min-height: 100%; background: radial-gradient(1200px 700px at 15% -10%, rgba(111, 227, 193, 0.13), transparent 60%), radial-gradient(900px 600px at 95% 0%, rgba(255, 184, 107, 0.10), transparent 55%), linear-gradient(180deg, var(--bg), var(--bg2)); color: var(--text); font-family: "Segoe UI", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; } body { padding: 0 0 40px; } /* ---------- Заголовок ---------- */ header { max-width: 1320px; margin: 0 auto; padding: 28px 20px 12px; } h1 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 34px); font-weight: 650; letter-spacing: 0.02em; } .subtitle { margin: 0; max-width: 980px; color: var(--muted); line-height: 1.55; font-size: 15px; } /* ---------- Основная сетка ---------- */ main { max-width: 1320px; margin: 0 auto; padding: 10px 20px 0; } .stage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; } @media (max-width: 980px) { .stage { grid-template-columns: 1fr; } } /* ---------- Панели с изображениями ---------- */ .panel { background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)), var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px var(--shadow); } .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.018); } .panel-title { font-size: 14px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); } .panel-title .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--nv); box-shadow: 0 0 14px var(--nv); vertical-align: 1px; } .thermal .panel-title .dot { background: var(--accent2); box-shadow: 0 0 14px var(--accent2); } .readout { font-family: "Cascadia Code", "Consolas", monospace; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } canvas { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; } .panel-foot { padding: 10px 14px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; min-height: 38px; } /* ---------- Блок управления ---------- */ .controls { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } @media (max-width: 980px) { .controls { grid-template-columns: 1fr; } } fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.02); } legend { padding: 0 8px; color: var(--text); font-weight: 650; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; } /* ---------- Кнопки ---------- */ .scene-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } button { appearance: none; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.035); color: var(--text); border-radius: 12px; padding: 9px 13px; font: inherit; font-size: 13px; cursor: pointer; transition: 0.18s ease; } button:hover { border-color: var(--accent); background: rgba(111, 227, 193, 0.08); } button.active { border-color: var(--accent); background: rgba(111, 227, 193, 0.16); color: #dffff5; box-shadow: 0 0 0 1px rgba(111, 227, 193, 0.14) inset; } /* ---------- Ползунки и переключатели ---------- */ label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; margin: 11px 0; color: var(--muted); font-size: 13px; } label > span { grid-column: 1 / -1; } input[type="range"] { width: 100%; accent-color: var(--accent); } output { font-family: "Cascadia Code", "Consolas", monospace; font-size: 12px; color: var(--text); min-width: 72px; text-align: right; } select { width: 100%; background: #0a1512; color: var(--text); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 10px; font: inherit; font-size: 13px; outline: none; } select:focus, input:focus { outline: 1px solid var(--accent); outline-offset: 2px; } .check { display: flex; align-items: center; gap: 10px; grid-template-columns: auto 1fr; } .check input { width: 16px; height: 16px; accent-color: var(--accent); } /* ---------- Квиз ---------- */ .quiz { margin-top: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.02); padding: 16px; } .quiz h2 { margin: 0 0 10px; font-size: 17px; } .question { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, 0.12); } .question p { margin: 0 0 10px; line-height: 1.45; } .question label { display: flex; align-items: flex-start; gap: 9px; margin: 7px 0; color: var(--text); font-size: 13px; line-height: 1.4; cursor: pointer; } .question input[type="radio"] { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--accent); } .quiz-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; } .quiz-result { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.5; } .quiz-result strong { color: var(--accent); } /* ---------- Пояснения / ссылки ---------- */ .notes { margin-top: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.018); padding: 16px; color: var(--muted); font-size: 13px; line-height: 1.6; } .notes h2 { margin: 0 0 8px; color: var(--text); font-size: 16px; } .notes code { color: var(--accent); font-family: "Cascadia Code", "Consolas", monospace; } .notes a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted rgba(111, 227, 193, 0.45); } .notes a:hover { border-bottom-style: solid; } .hint { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 8px 0 0; } /* ---------- Адаптив для узких экранов ---------- */ @media (max-width: 620px) { header { padding: 20px 14px 8px; } main { padding: 8px 14px 0; } .panel-head { flex-wrap: wrap; } .readout { white-space: normal; } fieldset { padding: 12px; } button { padding: 8px 11px; font-size: 12.5px; } } /* ---------- Уважение к prefers-reduced-motion ---------- */ @media (prefers-reduced-motion: reduce) { * { transition: none !important; } } /* ---------- Режим загружаемой фотографии ---------- */ .photo-mode { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.02); } .photo-mode h2 { margin: 0 0 8px; font-size: 18px; } .photo-intro { max-width: 1000px; margin-bottom: 14px; } .photo-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px dashed var(--line2); border-radius: 14px; margin-bottom: 16px; } .upload-label { display: block; margin: 0; color: var(--text); font-weight: 600; } .photo-upload input[type="file"] { max-width: 100%; color: var(--muted); } .photo-stage { margin-top: 0; } @media (max-width: 620px) { .photo-upload { align-items: flex-start; flex-direction: column; } } /* Photo replacement / manual thermal marking */ .photo-upload-inline { display:grid; gap:.55rem; margin-bottom:1rem; } .photo-upload-inline input[type=file] { max-width:100%; } .photo-upload-inline button, .selection-buttons button { cursor:pointer; } .thermal-selection-tools { margin-top:1rem; padding:1rem; border:1px solid rgba(255,170,60,.35); border-radius:12px; display:grid; gap:.65rem; } .thermal-selection-tools[hidden] { display:none; } .thermal-selection-tools label { display:flex; align-items:center; gap:.7rem; flex-wrap:wrap; } .thermal-selection-tools input[type=range] { flex:1; min-width:150px; } .selection-buttons { display:flex; gap:.5rem; flex-wrap:wrap; } #thermalCanvas { cursor:crosshair; } #eraseSelection.active { outline:2px solid #e5a65b; } #photoReset[hidden] { display:none; } /* Simplified single-person thermal-map controls */ #detectPerson { margin-top: .35rem; padding: .65rem .9rem; border: 1px solid var(--accent2); border-radius: 10px; background: rgba(255,184,107,.12); color: var(--text); font-weight: 650; } #detectPerson:disabled { opacity: .55; cursor: wait; }