:root {
    --bg: #0b0d10;
    --card: rgba(255,255,255,0.06);
    --ring: rgba(255,255,255,0.10);
    --txt: #eef2f6;
    --sub: #a8b3c0;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--txt);
    font: 14px/1.4 -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Inter, Arial, sans-serif;
}

/* Welcome */
.welcome {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 40px 16px;
}

.welcome-card {
    width: min(740px, 92vw);
    background: linear-gradient( to bottom right, rgba(255,255,255,0.08), rgba(255,255,255,0.04) );
    border:1px solid var(--ring);
    border-radius: 20px;
    padding: 32px 28px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.app-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: radial-gradient( circle at 30% 30%, #22334f, #1f0643 );
    font-size: 28px;
    margin-bottom: 12px;
}
h1 {
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    font-size: clamp(28px, 4vw, 40px);
}
.subtitle {
    margin: 0 0 20px;
    color: var(--sub);
    font-size: 16px;
}

.drop-zone {
    position: relative;
    display: grid;
    place-items: center;
    gap: 6px;
    border: 2px dashed var(--ring);
    border-radius: 16px;
    padding: 26px;
    cursor: pointer;
    background: rgba(255,255,255,0.04);
    transition: background 140ms ease, border-color 140ms ease;
}

.drop-zone:hover, .drop-zone.hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(121,184,255,0.65);
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dz-inner {
    text-align: center;
}
.dz-inner strong {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}
.dz-inner span {
    color: var(--sub);
    font-size: 13px;
}
.hint {
    color: var(--sub);
    font-size: 12px;
    margin-top: 12px;
}

/* Dashboard */
.dashboard {
    position: relative;
    min-height: 100dvh;
}

#canvas-container {
    position: absolute;
    inset: 0;
    cursor: none;
}
.cursor-off {
    cursor: crosshair !important; /* Show crosshair when cursor is off */
}

.info-card {
    position: absolute;
    top: 24px;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--card);
    border: 1px solid var(--ring);
    border-radius: 14px;
    padding: 12px 12px;
    backdrop-filter: blur(10px);
}

#left-info-card-top.info-card {
    left: 24px;
}

#left-info-card-bottom.info-card {
    left: 24px;
    top: unset;
    bottom: 24px;
    gap: 4px;
}

#right-info-card.info-card {
    bottom: 24px;
    right: 24px;
}

.info-card .title {
    font-weight: 600;
    margin-bottom: 6px;
}
.info-card .info-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.info-card .info-row:last-child {
    border-bottom: 0;
}
.info-card .k {
    color: var(--sub);
}
.info-card .v {
    color: var(--txt);
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.speed-legend {
    display: flex;
    flex-direction: column;
    gap: 0px;
    position: absolute;
    left: 24px;
    bottom: 116px;
    padding: 16px;
}

.speed-legend .title {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--sub);
}

.cursor-status-indicator {
    position: absolute;
    top: 24px;
    left: 352px;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 8px;
    background: var(--card);
    border: 1px solid var(--ring);
    backdrop-filter: blur(10px);
    pointer-events: none;
    padding: 8px 16px 8px 12px;
    gap: 6px;
}

.cursor-status-indicator svg {
    width: 32px;
    height: 32px;
}

#cursor-off-icon {
    display: none;
}

.cursor-status-msg {
    display: flex;
    flex-direction: column;
}

.cursor-status-msg-subtitle {
    font-size: 12px;
    color: var(--sub);
}

#cursor-plane, #heading-plane {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    transform-origin: 50% 50%;
    will-change: transform;
    z-index: 9;
    transition: all 100ms ease;
}

#cursor-plane {

    /* Strong white halo to pop on dark backgrounds */
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4))
        drop-shadow(0 0 6px rgba(255, 255, 255, 0.3))
        /* Soft ambient shadow for depth */
        drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7));
}

.strobes-control-options {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.strobes-control-options label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px 8px 4px;
    font-weight: 600;
    color: var(--txt);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--ring);
    border-radius: 8px;
    transition: background 140ms ease, border-color 140ms ease;
}

.strobes-control-options label:has(input:checked) {
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.strobes-control-options label:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(121,184,255,0.65);
}

.opt-label-text {
    margin-top: 2px;
}

.strobe {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    left: 2px;
    filter: blur(2px);
}

/* CSS-only toggle for strobes using the #strobes-switch checkbox */
/* Default OFF */
body:has(#strobes-off:checked) .strobe {
  visibility: hidden;
  animation: none;
}

/* Airbus: single rapid blink */
body:has(#strobes-airbus:checked) .strobe {
  visibility: visible;
  animation: strobeDoubleBlink 1.5s infinite;
}

/* Boeing: double rapid blink */
body:has(#strobes-boeing:checked) .strobe {
  visibility: visible;
  animation: strobeSingleBlink 1.2s infinite;
  
}

/* Airbus single blink keyframes */
@keyframes strobeSingleBlink {
  0%   { opacity: 0; }
  8%  { opacity: 1; }
  16%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Boeing double blink (you already have this) */
@keyframes strobeDoubleBlink {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  12%  { opacity: 0; }
  14%  { opacity: 0; }
  20%  { opacity: 1; }
  26%  { opacity: 0; }
  100% { opacity: 0; }
}

#strobe-left {
    background-color: red;
    top: 0px;
    transform: translate(0%, -30%);
}

#strobe-right {
    background-color: rgb(7, 232, 30);
    bottom: 2px;
}

#flight-path-canvas, #flight-speed-canvas {
    pointer-events: none;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255,255,255,0.2);
    background-color: var(--bg);
    border-radius: 8px;
    margin-bottom: 8px;
    z-index: 10;
    position: relative;
}

#flight-speed-canvas {
    height: 140px;
}

#flight-path-canvas svg {
    position: absolute;
    right: 0;
    bottom: 12px;
    width: 24px;
    height: 24px;
    opacity: .5;
}

.hidden {
    display: none;
}

.button {
    position: absolute;
    bottom: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: calc(100% - 24px);
    gap: 8px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--txt);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--ring);
    border-radius: 8px;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
    text-align: center;
}

.button:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(121,184,255,0.65);
}

.button svg {
    /* Icon color matches text color */
    fill: white;
    width: 24px;
}

.button p {
    margin: 0;
}

.speed-key-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    color: var(--sub);
}

.speed-key-row:nth-of-type(1) {
    margin-top: 200px;
}

.color-key {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: red;
    
}