/* =============================================
   WizSecret — WizHosting
   Design System & Global Styles
   ============================================= */

:root {
  --primary: #FF6B00;
  --primary-light: #FF8C3A;
  --primary-dark: #D95A00;
  --primary-glow: rgba(255,107,0,0.3);

  --accent: #F6AD55;
  --accent-light: #FBD38D;

  --bg: #09090b;
  --bg-2: #121214;
  --bg-3: #18181b;
  --bg-card: rgba(18, 18, 20, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.03);

  --border: rgba(255,255,255,0.06);
  --border-primary: rgba(255,107,0,0.3);
  --border-accent: rgba(246,173,85,0.3);

  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #52525b;

  --green: #10b981;
  --red: #ef4444;
  --blue: #3b82f6;

  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-primary: 0 0 40px rgba(255,107,0,0.25);

  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Mouse tracking spotlight */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: radial-gradient(
    1100px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,107,0,0.14),
    transparent 45%
  ),
  radial-gradient(
    700px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(246,173,85,0.105),
    transparent 35%
  );
  pointer-events: none;
  z-index: 0;
}

#app { position: relative; z-index: 1; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }

button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
textarea, input, select { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* ── Layout ── */
#app { min-height: 100vh; display: flex; flex-direction: column; }

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--wide { max-width: 1100px; }

/* ── Header ── */
.header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10,12,16,0.85);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo__icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 18px;
  box-shadow: var(--shadow-primary);
}
.logo__name span { color: var(--primary); }

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

/* ── Language Switcher ── */
.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
}
.lang-btn {
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  transition: all var(--transition);
  letter-spacing: 0.05em;
}
.lang-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ── Main Content ── */
.main { flex: 1; padding: 48px 0 80px; }

/* ── Hero ── */
.hero { text-align: center; margin-bottom: 48px; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 0 20px rgba(255,107,0,0.15);
}
.hero__badge::before { content: '🔒'; font-size: 12px; }
.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.65) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__title span {
  background: linear-gradient(135deg, var(--primary), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
}
.hero__sub {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(40px);
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: rgba(255,255,255,0.12); }
.card--orange { border-color: var(--border-primary); box-shadow: var(--shadow), var(--shadow-primary); }

/* ── Form Elements ── */
.field { margin-bottom: 20px; }
.field__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.field__label span { color: var(--text-3); font-weight: 400; }

.textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.6;
}
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.textarea::placeholder { color: var(--text-3); }

.char-counter {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 6px;
  transition: color var(--transition);
}
.char-counter.warn { color: #F59E0B; }
.char-counter.danger { color: var(--red); }

.input {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.input::placeholder { color: var(--text-3); }

/* ── Expiry Selector ── */
.expiry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.expiry-btn {
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.expiry-btn:hover { border-color: var(--border-primary); color: var(--text); }
.expiry-btn.selected {
  background: linear-gradient(135deg, rgba(255,107,0,0.2), rgba(246,173,85,0.15));
  border-color: var(--primary);
  color: var(--primary-light);
}

/* ── Passphrase toggle ── */
.optional-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  color: var(--text-2);
}
.optional-toggle input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  transition: all var(--transition);
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
}
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,107,0,0.3);
  width: 100%;
}
.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,107,0,0.45);
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
}
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn--secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn--secondary:hover { border-color: var(--border-primary); color: var(--primary-light); }
.btn--outline {
  background: transparent;
  border: 1px solid var(--border-primary);
  color: var(--primary-light);
  padding: 10px 20px;
  font-size: 0.88rem;
}
.btn--outline:hover { background: var(--primary-glow); }
.btn--icon { padding: 10px; border-radius: var(--radius-sm); }
.btn--sm { padding: 8px 16px; font-size: 0.82rem; }

/* ── Result box ── */
.result-box {
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  animation: fadeSlideIn 0.4s ease;
  box-shadow: inset 0 0 20px rgba(255,107,0,0.1);
}
.result-url {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--primary-light);
  word-break: break-all;
  line-height: 1.5;
  background: rgba(0,0,0,0.3);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.result-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ── Status messages ── */
.status-card {
  text-align: center;
  padding: 48px 32px;
  animation: fadeSlideIn 0.4s ease;
}
.status-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
  animation: pulse 2s ease infinite;
}
.status-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.status-desc { color: var(--text-2); line-height: 1.7; max-width: 480px; margin: 0 auto; }

/* ── Secret reveal ── */
.secret-display {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.7;
  position: relative;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: inset 0 0 20px rgba(16,185,129,0.05);
}
.secret-display::-webkit-scrollbar { width: 6px; }
.secret-display::-webkit-scrollbar-track { background: transparent; }
.secret-display::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Passphrase entry ── */
.passphrase-section {
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.passphrase-section p { font-size: 0.88rem; color: var(--text-2); margin-bottom: 12px; }

/* ── Stats grid (Admin) ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-card__value { font-size: 2rem; font-weight: 800; color: var(--primary-light); letter-spacing: -0.03em; }
.stat-card__label { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Footer ── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer__links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.footer__links a { font-size: 0.82rem; color: var(--text-3); }
.footer__links a:hover { color: var(--text-2); }
.footer__copy { font-size: 0.78rem; color: var(--text-3); }

/* ── Info pills ── */
.info-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 32px 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.pill span { font-size: 14px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Promo Banner ── */
.promo-banner:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(255,107,0,0.2);
}
.promo-banner:hover h3 { color: var(--primary-light) !important; }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px;
}
.toast--success { border-color: rgba(16,185,129,0.5); box-shadow: 0 4px 20px rgba(16,185,129,0.15); }
.toast--error { border-color: rgba(239,68,68,0.5); box-shadow: 0 4px 20px rgba(239,68,68,0.15); }

/* ── Admin login ── */
.admin-login {
  max-width: 400px;
  margin: 80px auto;
}

/* ── Animations ── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(30px); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .card { padding: 24px; border-radius: var(--radius); }
  .main { padding: 32px 0 60px; }
  .hero { margin-bottom: 32px; }
  .expiry-grid { grid-template-columns: repeat(2, 1fr); }
  .result-actions { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .btn--primary { padding: 13px 20px; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .info-pills { gap: 8px; }
}
