/* ROOT */
:root {
    --bg: #080b0f;
    --panel: #0a0a0a;
    --text: #ffffff;
    --muted: rgba(255,255,255,0.6);
    }

* {
    box-sizing: border-box;
    }

html {
  overflow-y: scroll;
}    

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    }

/* THEMES */
body.classic {
    font-family: "Inter", sans-serif;
    }

/* APP CONTAINER */
.app {
  width: 100%;
  padding: 20px;
}

/* TOPBAR */
.topbar {
  width: 100%;
  max-width: 1680px;
  margin: 60px auto 0 auto;
  padding: 18px 22px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  background: linear-gradient(135deg, #00d5ffa6 0%, #202b31 77%, #0e1218 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  font-size: 34px;
  color: #ffffff;
  opacity: 0.95;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* TITLE */
.title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.flightcount {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 17px;
  min-width: 110px;
  color: rgba(255, 255, 255, 0.68);
}

/* NAV BUTTONS */
.nav-buttons {
  display: flex;
  gap: 10px;
  width: auto;
  max-width: none;
  margin-bottom: 0;
  flex-shrink: 0;
}

.nav-buttons button {
  min-width: 112px;
  height: 36px;
  padding: 0 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.88);

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;

  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 36px;

  align-items: center;
  justify-content: center;

  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;

  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.nav-buttons button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.nav-buttons button:active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(1px);
}

/* BOARD AREA */
.board-area {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 250px;
  padding: 0;
}

body.classic {
    font-size: 18px;
    letter-spacing: 2px;
    }

.loading-spinner {
  width: 64px;
  height: 64px;
  border: 5px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

 /* LEGEND AREA */
.board-legend {
  margin: 10px auto 0 auto;
  padding: 18px 24px;

  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 32px;

  width: 100%;
  max-width: 1680px;

  background: var(--bg);
}

.legend-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 180px;
}

.legend-title {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6f6f6f;
}

.legend-list {
  display: flex;
  flex-direction: column;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 16px;
  color: #cfcfcf;
  letter-spacing: 0.3px;
}

.legend-item i {
  width: 16px;
  text-align: center;
  font-size: 14px;
  color: #8a8a8a;
}

.legend-creator {
  margin-top: 33px;
  padding-top: 6px;
  border-top: none;

  font-size: 14px;
  color: #8a8a8a;

  align-self: flex-end;
}

.legend-copyright {
  padding-top: 6px;
  border-top: none;

  font-size: 14px;
  color: #8a8a8a;

  align-self: flex-end;
}

.legend-column:not(:last-child) {
  border-right: 1px solid #1a1a1a;
  padding-right: 32px;
}

/* JavaScript AREA */
.classic-board-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.classic-header-wrapper {
  overflow-x: hidden;
}

.classic-board {
  font-family: "Geist Mono", monospace;
  letter-spacing: 2px;
  width: 100%;
  min-width: 1680px;
  margin-top: 0;
  background: var(--bg);
}

.classic-board-loading {
  min-width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.classic-board-wrapper:has(.classic-board-loading) {
  overflow-x: hidden;
}

.classic-empty {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--bg);
}

.classic-row,
.classic-header {
  display: grid;
  grid-template-columns:
    15px   /* role */
    315px  /* user */
    30px   /* type */
    190px  /* flightnumber */
    110px  /* dep */
    115px  /* arr */
    130px  /* etd */
    135px  /* eta */
    110px  /* airline */
    110px  /* sim */
    55px   /* dots */
    349px; /* status */
}

.classic-row {
  min-height: 30px;
  padding: 0 8px;
}

.classic-header {
  background: var(--bg);
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 12px;
  min-width: 1680px;
  letter-spacing: 2px;
}

.classic-row:not(.classic-header):nth-child(odd) {
  background: #1d1d1d;
}

.classic-row:not(.classic-header):nth-child(even) {
  background: var(--bg);
}

.classic-row.row-login-user {
  background: #00d5ff1e !important;
}

.classic-row.row-menu {
  color: #8a8a8a;
}

.classic-row.row-menu .flip,
.classic-row.row-menu .classic-cell,
.classic-row.row-menu i {
  color: #6f6f6f !important;
}

.classic-row.row-menu i {
  opacity: 0.8;
}

.classic-row.row-menu .user-betauser,
.classic-row.row-menu .user-developer {
  color: #6f6f6f !important;
}

.classic-cell {
  padding: 6px 8px;
  white-space: nowrap;

  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-group {
  display: flex;
  gap: 1px;
  align-items: center;
  white-space: nowrap;
  perspective: 700px;
}

.flip {
  position: relative;
  width: 18px;
  height: 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    to bottom,
    #141414 0%,
    #101010 49%,
    #0d0d0d 50%,
    #111111 100%
  );

  border: 1px solid #232323;
  color: inherit;

  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  user-select: none;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 -1px 0 rgba(0,0,0,0.45);

  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.flip.animate {
  animation: flapFlip 0.65s cubic-bezier(0.25, 0.9, 0.3, 1);
}

@keyframes flapFlip {
  0% {
    transform: rotateX(0deg);
  }

  30% {
    transform: rotateX(-95deg);
  }

  55% {
    transform: rotateX(18deg);
  }

  75% {
    transform: rotateX(-6deg);
  }

  100% {
    transform: rotateX(0deg);
  }
}

.flip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(255,255,255,0.08);
  transform: translateY(-0.5px);
  pointer-events: none;
}

.info-low {
  color: #8a8a8a;
}

.user-normal,
.user-betauser,
.user-developer {
  color: inherit;
}

.role-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.role-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #8a8a8a;
}

.role-icon i {
  font-size: 14px;
  line-height: 1;
}

.status-boarding {
  color: #25c25a;
}

.status-moving {
  color: #ffe97d;
}

.status-inflight {
  color: #ffffff;
}

.status-arriving {
  color: #25c25a;
}

.status-unknown {
  color: #8a8a8a;
}

.status-delay {
  color: #ffb17d;
}

.status-attention {
  color: #ff7d7d;
}

.dots-cell {
  justify-content: flex-end;
}

.classic-cell[data-status-cell="true"] {
  justify-content: flex-start;
  padding-left: 4px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0.25;
}

.dot.active {
  background: #25c25a;
  box-shadow:
    0 0 8px rgba(37, 194, 90, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.25);
  animation: blink 1.2s infinite;
    opacity: 1;
}

.dot.active:nth-child(2) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%   { opacity: 0.2; }
  50%  { opacity: 1; }
  100% { opacity: 0.2; }
}

.flighttype-icon-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.flighttype-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
}

.flighttype-icon i {
  font-size: 20px;
  color: #8a8a8a;
  line-height: 1;
}

.board-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

/* MEDIA */
@media (max-width: 768px) {
  .app {
    padding: 12px;
  }

  .title {
    font-size: 22px;
  }
  
  .topbar {
    position: relative;
    align-items: center;
    gap: 14px;
    padding: 16px;
  }

  .brand {
    flex: 1;
  }

  .menu-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .nav-buttons {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;

    display: none;
    flex-direction: column;
    gap: 8px;

    width: 180px;
    padding: 10px;

    background: #0e1218;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  }

  .nav-buttons.is-open {
    display: flex;
  }

  .nav-buttons button {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
    font-size: 12px;
  }

  .board-legend {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 16px;
  }

  .legend-column {
    min-width: 0;
  }

  .legend-column:not(:last-child) {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 18px;
  }
}