
:root {
  --bg: #0b1118;
  --bg-secondary: #111a24;
  --card: #16212d;
  --border: #263544;
  --text: #f2f5f7;
  --muted: #9aa9b7;
  --accent: #39b86a;
  --accent-blue: #4aa3ff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
.container { width: min(1400px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
    background: #070d14;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo { font-size: 20px; font-weight: 700; }
.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}
.main-nav a:hover { color: var(--text); }

.hero { padding: 42px 0 28px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 46px); line-height: 1.1; }
.hero-description { max-width: 850px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }

.live-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }

.stat-card {
    min-height: 68px;
    padding: 8px 16px;

    background: rgba(16, 26, 35, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;

    justify-content: center;
    align-items: flex-start;
}

.stat-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    height: auto;
    margin: 0;
    font-size: 20px;
    line-height: 1;
}

.stat-value {
    font-size: 27px;
    line-height: 1;
    font-weight: 700;
}

.stat-label {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.15;
}

section { padding: 28px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-header h2 { margin: 0; font-size: 24px; }

.radar-wrapper { overflow: hidden; height: 680px; border: 1px solid var(--border); border-radius: 12px; background: #05090d; }
.radar-wrapper iframe { display: block; width: 100%; height: 100%; border: 0; }

.radar-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #7f8c95;
    white-space: nowrap;
}

.radar-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #7f8c95;
    box-shadow: 0 0 0 3px rgba(127, 140, 149, 0.12);
}

.radar-status.online {
    color: #56d79e;
}

.radar-status.online .radar-status-dot {
    background: #56d79e;
    box-shadow: 0 0 0 3px rgba(86, 215, 158, 0.12);
}

.radar-status.offline {
    color: #ff6565;
}

.radar-status.offline .radar-status-dot {
    background: #ff6565;
    box-shadow: 0 0 0 3px rgba(255, 101, 101, 0.12);
}

.aircraft-list { display: grid; gap: 8px; }
.callsign { font-weight: 700; }
.aircraft-type { color: var(--muted); }
.route { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aircraft-value { text-align: right; }
.aircraft-status { font-size: 13px; color: var(--muted); }

.airport-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.airport-card {
  display: flex; flex-direction: column; gap: 7px; padding: 22px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
}
.airport-card:hover { border-color: var(--accent-blue); }
.airport-icon { font-size: 28px; }
.airport-card strong { font-size: 18px; }
.airport-card span:last-child { color: var(--muted); }
.airport-card--arrival .airport-icon {
    color: #ff9b55;
}

.airport-card--departure .airport-icon {
    color: #55d98b;
}

.airport-card--radar .airport-icon {
    color: #74c7ff;
}

.seo-section { padding-bottom: 60px; }
.seo-section p { max-width: 900px; color: var(--muted); font-size: 16px; line-height: 1.7; }

.site-footer { padding: 30px 0; border-top: 1px solid var(--border); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.site-footer nav { display: flex; gap: 18px; }

.loading { padding: 24px; text-align: center; color: var(--muted); }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .live-stats { grid-template-columns: repeat(2, 1fr); }
  .radar-wrapper { height: 600px; }
  .aircraft-card { grid-template-columns: 1fr 1fr; }
  .aircraft-value { text-align: left; }
  .airport-actions { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { width: min(100% - 20px, 1400px); }
  .hero { padding-top: 28px; }
  .live-stats { gap: 8px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 25px; }
  .radar-wrapper { height: 520px; }
  .aircraft-card { grid-template-columns: 1fr; }
  .route { white-space: normal; }
  .footer-inner { flex-direction: column; }
}


.aircraft-list {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}


/* =========================================================
   AIRCRAFT CARDS
   ========================================================= */

.aircraft-card {
    display: block;
    width: 100%;
    box-sizing: border-box;

    background: #151a21;
    color: #e8edf3;

    border: 1px solid #2b333d;
    border-left: 4px solid #64748b;
    border-radius: 8px;

    padding: 10px 12px;
    margin: 0 0 8px 0;
}



/* Заголовок */

.aircraft-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    box-sizing: border-box;

    margin: 0 0 6px 0;
}

.aircraft-card-header strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.aircraft-card-header span {
    color: #aeb9c6;
    font-size: 12px;
}



/* Высота / скорость */

.aircraft-card-data {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px 18px;

    width: 100%;
    box-sizing: border-box;

    color: #aeb9c6;
    font-size: 12px;
}

.aircraft-card-data span {
    color: #aeb9c6;
}

.aircraft-card-data b {
    color: #f1f5f9;
    font-weight: 600;
}


/* Hover */

.aircraft-card:hover {
    background: #1c232c;
}


/* Пустой список */

#aircraftList .loading {
    display: block;
    width: 100%;
    box-sizing: border-box;

    background: #151a21;
    color: #aeb9c6;

    border: 1px solid #2b333d;
    border-radius: 8px;

    padding: 15px;
    text-align: center;
}
/* =========================================================
   STATUS COLORS — Radar 78
   Синхронизировано с динамической картой
   ========================================================= */

/* ▼ Снижение / на подходе */
.aircraft-card.aircraft-arrival {
    border-left-color: #ff9b55;
}

.aircraft-card.aircraft-arrival .aircraft-status {
    color: #ff9b55;
}


/* ▲ Набор высоты / вылетает */
.aircraft-card.aircraft-departure {
    border-left-color: #55d98b;
}

.aircraft-card.aircraft-departure .aircraft-status {
    color: #55d98b;
}


/* → Горизонтальный полёт / пролёт */
.aircraft-card.aircraft-overflight {
    border-left-color: #74c7ff;
}

.aircraft-card.aircraft-overflight .aircraft-status {
    color: #74c7ff;
}


/* ■ На земле */
.aircraft-card.aircraft-ground {
    border-left-color: #7f8c95;
}

.aircraft-card.aircraft-ground .aircraft-status {
    color: #7f8c95;
}

.route-full {
    display: block;
    margin-top: 3px;

    color: #8f9cab;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
}

.aircraft-card .aircraft-airline {
    display: block;
    margin: 1px 0;
    padding: 0;

    color: #aeb9c6;
    font-size: 13px;
    line-height: 14px;
    font-weight: 500;
}

.metar-card {
    margin: 14px 0 18px;
    padding: 12px;
    background: rgba(20, 25, 32, 0.94);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    color: #fff;
}

.metar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.metar-title {
    color: #f1f5f9;
}

.metar-subtitle {
    color: #8f9cab;
}
.metar-category {
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 11px;
}

.metar-category span {
    margin-left: 3px;
    opacity: 0.6;
}

.metar-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.metar-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 9px;
}

.metar-stat-icon {
    font-size: 17px;
}

.metar-stat-label {
    margin-bottom: 1px;
    font-size: 10px;
    opacity: 0.55;
}

.metar-stat-value {
    font-size: 13px;
    font-weight: 600;
}

.metar-extra {
    margin-top: 8px;
    padding: 7px 10px;

    background: rgba(255,255,255,0.035);
    border-radius: 8px;

    font-size: 11px;
    line-height: 1.35;
    opacity: 0.8;
}

.metar-raw {
    margin-top: 8px;
    padding: 7px 10px;

    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.metar-raw-title {
    display: inline;
    margin: 0 8px 0 0;

    font-size: 9px;
    font-weight: 700;
    opacity: 0.45;
}

.metar-raw-text {
    display: inline;

    overflow-wrap: anywhere;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;

    font-size: 10px;
    line-height: 1.35;
    opacity: 0.82;
}

.metar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    margin-top: 7px;

    font-size: 9px;
    opacity: 0.4;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .metar-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .metar-header {
        flex-direction: column;
    }

    .metar-footer {
        gap: 5px;
        flex-direction: column;
    }
}
.metar-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    flex-shrink: 0;

    padding: 6px 9px;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 600;

    border: 1px solid rgba(255,255,255,.08);
}

.metar-category-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: currentColor;
}

.metar-category-code {
    margin-left: 2px;
    opacity: .65;
}

.metar-category.metar-vfr {
    color: #22c55e;
    background: rgba(34, 197, 94, .10);
    border-color: rgba(34, 197, 94, .28);
}

.metar-category.metar-mvfr {
    color: #eab308;
    background: rgba(234, 179, 8, .10);
    border-color: rgba(234, 179, 8, .28);
}

.metar-category.metar-ifr {
    color: #ef4444;
    background: rgba(239, 68, 68, .10);
    border-color: rgba(239, 68, 68, .28);
}

.metar-category.metar-lifr {
    color: #a16207;
    background: rgba(161, 98, 7, .12);
    border-color: rgba(161, 98, 7, .32);
}

.metar-category.metar-unknown {
    color: #94a3b8;
    background: rgba(148,163,184,.08);
    border-color: rgba(148,163,184,.18);
}

.metar-flight-condition {
    display: flex;
    align-items: center;
    gap: 5px;
}

.metar-condition-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: currentColor;
}

.metar-condition-text {
    opacity: .7;
    font-weight: 500;
}

.radar-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.radar-map-frame {
    display: block;

    width: 100%;
    height: 700px;

    border: 0;
}

.metar-card.metar-vfr {
    border-color: rgba(34, 197, 94, .38);
}

.metar-card.metar-mvfr {
    border-color: rgba(234, 179, 8, .38);
}

.metar-card.metar-ifr {
    border-color: rgba(239, 68, 68, .42);
}

.metar-card.metar-lifr {
    border-color: rgba(161, 98, 7, .46);
}

.metar-card.metar-unknown {
    border-color: rgba(148,163,184,.28);
}

.metar-weather {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 12px;
    padding: 10px 12px;

    border-radius: 9px;

    background: rgba(255,255,255,.05);

    font-size: 13px;
    line-height: 1.4;
}

.metar-weather-icon {
    flex-shrink: 0;
    font-size: 18px;
}

.metar-weather strong {
    font-weight: 600;
}

/* мобильная версия */

@media (max-width: 650px) {

    .radar-map-frame {
        height: calc(100dvh - 170px);
        min-height: 430px;
        max-height: 560px;
    }
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-image {
    display: block;
    width: auto;
    height: 48px;
}

.live-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.65);
}

@media (max-width: 768px) {
    .logo-image {
        height: 38px;
    }

    .header-inner {
        min-height: 56px;
    }

    .main-nav {
        gap: 14px;
    }
}

.stat-card--aircraft .stat-icon {
    color: #74c7ff;
}

.stat-card--arrival .stat-icon {
    color: #ff9b55;
}

.stat-card--departure .stat-icon {
    color: #55d98b;
}

.stat-card--overflight .stat-icon {
    color: #74c7ff;
}

.stat-card--ground .stat-icon {
    color: #7f8c95;
}
.radar-section {
    padding: 28px 0 0;
}

.radar-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.radar-section .section-header h2 {
    margin: 0;
}

.restrictions-section {
    padding: 10px 0 0;
}

.metar-section {
    padding: 10px 0 0;
}

.aircraft-section {
    padding: 28px 0 0;
}

.audio-section {
     margin: 10px 0 0;
}

.audio-card {
    padding: 18px 20px;

    background: #111827;
    border: 1px solid #334155;
    border-radius: 12px;
}

.audio-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.audio-title {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.audio-subtitle {
    margin-top: 4px;

    color: #94a3b8;
    font-size: 13px;
}

.audio-status {
    flex-shrink: 0;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}

.audio-status.online {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.audio-status.connecting {
    color: #facc15;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.35);
}

.audio-status.offline {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.audio-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin-top: 18px;
}

.audio-play-btn {
    min-width: 160px;

    padding: 10px 16px;

    color: #fff;
    background: #2563eb;

    border: 0;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.audio-play-btn:hover {
    background: #1d4ed8;
}

.audio-play-btn:active {
    transform: scale(0.98);
}

.audio-play-btn.playing {
    background: #dc2626;
}

.audio-play-btn.playing:hover {
    background: #b91c1c;
}

.audio-volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-volume {
    width: 150px;
}

@media (max-width: 600px) {

    .audio-top {
        align-items: center;
    }

    .audio-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .audio-play-btn {
        width: 100%;
    }

    .audio-volume-wrap {
        justify-content: center;
    }

    .audio-volume {
        flex: 1;
        width: auto;
    }
}

.restrictions-history {
  padding: 24px 0;
}

.restrictions-history h2 {
  margin: 0 0 16px;
}

.restrictions-history-item {
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

.restrictions-history-date {
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 16px;
}

.restrictions-history-text {
  font-size: 15px;
  line-height: 1.5;
}

.restrictions-history-links {
  margin-top: 8px;
  font-size: 14px;
}

.restrictions-history-links a {
  text-decoration: none;
}

.restrictions-history-links a:hover {
  text-decoration: underline;
}

.restrictions-history-item:last-child {
  margin-bottom: 0;
}

.airport-card--restrictions .airport-icon {
  color: #f59e0b;
}