/* APOGEE plus — ساخته شده توسط مبین.آ */
html[data-theme="oled"] {
  --bg: #000000;
  --panel: rgba(14, 14, 16, 0.82);
  --stroke: rgba(255,255,255,0.08);
}
html[data-theme="ice"] {
  --bg: #061018;
  --panel: rgba(8, 22, 32, 0.72);
  --flame: #38bdf8;
  --flame-2: #7dd3fc;
  --ice: #99f6e4;
}
html[data-theme="ember"] {
  --bg: #140806;
  --panel: rgba(32, 14, 10, 0.74);
  --flame: #ff6b3d;
  --flame-2: #fdba74;
  --ice: #fb923c;
}

.icon-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--stroke); border-radius: 12px;
  background: var(--panel); color: var(--text);
  display: grid; place-items: center;
}
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn.on { border-color: var(--ice); color: var(--ice); }
.fav-btn.on { color: var(--flame); border-color: var(--flame); }

.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(93,255,178,0.28);
  background: rgba(93,255,178,0.08);
  color: var(--text);
  border-radius: 999px; padding: 5px 10px;
  font-size: 11px; font-weight: 800;
  pointer-events: none; user-select: none;
}
.live-pill b {
  font-family: var(--mono); color: var(--go);
  font-variant-numeric: tabular-nums;
  min-width: 5.8em; text-align: center; font-weight: 600;
}
.live-pill .pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--go); box-shadow: 0 0 8px var(--go);
  animation: led 1.2s ease-in-out infinite;
}
@keyframes led { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.ticker {
  position: absolute; z-index: 5;
  top: 68px; inset-inline: 16px;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  backdrop-filter: blur(16px);
  overflow: hidden;
  pointer-events: auto;
}
.ticker[hidden] { display: none; }
.ticker-k {
  flex: 0 0 auto;
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em;
  color: var(--flame-2); text-transform: uppercase;
}
.ticker-track {
  flex: 1; min-width: 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-row {
  display: inline-flex; gap: 28px; white-space: nowrap;
  animation: ticker 48s linear infinite;
}
.ticker-row a {
  color: var(--text); text-decoration: none; font-size: 12px; font-weight: 600;
}
.ticker-row a:hover { color: var(--ice); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html[dir="rtl"] .ticker-row { animation-name: ticker-rtl; }
@keyframes ticker-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

.wx-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.wx-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
  border-radius: 12px; padding: 8px;
  text-align: center;
}
.wx-cell .k { display: block; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.wx-cell .v { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--ice); }
.wx-cell .s { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.kp-bar {
  height: 6px; border-radius: 99px; margin-top: 10px;
  background: rgba(255,255,255,0.06); overflow: hidden;
}
.kp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--go), var(--hold), var(--fail)); }

.moon-row, .pass-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
}
.moon-face {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, #fff6d6, #c4b48a 55%, #2a2618);
  box-shadow: inset -8px 0 0 rgba(7,8,11,0.55), 0 0 16px rgba(255,204,102,0.2);
}
.pass-row {
  background: rgba(138,215,255,0.05);
  border: 1px solid var(--stroke);
  border-radius: 12px; padding: 8px 10px;
}
.pass-row b { font-family: var(--mono); color: var(--ice); }
.pass-row span { display: block; font-size: 11px; color: var(--muted); }

.apod-hit {
  width: 100%; border: 0; background: none; color: inherit; text-align: start; padding: 0; cursor: pointer;
}
.apod-hit img {
  width: 100%; height: 110px; object-fit: cover; border-radius: 12px; display: block;
}
.apod-hit p { margin-top: 8px; font-size: 12px; font-weight: 700; line-height: 1.4; }

.event-item {
  width: 100%; text-align: start; color: inherit;
  background: var(--panel); border: 1px solid var(--stroke);
  border-radius: 14px; padding: 10px 12px; margin-bottom: 8px;
}
.event-item.on { border-color: var(--ice); }
.event-item .etype { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--flame-2); }
.event-item .title { font-weight: 800; margin: 4px 0 2px; }

.about {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 5, 8, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.about[hidden] { display: none !important; }
.about-card {
  position: relative; z-index: 91;
  width: min(440px, 100%);
  background: #12141a;
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 26px 22px 18px;
  text-align: center;
  box-shadow: 0 28px 70px rgba(0,0,0,0.55);
}
.about-card img { margin: 0 auto 10px; }
.about-body { font-size: 14px; line-height: 1.85; color: var(--muted); }
.about-maker { color: var(--flame-2); margin: 12px 0; font-weight: 800; }
.about .tg {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  color: var(--ice); text-decoration: none; border: 1px solid var(--stroke);
  border-radius: 14px; padding: 12px; margin-bottom: 12px;
}

.drawer {
  position: fixed; inset: 0; z-index: 92;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.drawer[hidden] { display: none; }
.drawer-card {
  width: min(520px, 100%);
  max-height: min(86dvh, 720px);
  overflow: auto;
  background: #12141a;
  border: 1px solid var(--stroke);
  border-radius: 24px 24px 0 0;
  padding: 12px 16px 24px;
}
.drawer-handle { width: 40px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.18); margin: 4px auto 12px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.drawer-head h3 { font-size: 18px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 2px; font-weight: 700; gap: 12px;
}
.theme-row { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-row button, .chips.tight button {
  border: 1px solid var(--stroke); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 700;
}
.theme-row button.on { background: var(--flame); color: #1a0904; border-color: transparent; }

@media (max-width: 980px) {
  .ticker { position: relative; top: auto; inset-inline: 12px; width: auto; margin: 8px 12px 0; }
  .wx-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .drawer { align-items: center; }
  .drawer-card { border-radius: 24px; width: min(480px, calc(100% - 48px)); }
}
@media (min-width: 1100px) {
  .ticker { inset-inline: 390px; }
}
