:root {
  --bg: #06070b;
  --bg-2: #0d1118;
  --card: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.10);
  --text: #f5f7fb;
  --muted: rgba(245,247,251,0.72);
  --red: #f32625;
  --red-2: #ff5b5a;
  --shadow: 0 24px 80px rgba(0,0,0,0.45);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #171c28 0%, #090b10 35%, #05060a 100%);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.site-bg,
.noise,
.bg-orb { position: fixed; inset: 0; pointer-events: none; }
.site-bg {
  background:
    linear-gradient(180deg, rgba(243,38,37,0.04), transparent 22%),
    radial-gradient(circle at 10% 10%, rgba(243,38,37,0.10), transparent 20%),
    radial-gradient(circle at 90% 30%, rgba(255,255,255,0.06), transparent 18%);
}
.noise {
  opacity: .06;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 20px 20px;
}
.bg-orb {
  width: 34rem; height: 34rem; border-radius: 999px; filter: blur(90px);
}
.orb-1 { left: -10rem; top: -8rem; background: rgba(243,38,37,0.22); }
.orb-2 { right: -12rem; top: 14rem; background: rgba(255,255,255,0.10); }
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
  position: relative;
  z-index: 1;
}
.glass-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.topbar,
.ad-banner,
.hero-card,
.panel,
.mini-card,
.footer {
  border-radius: var(--radius-xl);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; margin-bottom: 18px;
}
.brand {
  font-size: 1rem; font-weight: 800; letter-spacing: .22em;
}
.lang-pill {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
}
.ad-banner {
  display: flex; gap: 20px; justify-content: space-between; align-items: center;
  padding: 22px 24px; margin-bottom: 18px;
}
.ad-label {
  display: inline-block; margin-bottom: 8px; color: var(--red-2); font-weight: 700; font-size: .78rem; letter-spacing: .12em;
}
.ad-banner h2 { margin: 0 0 6px; font-size: 1.2rem; }
.ad-banner p { margin: 0; color: var(--muted); max-width: 60ch; line-height: 1.5; }
.ad-cta-wrap { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.ad-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px;
  border-radius: 999px; background: linear-gradient(180deg, var(--red-2), var(--red)); font-weight: 700;
}
.adsense-note {
  color: rgba(255,255,255,0.68); font-size: .82rem; background: rgba(255,255,255,0.04); padding: 8px 10px; border-radius: 10px;
}
.hero-card {
  display: grid; grid-template-columns: 1.5fr .65fr; gap: 20px;
  padding: 30px; margin-bottom: 18px;
}
.eyebrow { color: var(--red-2); font-weight: 700; letter-spacing: .14em; font-size: .78rem; margin: 0 0 10px; }
.hero-copy h1 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; }
.lead { margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.7; max-width: 65ch; }
.counter-card {
  border-radius: 24px; padding: 22px; background: rgba(0,0,0,0.18); border: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.counter-label { color: var(--muted); font-size: .9rem; }
.counter-value { font-size: clamp(2rem, 4vw, 3rem); margin: 6px 0; }
.counter-dot {
  width: 12px; height: 12px; border-radius: 999px; background: var(--red); box-shadow: 0 0 16px rgba(243,38,37,.8);
}
.panel { padding: 28px; margin-bottom: 18px; }
.generator-form { display: flex; flex-direction: column; gap: 22px; }
.field-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.upload-card,
.option-card {
  display: flex; flex-direction: column; gap: 14px; border-radius: var(--radius-lg);
  padding: 22px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
}
.field-label { font-size: .94rem; font-weight: 700; }
.field-hint { color: var(--muted); line-height: 1.55; font-size: .92rem; }
input[type="file"] {
  width: 100%; border-radius: 14px; padding: 14px; color: var(--text);
  background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.16);
}
.radio-line,
.check-pill { display: flex; align-items: center; gap: 12px; }
.radio-line {
  padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
}
.checks { display: flex; gap: 12px; flex-wrap: wrap; }
.check-pill {
  padding: 14px 16px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
}
.notice-row {
  display: flex; justify-content: space-between; gap: 18px; align-items: center; flex-wrap: wrap;
}
.notice { margin: 0; color: var(--muted); line-height: 1.6; }
.submit-btn {
  border: 0; cursor: pointer; min-height: 54px; padding: 0 22px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 14px; font-family: inherit; font-size: 1rem; font-weight: 700;
  color: white; background: linear-gradient(180deg, var(--red-2), var(--red)); box-shadow: 0 10px 28px rgba(243,38,37,.30);
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.28); border-top-color: white;
  display: none;
}
body.is-loading .spinner { display: inline-block; animation: spin .7s linear infinite; }
body.is-loading .submit-btn { opacity: .94; pointer-events: none; }
.alert {
  border-radius: 16px; padding: 15px 18px; font-weight: 600;
}
.alert.error { background: rgba(243,38,37,.14); border: 1px solid rgba(243,38,37,.26); color: #ffd2d1; }
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px;
}
.mini-card {
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.mini-card strong { font-size: 1rem; }
.mini-card span { color: var(--muted); line-height: 1.6; }
.footer {
  display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 24px;
}
.footer p { margin: 6px 0 0; color: var(--muted); max-width: 55ch; line-height: 1.6; }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  .hero-card, .field-grid, .feature-grid { grid-template-columns: 1fr; }
  .ad-banner, .footer { flex-direction: column; align-items: flex-start; }
  .ad-cta-wrap { align-items: flex-start; }
}

.topbar-controls { display:flex; align-items:center; gap:12px; }
.brand-logo { display:block; width:180px; max-width:42vw; height:auto; opacity:.96; }
.lang-selector { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:.9rem; }
.lang-selector select {
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  min-width:190px; border-radius:999px; border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06); color: var(--text); padding: 11px 16px; font: inherit;
}
.lang-selector option { color:#111; }
[hidden] { display:none !important; }
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .topbar,
html[dir="rtl"] .ad-banner,
html[dir="rtl"] .notice-row,
html[dir="rtl"] .footer { flex-direction: row-reverse; }
html[dir="rtl"] .hero-card { direction: rtl; }
html[dir="rtl"] .counter-card,
html[dir="rtl"] .hero-copy { align-items: flex-end; text-align: right; }
@media (max-width: 900px) {
  .topbar { flex-direction: column; align-items: flex-start; gap:12px; }
  .topbar-controls { width:100%; }
  .lang-selector { width:100%; justify-content:space-between; }
  .lang-selector select { min-width: 0; width: 100%; }
}
