:root {
  --bg: #0a0a0f;
  --bg-card: #13131f;
  --bg-card-hover: #1a1a2e;
  --border: #1e1e32;
  --text: #e4e4f0;
  --text-muted: #8888a0;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.25);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #3b82f6 50%, #06b6d4 100%);
  --green: #10b981;
  --red: #ef4444;
  --radius: 12px;
  --radius-lg: 20px;
  --popular-badge-text: "Popular";
}

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

/* ============ Keyframes ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.1); }
  50% { box-shadow: 0 0 35px rgba(245, 158, 11, 0.35); }
}
@keyframes ripple {
  to { transform: scale(6); opacity: 0; }
}
@keyframes splashBarFill {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes splashFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes glowShift {
  0%, 100% { box-shadow: 0 0 30px rgba(124, 58, 237, 0.2); }
  50% { box-shadow: 0 0 60px rgba(59, 130, 246, 0.3); }
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============ Splash Screen ============ */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  animation: splashFadeOut 0.6s ease 2s forwards;
}
.splash-content {
  text-align: center;
}
.splash-logo {
  font-size: 3rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
  animation: floatUpDown 2s ease-in-out infinite;
}
.splash-bar {
  width: 200px; height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}
.splash-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  animation: splashBarFill 1.8s ease forwards;
}

/* ============ Particle Canvas ============ */
.particle-canvas {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* ============ Mouse Glow ============ */
.mouse-glow {
  position: fixed; top: 0; left: 0; z-index: -1;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

/* ============ Typewriter ============ */
.typewriter-cursor {
  display: inline-block;
  font-weight: 300;
  color: var(--accent);
  animation: blinkCursor 0.8s infinite;
  margin-left: 2px;
}

/* ============ Scroll Reveal ============ */
.reveal-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}
.plan-card.reveal-item:nth-child(1) { transition-delay: 0s; }
.plan-card.reveal-item:nth-child(2) { transition-delay: 0.15s; }

/* ============ Button Ripple ============ */
.btn-primary, .btn-outline {
  position: relative;
  overflow: hidden;
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.5rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-decoration: none; }
.nav { display: flex; gap: 32px; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-menu-btn span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* Language Selector */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  transition: border-color 0.2s;
}
.lang-selector:hover,
.lang-selector:focus-within {
  border-color: var(--accent);
}
.lang-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
.lang-select {
  background: transparent;
  color: var(--text-muted);
  border: none;
  outline: none;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  min-width: 120px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.lang-select option {
  background: var(--bg-card);
  color: var(--text);
}
.lang-select:focus {
  color: var(--text);
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 30px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* Hero */
.hero { padding: 140px 0 80px; }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.badge { display: inline-block; background: var(--bg-card); border: 1px solid var(--border); border-radius: 100px; padding: 6px 16px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 32px; max-width: 540px; }
.hero-cta { display: flex; gap: 16px; margin-bottom: 32px; }
.trust-badges { display: flex; gap: 24px; flex-wrap: wrap; }
.trust-badges span { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.85rem; }
.trust-badges svg { color: var(--green); flex-shrink: 0; }

/* Hero Visual */
.hero-visual { display: flex; justify-content: center; }
.hero-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 400px; overflow: hidden; box-shadow: 0 0 60px var(--accent-glow); animation: glowShift 4s ease-in-out infinite; }
.hero-card-header { display: flex; gap: 8px; padding: 14px 18px; background: #0d0d1a; border-bottom: 1px solid var(--border); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ef4444; } .dot.yellow { background: #f59e0b; } .dot.green { background: #10b981; }
.code-block { padding: 24px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.85rem; line-height: 1.8; }
.code-block .comment { color: #6b7280; display: block; margin-bottom: 12px; }
.code-block .keyword { color: #7c3aed; }

/* Custom Request */
.custom-request {
  padding: 80px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.custom-request::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
}
.custom-request h2 { font-size: 2.2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }

/* Products */
.products { padding: 80px 0; }
.products h2 { font-size: 2.2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-desc { text-align: center; color: var(--text-muted); margin-bottom: 48px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, border-color 0.3s;
  cursor: pointer; position: relative;
  display: flex; flex-direction: column;
  transform-style: preserve-3d; perspective: 800px;
}
.product-card:hover {
  background: var(--bg-card-hover); border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.product-card.popular {
  border-color: rgba(124, 58, 237, 0.3);
}
.product-card.popular::before {
  content: var(--popular-badge-text); position: absolute; top: 14px; right: 12px;
  background: var(--gradient); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 4px 32px; transform: rotate(45deg); z-index: 1;
  border-radius: 4px;
}
.product-icon { font-size: 2.5rem; margin-bottom: 16px; }
.product-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; word-break: break-word; }
.product-card .desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.55; word-break: break-word; flex: 1; }
.product-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }
.product-meta span { display: flex; align-items: center; gap: 4px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.price-tag { font-size: 1.5rem; font-weight: 800; }
.price-tag small { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.product-card .btn { font-size: 0.85rem; flex-shrink: 0; }

/* Membership */
.membership { padding: 80px 0; background: var(--bg-card); }
.membership h2 { font-size: 2.2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; max-width: 800px; margin: 48px auto 0; }
.plan-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; position: relative; text-align: center;
}
.plan-card.featured { border-color: var(--accent); box-shadow: 0 0 40px var(--accent-glow); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gradient); color: #fff; font-size: 0.8rem; font-weight: 700; padding: 4px 20px; border-radius: 100px; box-shadow: 0 2px 8px rgba(124,58,237,0.4); }
.plan-card h3 { font-size: 1.2rem; margin-bottom: 16px; }
.price { font-size: 3rem; font-weight: 800; margin-bottom: 24px; }
.price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.plan-card ul { list-style: none; text-align: left; margin-bottom: 28px; }
.plan-card li { padding: 8px 0; color: var(--text-muted); font-size: 0.9rem; }
.plan-card li::before { content: '\2713'; color: var(--green); margin-right: 10px; font-weight: 700; }

/* FAQ */
.faq { padding: 80px 0; }
.faq h2 { font-size: 2.2rem; font-weight: 700; text-align: center; margin-bottom: 48px; }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none; color: var(--text);
  font-size: 1rem; font-weight: 600; padding: 20px 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-question:hover { color: var(--accent); }
.faq-icon { font-size: 1.3rem; transition: transform 0.3s; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s, padding 0.3s; color: var(--text-muted); font-size: 0.95rem; }
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 20px; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* Feedback */
.feedback {
  padding: 80px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  position: relative;
}
.feedback::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
}
.feedback h2 { font-size: 2.2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }

/* Shared Form Styles */
.custom-request-form,
.feedback-form {
  max-width: 640px;
  margin: 0 auto;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.custom-request-form .btn,
.feedback-form .btn {
  margin-top: 8px;
}
.form-success {
  display: none;
  max-width: 640px;
  margin: 24px auto 0;
  text-align: center;
  padding: 24px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius);
}
.form-success p {
  color: var(--green);
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 60px 0 30px; position: relative; }
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(124,58,237,0.4) 50%, transparent 100%);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); margin-top: 12px; font-size: 0.9rem; }
.footer-links h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; color: var(--text-muted); }
.footer-links a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; padding: 4px 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; max-width: 480px; width: 90%; position: relative; }
.modal-close { position: absolute; top: 16px; right: 20px; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; background: none; border: none; }
.modal-close:hover { color: var(--text); }

/* PayPal */
.paypal-btn-container { min-height: 45px; }

/* RTL Support (Arabic) */
body.rtl {
  direction: rtl;
  text-align: right;
}
body.rtl .header-inner { flex-direction: row; }
body.rtl .nav { flex-direction: row; }
body.rtl .header-actions { flex-direction: row; }
body.rtl .hero-cta { flex-direction: row; }
body.rtl .trust-badges { flex-direction: row; }
body.rtl .form-row { direction: rtl; }
body.rtl .product-footer { flex-direction: row; }
body.rtl .faq-question { flex-direction: row; text-align: right; }
body.rtl .plan-card ul { text-align: right; }
body.rtl .plan-card li::before { margin-right: 0; margin-left: 10px; }
body.rtl .footer-grid { direction: rtl; }
body.rtl .hero .container,
body.rtl .hero-content { text-align: right; }
body.rtl .hero p { margin-left: auto; margin-right: 0; }
body.rtl .code-block { text-align: left; direction: ltr; }
body.rtl .product-card.popular::before { right: auto; left: -24px; transform: rotate(-45deg); }
body.rtl .lang-icon { margin-left: 2px; }
body.rtl .modal-close { right: auto; left: 20px; }
body.rtl .splash-content { direction: ltr; }
body.rtl .typewriter-cursor { margin-left: 0; margin-right: 2px; }

/* Mobile */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .hero-visual { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .header-actions { gap: 8px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
