:root {
    --bg-deep: #030712;
    --bg-card: #0d1117;
    --bg-glass: rgba(15,23,42,0.7);
    --accent: #00d4ff;
    --accent2: #a855f7;
    --accent3: #f59e0b;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border: rgba(0,212,255,0.15);
    --glow: 0 0 40px rgba(0,212,255,0.15);
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Cairo', 'Tajawal', sans-serif;
    line-height: 1.9;
    overflow-x: hidden;
  }

  /* ─── ANIMATED BACKGROUND ─── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 50% at 20% 10%, rgba(0,212,255,0.08) 0%, transparent 60%),
      radial-gradient(ellipse 60% 40% at 80% 80%, rgba(168,85,247,0.07) 0%, transparent 60%),
      radial-gradient(ellipse 50% 50% at 50% 50%, rgba(245,158,11,0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }

  /* ─── NAV ─── */
  nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3,7,18,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
  }

  .nav-logo {
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
  }

  .nav-links { display: flex; gap: 2rem; list-style: none; }
  .nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: color 0.3s; }
  .nav-links a:hover { color: var(--accent); }

  /* ─── HERO ─── */
  .hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 5% 4rem;
    z-index: 1;
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,212,255,0.1);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 100px;
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.8rem;
    animation: fadeDown 0.8s ease both;
  }

  .hero-badge .dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
  }

  @keyframes pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
  }

  .hero h1 {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.9s ease 0.1s both;
  }

  .hero h1 .glow-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(0,212,255,0.4));
  }

  .hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 3rem;
    animation: fadeUp 0.9s ease 0.2s both;
  }

  .hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeUp 0.9s ease 0.3s both;
  }

  .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--accent), #0099cc);
    color: #000;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 0.95rem 2.2rem;
    border-radius: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 30px rgba(0,212,255,0.35);
  }

  .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(0,212,255,0.5);
  }

  .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.95rem 2.2rem;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0,212,255,0.05);
  }

  /* ─── STATS ROW ─── */
  .stats-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4rem;
    animation: fadeUp 1s ease 0.5s both;
  }

  .stat-item { text-align: center; }
  .stat-num {
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .stat-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; }

  /* ─── SCROLL INDICATOR ─── */
  .scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    animation: bounceUp 2s infinite;
  }
  .scroll-indicator svg { width: 20px; opacity: 0.5; }

  @keyframes bounceUp {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
  }

  /* ─── SECTIONS ─── */
  section { position: relative; z-index: 1; padding: 5rem 5%; }
  .container { max-width: 1100px; margin: 0 auto; }

  .section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.8rem;
  }

  .section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.25;
  }

  .section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 700px;
    margin-bottom: 3rem;
  }

  /* ─── CARD GRID ─── */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
  }

  .card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100px; height: 100px;
    background: radial-gradient(circle, rgba(0,212,255,0.08), transparent 70%);
    border-radius: 50%;
  }

  .card:hover {
    transform: translateY(-6px);
    border-color: rgba(0,212,255,0.3);
    box-shadow: var(--glow);
  }

  .card-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: block;
  }

  .card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
  }

  .card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; }

  /* ─── ARTICLE CONTENT ─── */
  .article-section { background: var(--bg-card); }

  .article-body {
    max-width: 860px;
    margin: 0 auto;
  }

  .article-body h2 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 900;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
  }

  .article-body h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 2rem 0 0.8rem;
    color: var(--accent);
  }

  .article-body p {
    color: #c9d1d9;
    margin-bottom: 1.2rem;
    font-size: 1.02rem;
    line-height: 1.95;
  }

  .article-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(0,212,255,0.3);
    transition: border-color 0.2s;
  }

  .article-body a:hover { border-color: var(--accent); }

  .article-body ul, .article-body ol {
    padding-right: 1.5rem;
    margin-bottom: 1.2rem;
    color: #c9d1d9;
  }

  .article-body li { margin-bottom: 0.5rem; line-height: 1.9; }

  /* ─── CALLOUT BOX ─── */
  .callout {
    background: rgba(0,212,255,0.06);
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
  }

  .callout-icon { font-size: 1.8rem; flex-shrink: 0; }
  .callout-content h4 { font-weight: 800; margin-bottom: 0.4rem; color: var(--accent); }
  .callout-content p { color: #c9d1d9; margin: 0; font-size: 0.95rem; }

  .callout.warning {
    background: rgba(245,158,11,0.06);
    border-color: rgba(245,158,11,0.2);
  }

  .callout.warning .callout-content h4 { color: var(--accent3); }

  /* ─── STEPS ─── */
  .steps { counter-reset: step; }
  .step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color 0.3s;
  }

  .step:hover { border-color: rgba(0,212,255,0.3); }

  .step-num {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex; align-items: center; justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
    color: #000;
  }

  .step-body h4 { font-weight: 800; margin-bottom: 0.4rem; }
  .step-body p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }

  /* ─── COMPARISON TABLE ─── */
  .comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
  }

  .comparison-table th {
    background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(168,85,247,0.1));
    padding: 1rem 1.2rem;
    text-align: right;
    font-weight: 800;
    border-bottom: 2px solid var(--border);
  }

  .comparison-table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--border);
    color: #c9d1d9;
  }

  .comparison-table tr:hover td { background: rgba(0,212,255,0.03); }
  .check { color: #22c55e; font-weight: 800; }
  .cross { color: #ef4444; font-weight: 800; }
  .highlight-row td { background: rgba(0,212,255,0.05); font-weight: 700; color: var(--text-primary); }

  /* ─── FAQ ─── */
  .faq-list { display: flex; flex-direction: column; gap: 1rem; }

  .faq-item {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s;
  }

  .faq-item:hover { border-color: rgba(0,212,255,0.3); }

  .faq-q {
    padding: 1.2rem 1.5rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  .faq-q::after {
    content: '⌄';
    font-size: 1.2rem;
    color: var(--accent);
    transition: transform 0.3s;
    flex-shrink: 0;
  }

  .faq-item.open .faq-q::after { transform: rotate(180deg); }

  .faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    padding: 0 1.5rem;
  }

  .faq-item.open .faq-a {
    max-height: 400px;
    padding: 0 1.5rem 1.2rem;
  }

  /* ─── VERSIONS TIMELINE ─── */
  .timeline { position: relative; padding-right: 2rem; }
  .timeline::before {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent2));
  }

  .timeline-item {
    position: relative;
    padding: 0 2rem 2.5rem 0;
  }

  .timeline-item::before {
    content: '';
    position: absolute;
    right: -5px; top: 6px;
    width: 12px; height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,212,255,0.5);
  }

  .timeline-date { font-size: 0.8rem; color: var(--accent); font-weight: 700; margin-bottom: 0.3rem; }
  .timeline-title { font-weight: 800; margin-bottom: 0.4rem; }
  .timeline-desc { color: var(--text-secondary); font-size: 0.92rem; }

  /* ─── SCRIPTS HUB ─── */
  .scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
  }

  .script-card {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.4rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
  }

  .script-card:hover {
    border-color: var(--accent2);
    transform: translateY(-4px);
    background: rgba(168,85,247,0.05);
  }

  .script-icon { font-size: 2rem; margin-bottom: 0.7rem; display: block; }
  .script-name { font-weight: 800; font-size: 0.95rem; margin-bottom: 0.3rem; }
  .script-cat { font-size: 0.78rem; color: var(--accent2); font-weight: 600; }

  /* ─── NEWSLETTER ─── */
  .newsletter-box {
    background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(168,85,247,0.08));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
  }

  .newsletter-box h2 { font-size: 2rem; font-weight: 900; margin-bottom: 0.8rem; }
  .newsletter-box p { color: var(--text-secondary); margin-bottom: 2rem; }

  .newsletter-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .newsletter-form input {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1.5rem;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    width: 280px;
    outline: none;
    transition: border-color 0.3s;
    text-align: right;
  }

  .newsletter-form input:focus { border-color: var(--accent); }
  .newsletter-form input::placeholder { color: var(--text-secondary); }

  /* ─── FOOTER ─── */
  footer {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 5%;
    text-align: center;
  }

  .footer-logo {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 1rem;
    text-decoration: none;
  }

  .footer-links { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
  .footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
  .footer-links a:hover { color: var(--accent); }

  .footer-copy { color: var(--text-secondary); font-size: 0.85rem; }

  /* ─── ANIMATIONS ─── */
  @keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ─── SCROLLED REVEAL ─── */
  .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.visible { opacity: 1; transform: translateY(0); }

  /* ─── FLOATING DOWNLOAD BUTTON ─── */
  .float-dl {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--accent), #0099cc);
    color: #000;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 4px 25px rgba(0,212,255,0.5);
    animation: floatPulse 3s infinite;
  }

  @keyframes floatPulse {
    0%,100% { box-shadow: 0 4px 25px rgba(0,212,255,0.5); }
    50% { box-shadow: 0 4px 40px rgba(0,212,255,0.8); }
  }

  /* ─── RESPONSIVE ─── */
  @media (max-width: 768px) {
    .nav-links { display: none; }
    section { padding: 3.5rem 5%; }
    .steps .step { flex-direction: column; gap: 1rem; }
    .newsletter-form input { width: 100%; }
    .float-dl { left: 1rem; bottom: 1rem; font-size: 0.82rem; padding: 0.7rem 1.2rem; }
  }

  /* ─── BADGE ─── */
  .new-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent3), #f97316);
    color: #000;
    font-size: 0.68rem;
    font-weight: 900;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    margin-right: 0.5rem;
    vertical-align: middle;
  }

  /* ─── PLATFORM TABS ─── */
  .platform-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-deep);
    padding: 0.4rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    width: fit-content;
  }

  .tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
  }

  .tab-btn.active {
    background: linear-gradient(135deg, var(--accent), #0099cc);
    color: #000;
  }

  .tab-content { display: none; }
  .tab-content.active { display: block; }