/* Tesanor clone extras — dropdowns, auth, videos, FAQ, marketplace */
.tesanor-wordmark {
  display: inline-block;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 28px;
  height: 28px;
  color: var(--color-foreground);
  white-space: nowrap;
}
html, body { min-height: 100%; }
body { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }

number-flow-react { display: inline; font-variant-numeric: tabular-nums; }

.container {
  width: 100%;
  max-width: var(--container-max, 80rem);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}
@media (min-width: 1024px) {
  .container {
    padding-left: var(--container-pad-lg, 2rem);
    padding-right: var(--container-pad-lg, 2rem);
  }
}

/* Marquee ticker */
@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
[style*="marquee-left"] {
  animation-play-state: running !important;
}

/* Hero real image fade-in */
img.opacity-0.is-loaded, img[fetchpriority="high"].is-loaded { opacity: 1 !important; }

/* Video overlay on posters */
.media-frame { position: relative; overflow: hidden; }
.media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Nav dropdowns */
.nav-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 320px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
  padding: 8px;
  z-index: 80;
  display: none;
}
.nav-panel.open { display: block; }
.nav-panel a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-foreground);
}
.nav-panel a:hover { background: color-mix(in oklab, var(--color-foreground) 6%, transparent); }
.nav-panel a strong { font-size: 14px; font-weight: 500; }
.nav-panel a span { font-size: 12px; color: var(--color-muted-foreground); }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--color-background);
  display: none;
  flex-direction: column;
  padding: 80px 24px 32px;
  overflow: auto;
}
.mobile-drawer.open { display: flex; }
.mobile-drawer a {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-foreground);
  text-decoration: none;
  font-size: 16px;
}

/* Language list */
.lang-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  min-width: 180px;
  padding: 6px;
  display: none;
  z-index: 40;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}
.lang-menu.open { display: block; }
.lang-menu button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  background: transparent;
  color: var(--color-foreground);
  cursor: pointer;
}
.lang-menu button:hover { background: color-mix(in oklab, var(--color-foreground) 6%, transparent); }

/* FAQ panel */
.faq-panel {
  display: none;
  padding: 0 0 20px;
  color: var(--color-muted-foreground);
  font-size: 14px;
  line-height: 1.65;
}
.faq-panel.open { display: block; }
.faq-item[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Auth pages */
html.light [data-auth-page] { background: var(--color-card); }
html.dark [data-auth-page] { background: var(--color-background); }
html.dark [data-auth-card] {
  background: var(--color-card) !important;
  border-color: color-mix(in oklab, var(--color-border) 60%, transparent) !important;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.25) !important;
}
html.light [data-auth-card] .bg-card { background: #fff; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 28rem; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 40px; }
.auth-box { border-radius: 8px; padding: 24px; }
html.light .auth-box { background: #fff; border: 1px solid #e5e5e5; box-shadow: 0 25px 50px rgba(0,0,0,.1); }
html.dark .auth-box { background: var(--color-card); border: 1px solid color-mix(in oklab, var(--color-border) 60%, transparent); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
@media (min-width: 768px) { .auth-box { padding: 32px; } }
.auth-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-foreground);
  outline: none;
}
.auth-input:focus { border-color: var(--color-foreground); }
.auth-input::placeholder { color: color-mix(in oklab, var(--color-muted-foreground) 50%, transparent); }
.auth-error { margin-bottom: 24px; padding: 16px; border-radius: 8px; background: color-mix(in oklab, var(--color-destructive) 10%, transparent); border: 1px solid color-mix(in oklab, var(--color-destructive) 30%, transparent); color: var(--color-destructive); font-size: 14px; }
.auth-ok { margin-bottom: 24px; padding: 16px; border-radius: 8px; background: color-mix(in oklab, #22c55e 10%, transparent); border: 1px solid color-mix(in oklab, #22c55e 30%, transparent); color: #4ade80; font-size: 14px; }
.spin { width: 16px; height: 16px; border: 2px solid color-mix(in oklab, var(--color-background) 30%, transparent); border-top-color: var(--color-background); border-radius: 999px; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Marketplace / explore */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (min-width: 768px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1024px) {
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.game-card { display: block; text-decoration: none; color: inherit; }
.game-card .poster {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-surface);
  position: relative;
}
.game-card .poster img, .game-card .poster video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.game-card h3 { margin-top: 10px; font-size: 15px; }
.game-card p { font-size: 12px; color: var(--color-muted-foreground); }

/* Dashboard */
.dash-shell { display: flex; min-height: calc(100vh - 60px); padding-top: 60px; }
.dash-side {
  width: 240px;
  border-right: 1px solid var(--color-border);
  padding: 20px 16px;
  background: var(--color-background);
  display: none;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.dash-main h1 {
  font-size: 28px !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
@media (min-width: 768px) { .dash-side { display: flex; } }
.dash-side a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--color-foreground);
  text-decoration: none;
  font-size: 14px;
}
.dash-side a:hover, .dash-side a.active { background: color-mix(in oklab, var(--color-foreground) 6%, transparent); }
.dash-main { flex: 1; padding: 32px 32px 80px; min-width: 0; }

/* Create button expand */
.create-btn.has-text { width: auto !important; padding: 0 16px; }
.create-btn.has-text .create-label { width: auto !important; opacity: 1 !important; }

/* Attach menu */
.attach-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  min-width: 220px;
  padding: 6px;
  display: none;
  z-index: 20;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}
.attach-menu.open { display: block; }
.attach-menu button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  background: transparent;
  color: var(--color-foreground);
  cursor: pointer;
}
.attach-menu button:hover { background: color-mix(in oklab, var(--color-foreground) 6%, transparent); }

html.dark .hero-fade {
  background: linear-gradient(transparent 55%, #171615 100%) !important;
}
html.light .hero-fade {
  background: linear-gradient(transparent 55%, #ffffff 100%) !important;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.play-badge {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

.otp-input {
  letter-spacing: 0.4em;
  text-align: center;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.verify-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, var(--color-background) 55%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.verify-overlay.open,
.verify-overlay:not([hidden]) {
  display: flex;
}
.verify-overlay[hidden] { display: none !important; }
.verify-box {
  width: min(320px, calc(100vw - 40px));
  padding: 40px 28px 32px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 24px 60px rgba(0,0,0,.16);
  text-align: center;
}
html.dark .verify-box {
  background: var(--color-card);
  border-color: color-mix(in oklab, var(--color-border) 70%, transparent);
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.verify-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  border: 3px solid color-mix(in oklab, var(--color-foreground) 12%, transparent);
  border-top-color: var(--color-foreground);
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}
.verify-title {
  font-size: 18px;
  color: var(--color-foreground);
  margin: 0 0 6px;
}
.verify-sub {
  font-size: 13px;
  color: var(--color-muted-foreground);
  margin: 0;
}
.verify-check {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: verify-pop 0.35s ease;
}
@keyframes verify-pop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
