@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Roboto+Condensed:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #172d4b;
  --navy-dark: #0c1b2e;
  --blue: #315e8a;
  --blue-light: #8fb4d7;
  --silver: #c8ced5;
  --silver-light: #e8ebef;
  --silver-dark: #7b8795;
  --text: #17212e;
  --muted: #687584;
  --green: #8be28b;
  --panel: #d8dde3;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #aab4c0; }
body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255,255,255,.22) 25%, transparent 25%) 0 0 / 18px 18px,
    linear-gradient(315deg, rgba(30,50,75,.06) 25%, transparent 25%) 0 0 / 18px 18px,
    #aab4c0;
  font-family: 'Roboto Condensed', Tahoma, sans-serif;
  padding: 26px 18px 40px;
}
button, input { font: inherit; }
.desktop {
  max-width: 900px;
  margin: 0 auto;
  background: #d6dbe1;
  border: 1px solid #f8f9fb;
  outline: 1px solid #687789;
  box-shadow: 0 14px 36px rgba(9, 22, 39, .28), inset 1px 1px #fff;
  padding: 0 22px 14px;
}
.masthead { padding: 0 5px 20px; }
.topline {
  margin: 0 -27px 23px;
  padding: 7px 13px;
  color: #d8e6f5;
  background: linear-gradient(#294d75, #142b49);
  border-bottom: 1px solid #09182b;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 10px 'IBM Plex Mono', monospace;
  letter-spacing: .08em;
}
.system-mark { display: flex; align-items: center; gap: 8px; }
.system-led { width: 7px; height: 7px; border-radius: 50%; background: #8be28b; box-shadow: 0 0 5px #8be28b; }
.topline-right { opacity: .75; }
.brand { display: flex; justify-content: center; align-items: center; gap: 17px; }
.brand-emblem {
  width: 72px; height: 72px; display: grid; place-items: center;
  background: linear-gradient(145deg, #f7f9fc, #aab9c9);
  border: 1px solid #7b8998;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #8794a3, 3px 3px 0 #9ca7b3;
}
.brand-emblem svg { width: 54px; height: 54px; fill: #183a61; stroke: #183a61; stroke-width: 2; }
.brand-emblem circle { fill: #dce7f2; }
.brand-emblem path:last-child { fill: none; stroke-width: 3; }
.brand-kicker { color: #516174; font: 9px 'IBM Plex Mono', monospace; letter-spacing: .19em; margin-bottom: 2px; }
h1 { margin: 0; font-size: clamp(36px, 7vw, 57px); font-weight: 800; line-height: .95; letter-spacing: -.04em; color: #142b49; text-shadow: 1px 1px #fff, 2px 2px #9ba7b5; }
h1 span { color: #315e8a; }
.brand-rule { display: flex; gap: 3px; margin-top: 9px; height: 4px; }
.brand-rule i { display: block; height: 4px; background: #24486e; flex: 1; }
.brand-rule i:nth-child(2) { background: #527fa9; }
.brand-rule i:nth-child(3) { background: #7f9fbd; }
.brand-rule i:nth-child(4) { background: #527fa9; }
.brand-rule i:nth-child(5) { background: #24486e; }
.tagline { margin: 20px 0 3px; text-align: center; color: #172d4b; font-size: 22px; font-weight: 700; letter-spacing: .015em; }
.period { color: #376d9e; }
.tagline-sub { text-align: center; margin: 0; font: 9px 'IBM Plex Mono', monospace; letter-spacing: .11em; color: #687584; }

.player-window { border: 1px solid #6c7c8d; background: #cbd2da; box-shadow: inset 1px 1px #fff, 2px 2px 0 #a6b0bb; }
.window-titlebar {
  min-height: 30px; display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  color: white; background: linear-gradient(90deg, #16365d, #4778a7 68%, #254a72);
  border-bottom: 1px solid #0d223d;
}
.window-icon { font-size: 10px; color: #b8dcff; }
.window-titlebar h2 { margin: 0; font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .08em; }
.window-title-meta { margin-left: auto; color: #d6e7f7; font: 9px 'IBM Plex Mono', monospace; }
.window-controls { display: flex; gap: 3px; margin-left: 6px; }
.window-controls b {
  width: 17px; height: 16px; display: grid; place-items: center; font: 700 11px Arial;
  color: #1c3551; background: linear-gradient(135deg, #f7f8fa, #aeb9c5); border: 1px solid #edf2f7;
  box-shadow: inset -1px -1px #83909e, inset 1px 1px #fff;
}
.player-body { padding: 13px; }
.display {
  color: #a9e7a3; background: #07121b; border: 2px solid #7d8b99;
  box-shadow: inset 2px 2px 7px #000, 1px 1px #fff;
  padding: 10px 12px 8px; position: relative; overflow: hidden;
  font-family: 'IBM Plex Mono', monospace;
}
.display:after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12; background: repeating-linear-gradient(to bottom, transparent 0 3px, #8fd88d 4px); }
.display-top, .display-bottom { display: flex; justify-content: space-between; gap: 12px; font-size: 9px; letter-spacing: .08em; position: relative; z-index: 1; }
.display-top { color: #81bb7d; }
.tiny-led { display: inline-block; width: 6px; height: 6px; background: #5e6c5b; border-radius: 50%; margin-right: 4px; }
.tiny-led.active { background: #8be28b; box-shadow: 0 0 7px #8be28b; }
.display-frequency { color: #657c66; }
.track-title { margin: 11px 0 3px; color: #c1f7b8; font-size: clamp(17px, 3.5vw, 24px); font-weight: 600; overflow-wrap: anywhere; text-shadow: 0 0 8px rgba(126, 238, 116, .2); }
.track-subtitle { color: #729b70; font-size: 10px; min-height: 14px; }
.meter { height: 60px; position: relative; margin: 12px 0 8px; border-top: 1px solid #263a2c; border-bottom: 1px solid #263a2c; overflow: hidden; }
.meter-grid { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(118,180,107,.12) 10px), repeating-linear-gradient(0deg, transparent 0 7px, rgba(118,180,107,.12) 8px); }
.meter-bars { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 3px; position: relative; z-index: 1; }
.meter-bars i { display: block; width: 2%; height: 3px; background: #6abf63; opacity: .65; }
.meter-bars.playing i { animation: meter 650ms ease-in-out infinite alternate; }
.meter-bars.playing i:nth-child(3n) { animation-delay: -180ms; }
.meter-bars.playing i:nth-child(4n) { animation-delay: -370ms; }
.meter-bars.playing i:nth-child(5n) { animation-delay: -90ms; }
@keyframes meter { from { height: 3px; opacity: .4; } to { height: 24px; opacity: 1; } }
.display-bottom { color: #6f966e; border-top: 1px solid #263a2c; padding-top: 7px; }
.controls { display: flex; gap: 14px; align-items: center; padding: 13px 0 8px; }
.play-button {
  display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 130px; min-height: 44px;
  color: #172d4b; font: 700 12px 'IBM Plex Mono', monospace; letter-spacing: .12em;
  background: linear-gradient(#f6f8fa, #c0c9d3); border: 1px solid #728093;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #9ba7b5, 1px 1px #fff; cursor: pointer;
}
.play-button:hover { background: linear-gradient(#fff, #d0dbe6); }
.play-button:active { box-shadow: inset 1px 1px #8a97a5; padding-top: 2px; }
.play-symbol { color: #315e8a; font-size: 15px; }
.control-side { flex: 1; min-width: 0; }
.control-labels, .volume-scale { display: flex; justify-content: space-between; color: #536274; font: 9px 'IBM Plex Mono', monospace; letter-spacing: .06em; }
#volume { display: block; width: 100%; margin: 7px 0 4px; accent-color: #315e8a; cursor: pointer; }
.volume-scale { font-size: 8px; color: #7b8795; }
.player-foot { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #b2bbc5; padding-top: 8px; color: #637080; font: 9px 'IBM Plex Mono', monospace; letter-spacing: .04em; }

.info-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; margin-top: 14px; }
.panel { border: 1px solid #929eab; background: #e0e4e9; box-shadow: inset 1px 1px #fff, 1px 1px #fff; min-width: 0; }
.panel-heading { min-height: 31px; display: flex; align-items: center; gap: 8px; padding: 6px 9px; background: linear-gradient(#f4f6f8, #c9d1da); border-bottom: 1px solid #a5b0bc; }
.panel-number { color: #5079a1; font: 10px 'IBM Plex Mono', monospace; }
.panel-heading h2 { margin: 0; color: #203b5a; font: 700 10px 'IBM Plex Mono', monospace; letter-spacing: .045em; white-space: nowrap; }
.heading-line { height: 1px; background: #aeb9c5; flex: 1; }
.panel-content { display: flex; align-items: center; gap: 12px; padding: 14px 12px; min-height: 112px; }
.vinyl-icon { width: 57px; height: 57px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: repeating-radial-gradient(circle, #1d2937 0 2px, #303e4e 3px 4px); border: 2px solid #7d8997; box-shadow: 1px 1px #fff; }
.vinyl-icon span { width: 17px; height: 17px; border-radius: 50%; background: #6e9dc5; border: 3px solid #d4dce4; box-shadow: 0 0 0 1px #344e6b; }
.eyebrow { color: #728093; font: 8px 'IBM Plex Mono', monospace; letter-spacing: .08em; margin-bottom: 5px; }
.current-track { font-size: 16px; line-height: 1.15; font-weight: 700; color: #233c5a; overflow-wrap: anywhere; }
.muted { margin-top: 6px; font-size: 11px; color: #6a7684; line-height: 1.35; }
.history-list { padding: 8px 10px 2px; min-height: 87px; }
.history-empty { color: #7a8794; font-size: 11px; font-style: italic; padding: 9px 0; }
.history-item { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px dotted #b3bdc7; font-size: 11px; }
.history-item:last-child { border-bottom: 0; }
.history-time { color: #6b8095; font: 9px 'IBM Plex Mono', monospace; flex: 0 0 auto; }
.history-name { color: #314a65; overflow-wrap: anywhere; }
.panel-note { padding: 6px 10px 8px; border-top: 1px solid #c2cbd4; color: #83909d; font: 8px 'IBM Plex Mono', monospace; letter-spacing: .06em; }

.station-note { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 13px 15px; background: #c4cdd7; border: 1px solid #9aa7b5; box-shadow: inset 1px 1px #fff; }
.note-symbol { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; background: #1a3555; color: #d7e7f7; border: 1px solid #f3f6f8; box-shadow: inset -2px -2px #0c1b2e; font: 700 20px Georgia, serif; }
.station-note h2 { margin: 0 0 4px; font: 700 10px 'IBM Plex Mono', monospace; color: #203b5a; letter-spacing: .035em; }
.station-note p { margin: 0; color: #596879; font-size: 12px; line-height: 1.4; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding: 13px 3px 0; color: #778493; font: 8px 'IBM Plex Mono', monospace; letter-spacing: .04em; }
.footer-status { color: #507454; }
.footer-status i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #67ad6b; margin-right: 4px; }

@media (max-width: 620px) {
  body { padding: 10px 8px 24px; }
  .desktop { padding: 0 10px 12px; }
  .topline { margin-left: -15px; margin-right: -15px; font-size: 8px; }
  .topline-right { display: none; }
  .brand { gap: 10px; }
  .brand-emblem { width: 54px; height: 54px; }
  .brand-emblem svg { width: 42px; height: 42px; }
  .brand-kicker { font-size: 7px; letter-spacing: .1em; }
  h1 { font-size: clamp(31px, 9vw, 43px); }
  .tagline { font-size: 18px; }
  .tagline-sub { font-size: 7px; letter-spacing: .04em; }
  .window-title-meta { display: none; }
  .player-body { padding: 9px; }
  .controls { gap: 9px; }
  .play-button { min-width: 102px; }
  .info-grid { grid-template-columns: 1fr; }
  .panel-content { min-height: 95px; }
  .station-note { align-items: flex-start; padding: 11px; }
  .footer { font-size: 7px; }
}

/* RADIO KEDR: real audio spectrum */
.spectrum {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 60px;
}

/* Журнал эфира: четыре видимые записи, остальное — прокрутка */
.history-list {
  height: 136px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #8295a8 #d2d9e1;
  padding: 8px 10px;
}

.history-list::-webkit-scrollbar {
  width: 8px;
}

.history-list::-webkit-scrollbar-track {
  background: #d2d9e1;
}

.history-list::-webkit-scrollbar-thumb {
  background: #8295a8;
  border: 1px solid #d2d9e1;
}
