/* Gailany TV Board — dark brand plate (mirrors gailanyweb .board-screen) */

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #150d08;
  color: #f3ebdd;
  -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.board-screen {
  --board-bg: #150d08;
  --board-bg-2: #201509;
  --board-line: rgba(212, 166, 76, 0.32);
  --board-brass: #e8c273;
  --board-cream: #f3ebdd;
  --board-taupe: #b8a891;
  --board-buy: #6fd8a3;
  --board-sell: #f08b72;
  --board-buy-tv: #6fdba3;
  --board-sell-tv: #de7038;
  --board-amber: #f0b429;
  --board-glow: rgba(232, 194, 115, 0.14);
  --board-scrim: rgba(0, 0, 0, 0.35);
  --board-marquee-bg: rgba(0, 0, 0, 0.28);
  --board-stale-r: 240;
  --board-stale-g: 139;
  --board-stale-b: 114;

  --font-mono: "IBM Plex Mono", "Courier New", Courier, monospace;
  --font-sans: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-kurdish: "IBM Plex Sans Arabic", "Tahoma", sans-serif;
  --font-arabic: "Noto Kufi Arabic", "Tahoma", sans-serif;

  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--board-bg);
  color: var(--board-cream);
  font-family: var(--font-mono);
  direction: ltr;
}

.board-bg {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: radial-gradient(
    120% 100% at 15% 0%,
    var(--board-bg-2),
    var(--board-bg) 60%
  );
}

.board-shift {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.board-shift--animated {
  -webkit-animation: board-shift 300s linear infinite;
  animation: board-shift 300s linear infinite;
}

@-webkit-keyframes board-shift {
  0%,
  100% {
    -webkit-transform: translate(0, 0);
    transform: translate(0, 0);
  }
  25% {
    -webkit-transform: translate(2px, -2px);
    transform: translate(2px, -2px);
  }
  50% {
    -webkit-transform: translate(-2px, 2px);
    transform: translate(-2px, 2px);
  }
  75% {
    -webkit-transform: translate(2px, 2px);
    transform: translate(2px, 2px);
  }
}

@keyframes board-shift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(2px, -2px);
  }
  50% {
    transform: translate(-2px, 2px);
  }
  75% {
    transform: translate(2px, 2px);
  }
}

.board-inner {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 3.2vh 3.5vw calc(7.1vh + 1.4vh);
}

/* —— Header —— */
.board-header {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.gx-logo {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  text-decoration: none;
  color: inherit;
  -webkit-transform: scale(1.35);
  transform: scale(1.35);
  -webkit-transform-origin: left center;
  transform-origin: left center;
}

.gx-logo__emblem {
  width: 52px;
  height: 52px;
  margin-right: 12px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.gx-logo__emblem--spin {
  -webkit-animation: spin-slow 10s linear infinite;
  animation: spin-slow 10s linear infinite;
}

@-webkit-keyframes spin-slow {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gx-logo__emblem--spin,
  .board-shift--animated,
  .board-marquee-track--running,
  .board-live-dot,
  .board-screen--stale {
    -webkit-animation: none !important;
    animation: none !important;
  }
}

.gx-logo__text {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  line-height: 1;
  font-family: var(--font-sans);
}

.gx-logo__name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--board-cream);
}

.gx-logo__tag {
  margin-top: 0.35em;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--board-taupe);
}

.board-clock {
  text-align: right;
  line-height: 1.15;
}

.board-clock__time {
  font-size: clamp(1.05rem, 1.6vw, 1.85rem);
  font-weight: 500;
  color: var(--board-cream);
  font-variant-numeric: tabular-nums;
}

.board-clock__date {
  font-size: clamp(0.65rem, 0.9vw, 0.95rem);
  color: var(--board-taupe);
}

/* —— Body —— */
.board-body {
  margin-top: 2vh;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: stretch;
  -webkit-align-items: stretch;
  align-items: stretch;
}

.board-body--center {
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.board-grid {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  width: 100%;
  min-height: 0;
  height: 100%;
  gap: 3vw;
}

.board-grid--dual .board-column {
  width: 50%;
  min-width: 0;
}

.board-grid--single .board-column {
  width: 100%;
  max-width: min(920px, 100%);
  margin: 0 auto;
}

.board-grid--single.board-grid--stretch .board-column {
  max-width: none;
}

.board-column {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.board-col-head {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  padding-bottom: 0.85vh;
  font-size: clamp(0.7rem, 1.05vw, 1.05rem);
  letter-spacing: 0.08em;
  color: var(--board-taupe);
  border-bottom: 1px solid var(--board-line);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.board-col-head > span,
.board-row > .board-cell {
  min-width: 0;
}

.board-col-head > span:first-child,
.board-row > .board-cell:first-child {
  -webkit-box-flex: 1.35;
  -webkit-flex: 1.35 1 0%;
  flex: 1.35 1 0%;
}

.board-col-head > span:nth-child(2),
.board-col-head > span:nth-child(3),
.board-row > .board-cell:nth-child(2),
.board-row > .board-cell:nth-child(3) {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
  flex: 1 1 0%;
  text-align: right;
}

.tri-dot {
  margin: 0 0.2em;
  color: var(--board-brass);
  opacity: 0.7;
}

.tri-ku {
  font-family: var(--font-kurdish);
  direction: rtl;
  unicode-bidi: embed;
}

.tri-ar {
  font-family: var(--font-arabic);
  direction: rtl;
  unicode-bidi: embed;
}

.board-rows {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
}

.board-rows--stretch .board-row {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
  flex: 1 1 0%;
}

.board-rows--auto .board-row {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  min-height: 3.25rem;
}

.board-row {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  overflow: hidden;
  padding: 0.35vh 0;
  border-bottom: 1px solid var(--board-line);
}

.board-row-pulse {
  position: absolute;
  left: -1vw;
  right: -1vw;
  top: 0;
  bottom: 0;
  pointer-events: none;
  background: var(--board-glow);
  border-radius: 6px;
  -webkit-animation: board-row-pulse 1.3s ease-out forwards;
  animation: board-row-pulse 1.3s ease-out forwards;
}

@-webkit-keyframes board-row-pulse {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes board-row-pulse {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.board-cell--code {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.currency-flag {
  display: block;
  margin-right: 0.75vw;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  border-radius: 2px;
}

.currency-mark--fallback {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  margin-right: 0.75vw;
  padding: 0 4px;
  border: 1px solid var(--board-line);
  border-radius: 3px;
  color: var(--board-taupe);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.board-code {
  font-weight: 500;
  color: var(--board-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}

.board-value {
  position: relative;
  z-index: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.board-value--buy {
  color: var(--board-sell-tv);
}

.board-value--sell {
  color: var(--board-buy-tv);
}

.board-empty {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  min-height: 40vh;
  color: var(--board-taupe);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.board-retry {
  margin-top: 1rem;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--board-line);
  border-radius: 999px;
  background: transparent;
  color: var(--board-brass);
  padding: 0.4rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

/* —— Footer —— */
.board-footer {
  margin-top: 1.4vh;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  font-size: clamp(0.65rem, 0.85vw, 1rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--board-taupe);
}

.board-footer__iqd {
  color: var(--board-brass);
}

.board-status {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.board-status__dot {
  width: 0.6vw;
  height: 0.6vw;
  min-width: 6px;
  min-height: 6px;
  margin-right: 0.6vw;
  border-radius: 50%;
}

.board-status--live {
  color: var(--board-buy);
}

.board-status--live .board-status__dot {
  background: var(--board-buy);
}

.board-status--reconnecting {
  color: var(--board-amber);
}

.board-status--reconnecting .board-status__dot {
  background: var(--board-amber);
}

.board-status--stale {
  color: var(--board-sell);
  font-weight: 600;
  font-size: clamp(0.75rem, 1vw, 1.15rem);
}

.board-status--stale .board-status__dot {
  background: var(--board-sell);
  width: 0.7vw;
  height: 0.7vw;
}

.board-live-dot {
  -webkit-animation: board-live-pulse 2s ease-out infinite;
  animation: board-live-pulse 2s ease-out infinite;
}

@-webkit-keyframes board-live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 216, 163, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(111, 216, 163, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 216, 163, 0);
  }
}

@keyframes board-live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 216, 163, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(111, 216, 163, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 216, 163, 0);
  }
}

.board-screen--stale {
  -webkit-animation: board-stale-alert 2s ease-in-out infinite;
  animation: board-stale-alert 2s ease-in-out infinite;
}

@-webkit-keyframes board-stale-alert {
  0%,
  100% {
    box-shadow: inset 0 0 0 3px rgba(240, 139, 114, 0.15);
  }
  50% {
    box-shadow: inset 0 0 0 3px rgba(240, 139, 114, 0.55);
  }
}

@keyframes board-stale-alert {
  0%,
  100% {
    box-shadow: inset 0 0 0 3px rgba(240, 139, 114, 0.15);
  }
  50% {
    box-shadow: inset 0 0 0 3px rgba(240, 139, 114, 0.55);
  }
}

/* —— Marquee —— */
.board-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.6vh;
  z-index: 2;
  height: 5.5vh;
  overflow: hidden;
  background: var(--board-marquee-bg);
  border-top: 1px solid var(--board-line);
  border-bottom: 1px solid var(--board-line);
}

.board-marquee-track {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  will-change: transform;
}

.board-marquee-track--running {
  -webkit-animation: board-marquee linear infinite;
  animation: board-marquee linear infinite;
}

@-webkit-keyframes board-marquee {
  from {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
  to {
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }
}

@keyframes board-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.board-marquee-item {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 0 1.8vw;
}

.board-marquee-mark {
  height: 3.6vh;
  width: auto;
  max-width: 12vw;
  object-fit: contain;
  -webkit-filter: brightness(1.22) saturate(1.08);
  filter: brightness(1.22) saturate(1.08);
}

.board-marquee-atm {
  font-family: var(--font-sans);
  font-size: 1.6vh;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--board-brass);
  text-transform: uppercase;
}

.board-marquee-coin {
  width: 2.2vh;
  height: 2.2vh;
  margin: 0 0.4vw;
  opacity: 0.55;
}

/* —— Home pill —— */
.board-home {
  position: absolute;
  left: 50%;
  bottom: calc(7.1vh + 1.4vh);
  z-index: 3;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--board-line);
  border-radius: 999px;
  background: var(--board-scrim);
  color: var(--board-cream);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  opacity: 1;
  -webkit-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
}

.board-home.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.board-home svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

@media (orientation: portrait) {
  .gx-logo {
    -webkit-transform: scale(1.15);
    transform: scale(1.15);
  }

  .board-grid--dual {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 1.2vh;
  }

  .board-grid--dual .board-column {
    width: 100%;
    height: 50%;
  }
}
