@import "./zyron-tokens.css";
@import "./zyron-chrome.css";

:root {
  --zy-og-opacity: 0.5;
  --zy-og-blur: 16px;
}

.og-bg {
  background: #000 url("/assets/og.png") center / cover no-repeat !important;
  filter: blur(var(--zy-og-blur));
  opacity: var(--zy-og-opacity);
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 18px 48px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

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

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  background: var(--zy-title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand span {
  color: var(--zy-muted);
  font-size: 0.85rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav button {
  border: 1px solid var(--zy-line);
  background: rgba(6, 12, 22, 0.55);
  color: var(--zy-text);
  border-radius: var(--zy-radius-pill);
  padding: 7px 14px;
  font-size: 0.88rem;
}

.nav button.active,
.nav button:hover {
  border-color: var(--zy-ice);
  color: var(--zy-ice);
  box-shadow: 0 0 0 1px rgba(126, 200, 255, 0.25);
}

.card,
.tile {
  background: var(--zy-panel);
  border: 1px solid var(--zy-line);
  border-radius: var(--zy-radius-tile);
  padding: 16px 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
}

.card h2,
.card h3,
.tile h2 {
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--zy-muted);
}

.btn,
.pill {
  border: 1px solid var(--zy-line);
  background: rgba(126, 200, 255, 0.08);
  color: var(--zy-text);
  border-radius: var(--zy-radius-pill);
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn.primary,
.pill.primary {
  background: linear-gradient(180deg, rgba(126, 200, 255, 0.35), rgba(58, 160, 255, 0.22));
  border-color: var(--zy-ice);
  color: #f2f7ff;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.login-wrap,
.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.landing-inner {
  width: min(720px, 100%);
  text-align: center;
}

.landing-logo {
  width: min(180px, 42vw);
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 0 24px rgba(126, 200, 255, 0.35));
}

.landing h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.12em;
  background: var(--zy-title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing .tag {
  color: var(--zy-ice);
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.landing-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.login-card {
  width: min(400px, 100%);
}

.login-card label {
  display: block;
  margin: 10px 0 4px;
  color: var(--zy-muted);
  font-size: 0.85rem;
}

.login-card input,
.field input,
.field select,
textarea {
  width: 100%;
  border: 1px solid var(--zy-line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--zy-text);
  border-radius: 8px;
  padding: 10px 12px;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(126, 200, 255, 0.15);
  padding: 8px 6px;
  text-align: left;
}

.badge {
  display: inline-block;
  border: 1px solid var(--zy-line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--zy-muted);
}

.badge.ok {
  color: var(--zy-ok);
  border-color: rgba(34, 197, 94, 0.5);
}

.badge.bad {
  color: var(--zy-danger);
  border-color: rgba(255, 77, 90, 0.5);
}

.exam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--zy-line);
  border-radius: var(--zy-radius-tile);
  background: var(--zy-panel);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.timer {
  font-variant-numeric: tabular-nums;
  color: var(--zy-ice);
  font-size: 1.25rem;
}

.q {
  border: 1px solid rgba(126, 200, 255, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(6, 12, 22, 0.55);
}

.q .n {
  color: var(--zy-ice);
  font-size: 0.8rem;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.opts {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.opt {
  display: block;
  border: 1px solid rgba(126, 200, 255, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.opt.selected {
  border-color: var(--zy-ice);
  background: rgba(126, 200, 255, 0.12);
}

.opt.ok {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.1);
}

.opt.bad {
  border-color: rgba(255, 77, 90, 0.55);
  background: rgba(255, 77, 90, 0.1);
}

.orig-letter {
  color: var(--zy-muted);
  font-size: 0.85em;
}

.msg {
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0;
  max-width: 90%;
  white-space: pre-wrap;
}

.msg.user {
  margin-left: auto;
  background: rgba(126, 200, 255, 0.15);
  border: 1px solid var(--zy-line);
}

.msg.bot {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(126, 200, 255, 0.12);
}

.chat-log {
  max-height: 420px;
  overflow: auto;
  margin-bottom: 10px;
}

.pin {
  color: var(--zy-ice);
  letter-spacing: 0.12em;
}

code {
  color: var(--zy-ice);
}

@media (max-width: 640px) {
  .exam-meta {
    position: static;
  }
}

/* —— Temario visual —— */
.temario-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.temario-kicker {
  margin: 0 0 4px;
  color: var(--zy-ice);
  letter-spacing: 0.22em;
  font-size: 0.72rem;
}

.temario-stat {
  min-width: 88px;
  text-align: center;
  padding: 12px 14px;
  border: 1px solid var(--zy-line);
  border-radius: 12px;
  background: rgba(126, 200, 255, 0.08);
}

.temario-stat strong {
  display: block;
  font-size: 1.8rem;
  color: var(--zy-ice);
  line-height: 1;
}

.temario-stat span {
  color: var(--zy-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.temario-tools {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.temario-tools input {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--zy-line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--zy-text);
  border-radius: 999px;
  padding: 10px 14px;
}

.temario-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: start;
}

.temario-rail {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 12px !important;
}

.temario-rail-title {
  margin: 0 0 8px;
  color: var(--zy-muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.temario-rail button {
  display: flex;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--zy-text);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 4px;
  font-size: 0.82rem;
}

.temario-rail button span {
  color: var(--zy-ice);
  font-variant-numeric: tabular-nums;
  min-width: 1.4em;
}

.temario-rail button:hover,
.temario-rail button.active {
  border-color: var(--zy-line);
  background: rgba(126, 200, 255, 0.1);
}

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

.temario-tile {
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 16px;
  border-radius: var(--zy-radius-tile);
  border: 1px solid var(--zy-line);
  background:
    linear-gradient(160deg, rgba(126, 200, 255, 0.12), transparent 42%),
    var(--zy-panel);
  color: var(--zy-text);
  min-height: 168px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.temario-tile:hover {
  border-color: var(--zy-ice);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(126, 200, 255, 0.15);
}

.temario-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--zy-ice);
  color: var(--zy-ice);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 16px rgba(126, 200, 255, 0.25);
}

.temario-tile strong {
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.temario-meta {
  margin-top: auto;
  color: var(--zy-ice);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.temario-detail-head {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.temario-detail-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.temario-detail-title h3 {
  margin: 0 0 6px;
}

.temario-ico {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--zy-ice);
  color: var(--zy-ice);
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(126, 200, 255, 0.1);
}

.temario-sec {
  border: 1px solid rgba(126, 200, 255, 0.18);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.temario-sec h4 {
  margin: 0 0 10px;
  letter-spacing: 0.04em;
  color: var(--zy-ice);
  font-size: 0.95rem;
}

.temario-sec p {
  margin: 0 0 10px;
  line-height: 1.55;
  color: var(--zy-text);
}

.temario-sec ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 6px;
}

.temario-sec li {
  line-height: 1.45;
}

.temario-sec.tone-goal {
  border-color: rgba(126, 200, 255, 0.45);
}

.temario-sec.tone-key {
  background: linear-gradient(90deg, rgba(126, 200, 255, 0.1), rgba(0, 0, 0, 0.28));
}

.temario-sec.tone-do {
  border-left: 3px solid var(--zy-ice-2);
}

.temario-sec.tone-warn {
  border-left: 3px solid var(--zy-danger);
}

.temario-sec.tone-check {
  border-left: 3px solid var(--zy-ok);
  background: rgba(34, 197, 94, 0.06);
}

@media (max-width: 860px) {
  .temario-layout {
    grid-template-columns: 1fr;
  }
  .temario-rail {
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .temario-rail-title {
    width: 100%;
  }
  .temario-rail button {
    width: auto;
    margin: 0;
  }
}
