:root {
  color-scheme: dark;
  --bg: #080d1d;
  --panel: #10172d;
  --panel-2: #0c1328;
  --line: #202943;
  --muted: #8d96ad;
  --text: #f3f6ff;
  --teal: #2ea69e;
  --blue: #4e86d9;
  --green: #37c96b;
  --red: #ef5d6c;
  --warning-bg: #281a38;
  --warning-line: #4a2758;
  --warning-text: #ffc8cf;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% -8%, rgba(46, 166, 158, 0.16), transparent 32rem),
    radial-gradient(circle at 105% 18%, rgba(78, 134, 217, 0.15), transparent 26rem),
    var(--bg);
  color: var(--text);
}

.access-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.65);
  z-index: 50;
}

.access-card {
  width: min(100%, 520px);
  padding: 22px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(16, 23, 45, 0.98), rgba(10, 16, 33, 0.98));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.access-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 900;
}

.access-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

button,
select {
  font: inherit;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 12px 18px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-bottom: 12px;
}

.is-hidden-until-access {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
}

.app-guarded {
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    visibility 220ms ease;
}

.title-mark {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 2px solid #d9deef;
  border-radius: 50%;
}

.title-mark span {
  width: 8px;
  height: 8px;
  border: 2px solid #d9deef;
  border-radius: 50%;
}

h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.panel {
  padding: 18px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(16, 23, 45, 0.98), rgba(10, 16, 33, 0.98));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
}

.top-row {
  margin-bottom: 22px;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  color: var(--text);
  background: #121a31;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.globe,
.chevron {
  color: #b9c2d8;
}

.flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
  background: linear-gradient(#fff 0 33%, #2359d7 33% 66%, #f0444b 66%);
}

.field-label {
  display: block;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
  margin-bottom: 18px;
}

.select-wrap::after {
  position: absolute;
  right: 13px;
  top: 50%;
  content: "⌄";
  color: #aab4cc;
  transform: translateY(-54%);
  pointer-events: none;
}

select {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 16px;
  color: var(--text);
  appearance: none;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.expiry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.expiry-card {
  min-height: 70px;
  padding: 12px 8px;
  color: #b4bfd5;
  background: #0c1225;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.expiry-card strong,
.expiry-card span {
  display: block;
}

.expiry-card strong {
  color: #dce3f5;
  font-size: 15px;
  font-weight: 800;
}

.expiry-card span {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
}

.expiry-card.active {
  color: #d9f7f5;
  background: linear-gradient(135deg, rgba(46, 166, 158, 0.35), rgba(78, 134, 217, 0.18));
  border-color: rgba(46, 166, 158, 0.7);
  box-shadow: 0 0 0 1px rgba(46, 166, 158, 0.12), inset 0 0 28px rgba(46, 166, 158, 0.08);
}

.cooldown {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 4px 0 14px;
  padding: 0 14px;
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid var(--warning-line);
  border-radius: 8px;
  font-weight: 800;
}

.clock {
  font-size: 20px;
}

.cooldown strong {
  margin-left: auto;
  white-space: nowrap;
}

.signal-button {
  width: 100%;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 16px;
  color: #e9f8ff;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border: 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(55, 127, 194, 0.18);
}

.signal-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.signal-card {
  padding: 30px 16px 18px;
  text-align: center;
  background: #0b1225;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.signal-card h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 900;
}

.signal-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-box {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 8px;
  margin: 10px 0;
  padding: 12px;
  background: #0d1429;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.result-box strong {
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
}

.result-box strong.buy {
  color: var(--green);
}

.result-box .confidence {
  color: var(--green);
}

time {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 420px) {
  .app-shell {
    padding-inline: 10px;
  }

  .panel {
    padding: 16px 14px 18px;
  }

  .expiry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
