/* ===== DESIGN TOKENS ===== */
:root {
  --background: 0 0% 4%;
  --foreground: 0 0% 98%;
  --card: 0 0% 7%;
  --secondary: 0 0% 12%;
  --muted: 0 0% 14%;
  --muted-foreground: 0 0% 65%;
  --border: 0 0% 15%;
  --primary: 24 100% 50%;
  --primary-foreground: 0 0% 4%;
  --gradient-brand: linear-gradient(135deg, hsl(24 100% 50%), hsl(18 100% 45%));
  --shadow-glow: 0 0 60px hsl(24 100% 50% / 0.5);
  --radius: 0.5rem;
}

/* ===== RESET / BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: hsl(var(--background));
  min-height: 100vh;
}

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input { font-family: inherit; }
.mono { font-family: 'Courier New', Courier, monospace; }
.orange { color: hsl(var(--primary)); }

/* ===== GRAIN ===== */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 1;
}
.grain-strong::before { opacity: 0.08; }

/* ===== FLOATING DECOR ===== */
.floating-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.decor-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  background: hsl(var(--primary) / 0.15);
}
.decor-1 { width: 300px; height: 300px; top: -80px; left: -80px; }
.decor-2 { width: 250px; height: 250px; bottom: 10%; right: -60px; }
.decor-3 { width: 200px; height: 200px; top: 50%; left: 50%; transform: translate(-50%,-50%); }


/* ===== LOGO ===== */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-text { font-weight: 900; color: hsl(var(--foreground)); letter-spacing: -0.02em; }
.logo-tag {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
}
.logo-xl .logo-text { font-size: clamp(48px, 12vw, 72px); }
.logo-xl .logo-tag  { font-size: clamp(28px, 7vw, 42px); }
.logo-md .logo-text { font-size: 28px; }
.logo-md .logo-tag  { font-size: 18px; }
.logo-sm .logo-text { font-size: 18px; }
.logo-sm .logo-tag  { font-size: 12px; }

/* ===== PULSE DOT ===== */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--primary));
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ===== SCREEN BASE ===== */
.screen {
  position: relative;
  min-height: 100vh;
  z-index: 2;
}

/* ===== TELA 1: LOADING ===== */
.screen-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.loading-corner {
  position: fixed;
  top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.loading-top-left { left: 1.25rem; }
.loading-top-right { right: 1.25rem; }
.corner-text {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: hsl(var(--muted-foreground));
}

.loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.progress-wrap { display: flex; flex-direction: column; gap: 6px; width: 288px; }
.progress-bar-bg {
  width: 100%;
  height: 3px;
  background: hsl(var(--secondary));
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-brand);
  border-radius: 2px;
  transition: width 0.05s linear;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.05em;
}
.please-wait {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  color: hsl(var(--muted-foreground));
}

.loading-footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: hsl(var(--primary));
}

/* ===== TELA 2: LANG ===== */
.screen-lang {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 4rem;
}
.lang-container {
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.lang-logo { margin-bottom: 0.5rem; }
.lang-title {
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.02em;
}
.lang-subtitle {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  text-align: center;
}
.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}
@media (min-width: 480px) { .lang-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .lang-grid { grid-template-columns: repeat(4, 1fr); } }

.lang-card {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
  color: inherit;
}
.lang-card:hover {
  border-color: hsl(var(--primary));
  background: hsl(var(--secondary));
}
.lang-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.lang-flag { font-size: 28px; line-height: 1; }
.lang-code { font-size: 10px; color: hsl(var(--muted-foreground)); }
.lang-card-bottom { display: flex; flex-direction: column; gap: 2px; }
.lang-label { font-weight: 700; font-size: 14px; }
.lang-native {
  font-size: 10px;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lang-card-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: hsl(var(--primary));
  transition: width 0.25s ease;
}
.lang-card:hover .lang-card-bar { width: 100%; }

/* ===== TELA 3: CONTENT ===== */
.screen-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: hsl(var(--background) / 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}
.lang-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.2s;
  color: hsl(var(--foreground));
  text-decoration: none;
}
.lang-pill:hover { border-color: hsl(var(--primary)); }

.content-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem 1rem;
}

.content-card {
  width: 100%;
  max-width: 28rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rare-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.3);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--primary));
  align-self: flex-start;
}

.video-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 168px;
}
.video-blur {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  filter: blur(8px);
  display: block;
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: hsl(var(--background) / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lock-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: hsl(var(--card) / 0.9);
  border: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary));
}

.size-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.size-number { font-size: 22px; font-weight: 900; }
.size-gb { font-size: 14px; color: hsl(var(--muted-foreground)); font-weight: 400; }

.unlock-question {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

.steps-box {
  background: hsl(var(--secondary) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.step-num {
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.2);
  color: hsl(var(--primary));
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.step-text { font-size: 13px; line-height: 1.5; color: hsl(var(--muted-foreground)); }
.step-text strong { color: hsl(var(--foreground)); }

.fake-progress-wrap { display: flex; flex-direction: column; gap: 6px; }
.fake-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}
.fake-progress-bg {
  width: 100%;
  height: 4px;
  background: hsl(var(--secondary));
  border-radius: 2px;
  overflow: hidden;
}
.fake-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-brand);
  border-radius: 2px;
  transition: width 1.8s ease-out;
}

.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: hsl(var(--secondary) / 0.6);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s;
  text-align: left;
}
.link-box:hover { border-color: hsl(var(--primary)); }
.link-box svg { color: hsl(var(--primary)); flex-shrink: 0; }
.link-text {
  color: hsl(var(--primary));
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--gradient-brand);
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: var(--radius);
  transition: opacity 0.2s;
}
.btn-copy:hover { opacity: 0.9; }

.share-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.share-dots { display: flex; gap: 8px; }
.share-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
}
.share-label { font-size: 11px; color: hsl(var(--muted-foreground)); }

.divider-or {
  display: flex;
  align-items: center;
  gap: 10px;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: hsl(var(--border));
}
.divider-text { font-size: 11px; color: hsl(var(--muted-foreground)); }

.btn-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #059669;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-buy:hover { opacity: 0.9; }

.btn-previews {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: transparent;
  color: hsl(var(--primary));
  font-weight: 700;
  font-size: 13px;
  border: 1px solid hsl(var(--primary));
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
}
.btn-previews:hover { background: hsl(var(--primary) / 0.1); }

.secure-line {
  font-size: 10px;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

.content-footer {
  padding: 1rem;
  border-top: 1px solid hsl(var(--border));
  text-align: center;
  font-size: 10px;
  color: hsl(var(--muted-foreground));
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.toast-error   { background: #dc2626; }

/* ===== ADMIN ===== */
.admin-login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}
.admin-login-card {
  width: 100%;
  max-width: 360px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 2rem;
}
.admin-login-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 1rem;
}
.admin-error {
  color: #dc2626;
  font-size: 13px;
  margin-bottom: 0.75rem;
  text-align: center;
}
.admin-input {
  width: 100%;
  padding: 10px 12px;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.admin-input:focus { border-color: hsl(var(--primary)); }

.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}
.admin-host {
  flex: 1;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.btn-outline-sm {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-outline-sm:hover { border-color: hsl(var(--primary)); }

.admin-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.admin-card-title { font-size: 15px; font-weight: 700; }
.admin-active-label { font-size: 12px; color: hsl(var(--muted-foreground)); }
.admin-hint { font-size: 12px; color: hsl(var(--muted-foreground)); line-height: 1.5; }

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.toggle-wrap input[type="checkbox"] { width: 16px; height: 16px; accent-color: hsl(var(--primary)); }
.toggle-label { font-size: 12px; color: hsl(var(--muted-foreground)); }

.telegram-list, .domains-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.telegram-item, .domain-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: hsl(var(--secondary));
  border-radius: var(--radius);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-ok    { background: #22c55e; }
.status-fail  { background: #dc2626; }
.status-idle  { background: hsl(var(--muted-foreground)); }

.btn-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: background 0.2s;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
  border: none;
  color: hsl(var(--muted-foreground));
}
.btn-icon:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.btn-icon-del:hover { background: #dc2626; color: #fff; }

.btn-icon-add {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.btn-icon-add:hover { opacity: 0.85; }

.add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.add-domain-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tag-active {
  font-size: 10px;
  padding: 2px 6px;
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  border-radius: 4px;
  flex-shrink: 0;
}
