:root {
  --bg: #0b0e13;
  --bg-elev: #131822;
  --bg-elev-2: #1a212d;
  --border: #262f3d;
  --text: #eef1f6;
  --text-dim: #9aa5b4;
  --text-dimmer: #6b7484;
  --accent-1: #ff6a3d;
  --accent-2: #ff2d78;
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --ok: #34d399;
  --warn: #f7b955;
  --danger: #ff5c5c;
  --radius: 14px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 19, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}

.brand img { width: 30px; height: 30px; border-radius: 8px; }

.brand small {
  display: block;
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: -2px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-cta {
  background: var(--accent-grad);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem !important;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
}

.lang-globe { font-size: 0.9rem; line-height: 1; }

.lang-select {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 92px;
}

.lang-select:focus { outline: none; }

.lang-select option {
  background: var(--bg-elev);
  color: var(--text);
}

/* Countdown badge */
.deadline-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  max-width: 100%;
  background: rgba(247, 185, 85, 0.1);
  border: 1px solid rgba(247, 185, 85, 0.35);
  color: var(--warn);
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
}

.deadline-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(255,92,92,0.6);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,92,92,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255,92,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,92,92,0); }
}

/* Hero */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 20px 0 14px;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color .15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(255, 45, 120, 0.55);
}

.btn-primary:hover { box-shadow: 0 10px 28px -6px rgba(255, 45, 120, 0.7); }

.btn-secondary {
  background: var(--bg-elev-2);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: #3a4658; }

.btn-small { padding: 9px 16px; font-size: 0.85rem; border-radius: 8px; }

.btn-block { width: 100%; justify-content: center; }

/* Disclaimer / callout boxes */
.callout {
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}

.callout-warn {
  border-color: rgba(247, 185, 85, 0.4);
  background: rgba(247, 185, 85, 0.06);
}

.callout-warn h3, .callout-danger h3 { margin-top: 0; }

.callout-danger {
  border-color: rgba(255, 92, 92, 0.4);
  background: rgba(255, 92, 92, 0.06);
}

.callout p:last-child { margin-bottom: 0; }

.callout-icon {
  font-size: 1.3rem;
  margin-right: 6px;
}

/* Sections */
section { padding: 56px 0; }
section.tight { padding: 32px 0; }

h2.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

p.section-sub {
  color: var(--text-dim);
  margin-top: 0;
  margin-bottom: 32px;
  max-width: 640px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  counter-reset: step;
}

.two-col-grid { grid-template-columns: 1fr 1fr; }

.step {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  position: relative;
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.step h3 { margin: 0 0 8px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }

/* Cards grid generic */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 42px 24px;
  text-align: center;
  background: var(--bg-elev);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.upload-zone.drag {
  border-color: var(--accent-1);
  background: rgba(255, 106, 61, 0.06);
}

.upload-zone .icon { font-size: 2.4rem; margin-bottom: 10px; }
.upload-zone h3 { margin: 6px 0 4px; }
.upload-zone p { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 16px; }
.upload-zone input[type=file] { display: none; }

.upload-result {
  display: none;
  margin-top: 18px;
  text-align: left;
  border-radius: 10px;
  padding: 16px 18px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.upload-result.show { display: block; }

.upload-result .file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ok);
  margin-bottom: 6px;
}

.upload-result p { margin: 4px 0 0; font-size: 0.86rem; color: var(--text-dim); }

/* Zip analysis */
.zip-status {
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.zip-status-error {
  color: var(--warn);
}

.zip-overview, .zip-compat {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.zip-overview h4, .zip-compat h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--text);
}

.zip-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.zip-stat {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}

.zip-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ok);
}

.zip-stat-label {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.zip-empty-block {
  margin-top: 18px;
}

.zip-empty-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text-dimmer);
  font-size: 0.84rem;
  columns: 2;
}

.zip-empty-list li { margin-bottom: 4px; }

.compat-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.compat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.compat-table th {
  text-align: left;
  color: var(--text-dimmer);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--border);
}

.compat-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}

.compat-table tr:last-child td { border-bottom: none; }

/* Search / filter */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  align-items: center;
}

.filter-bar input[type=search] {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 0.94rem;
}

.filter-bar input[type=search]:focus { outline: 2px solid var(--accent-1); }

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-chip.active {
  border-color: transparent;
  background: var(--accent-grad);
  color: #fff;
}

/* Alternative cards */
.alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.alt-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alt-card .alt-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alt-avatar {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
}

.alt-card h3 { margin: 0; font-size: 1.08rem; }
.alt-card .platforms { font-size: 0.76rem; color: var(--text-dimmer); }

.alt-card p.desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.89rem;
  flex-grow: 1;
}

.import-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  width: fit-content;
}

.import-direct { background: rgba(52, 211, 153, 0.12); color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.35); }
.import-extension { background: rgba(247, 185, 85, 0.12); color: var(--warn); border: 1px solid rgba(247, 185, 85, 0.35); }
.import-hub { background: rgba(120, 170, 255, 0.12); color: #7fabff; border: 1px solid rgba(120, 170, 255, 0.35); }
.import-unclear { background: rgba(154, 165, 180, 0.12); color: var(--text-dim); border: 1px solid var(--border); }

.alt-card .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--text-dim);
  transition: transform 0.15s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-dim); margin: 12px 0 0; font-size: 0.92rem; }

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: 40px 0 30px;
  margin-top: 40px;
  color: var(--text-dimmer);
  font-size: 0.84rem;
}

footer.site .foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

footer.site a { color: var(--text-dim); text-decoration: none; }
footer.site a:hover { color: var(--text); }

footer.site .foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

.foot-disclaimer {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  line-height: 1.6;
}

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.85rem; color: var(--text-dim); }

/* Tablet and small laptop */
@media (max-width: 860px) {
  .wrap { padding: 0 18px; }
  .alt-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* Phones */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }

  .nav { padding: 12px 16px; }
  .nav-links { gap: 8px 14px; }
  .brand { font-size: 0.98rem; }
  .lang-select { max-width: 70px; }

  .hero { padding: 36px 0 28px; }
  .hero h1 { margin: 16px 0 12px; }
  .hero-actions { flex-direction: column; align-items: stretch; margin-top: 26px; }
  .hero-actions .btn { width: 100%; justify-content: center; text-align: center; }

  section { padding: 36px 0; }
  section.tight { padding: 24px 0; }
  p.section-sub { margin-bottom: 24px; }

  .callout { padding: 16px 18px; }

  .two-col-grid { grid-template-columns: 1fr; }

  .card { padding: 20px; }
  .step { padding: 18px 16px; }

  .upload-zone { padding: 32px 16px; }
  .zip-empty-list { columns: 1; }

  .filter-bar { gap: 8px; }
  .filter-bar input[type=search] { min-width: 0; width: 100%; }

  .alt-grid { grid-template-columns: 1fr; }
  .alt-card .actions { gap: 6px; }
  .alt-card .actions .btn { flex: 1 1 auto; justify-content: center; }

  footer.site .foot-grid { flex-direction: column; gap: 18px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .brand span { font-size: 0.92rem; }
  .deadline-badge { font-size: 0.76rem; padding: 7px 12px; }
  .hero h1 { font-size: 1.65rem; }
}

/* RTL (Arabic) support */
[dir="rtl"] .callout-icon { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .step .num,
[dir="rtl"] .alt-avatar { margin-right: 0; }
[dir="rtl"] .lang-switcher { padding: 6px 12px 6px 10px; }
[dir="rtl"] .deadline-badge .dot { margin-left: 4px; }
[dir="rtl"] .brand small { text-align: right; }
[dir="rtl"] .zip-empty-list { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .compat-table th { text-align: right; }
