:root {
  --bg-body: #050505;
  --bg-nav: rgba(5, 5, 5, 0.95);
  --bg-card: #0f0f0f;
  --bg-input: #121212;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --accent: #8b5cf6;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --premium: #ffd700;
  --success: #22c55e;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

body.light-mode {
  --bg-body: #f8fafc;
  --bg-nav: rgba(255, 255, 255, 0.95);
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --primary: #2563eb;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: rgba(0, 0, 0, 0.1);
  --premium: #d4af37;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

/* --- HEADER FIXED --- */
header {
  padding: 15px 5%;
  position: fixed; top: 0; width: 100%;
  background: var(--bg-nav); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000; 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.logo { 
  font-family: var(--font-heading); font-size: 24px; font-weight: 700; 
  display: flex; align-items: center; gap: 10px; color: var(--text-main); 
  cursor: pointer;
}
.logo img { height: 35px; border-radius: 8px; }

/* Hidden by default on desktop */
.menu-toggle { display: none; font-size: 24px; color: var(--text-main); cursor: pointer; z-index: 1001; }

.nav-container { display: flex; align-items: center; gap: 30px; }
nav { display: flex; gap: 25px; }
nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: 0.3s; }
nav a:hover { color: var(--primary); }

.controls { display: flex; gap: 10px; align-items: center; }
.theme-toggle { background: none; border: none; color: var(--text-main); font-size: 1.2rem; cursor: pointer; padding: 5px; }

.btn { padding: 10px 20px; border-radius: 50px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; transition: 0.3s; border: none; font-size: 14px; cursor: pointer; }
.btn-login { border: 1px solid var(--border); background: transparent; color: var(--text-main); }
.btn-login:hover { border-color: var(--primary); color: var(--primary); }
.btn-signup { background: var(--primary); color: white; box-shadow: 0 4px 15px var(--primary-glow); }
.btn-signup:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--primary-glow); }

/* Hero */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 120px 20px 60px; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, rgba(0,0,0,0) 60%);
  animation: rotate 20s linear infinite; z-index: -1;
}
@keyframes rotate { from{transform:rotate(0deg);} to{transform:rotate(360deg);} }

.hero h1 {
  font-family: var(--font-heading); font-size: clamp(40px, 6vw, 70px);
  background: linear-gradient(to right, var(--text-main), var(--primary), var(--text-main));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px; line-height: 1.2; min-height: 1.2em;
}

.hero p { max-width: 700px; margin: 0 auto 30px; color: var(--text-muted); font-size: clamp(16px, 2vw, 18px); }
.cta-group { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.cta-primary { padding: 15px 35px; background: var(--primary); color: #fff; border-radius: 50px; text-decoration: none; font-weight: bold; box-shadow: 0 0 20px var(--primary-glow); transition: 0.3s; cursor: pointer; }

/* Stats */
.stats-bar { display: flex; justify-content: center; gap: 50px; padding: 40px 5%; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.stat-item { text-align: center; min-width: 150px; }
.stat-num { font-size: 32px; font-weight: 700; color: var(--primary); font-family: var(--font-heading); }
.stat-label { font-size: 14px; color: var(--text-muted); }

/* Sections & Cards */
.section { padding: 100px 5%; }
.section-header { text-align: center; margin-bottom: 60px; padding: 0 15px; }
.section-header h2 { font-family: var(--font-heading); font-size: 36px; margin-bottom: 10px; }
.section-header span { color: var(--primary); }
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card {
  background: var(--bg-card); padding: 40px 30px; border-radius: 20px;
  border: 1px solid var(--border); position: relative; overflow: hidden;
  transform-style: preserve-3d;
}
.card:hover { border-color: var(--primary); }
.card-icon, .quote-icon { font-size: 32px; color: var(--primary); margin-bottom: 20px; transform: translateZ(20px); }
.card h3 { font-size: 22px; margin-bottom: 10px; transform: translateZ(30px); color: var(--text-main); }
.card p { color: var(--text-muted); transform: translateZ(20px); font-size: 15px; }

/* Pricing */
.pricing-card { display: flex; flex-direction: column; text-align: center; }
.pricing-card.featured-pricing { border: 2px solid var(--primary); transform: scale(1.02); z-index: 2; background: linear-gradient(180deg, var(--bg-card) 0%, rgba(59,130,246,0.05) 100%); }
.price { font-size: 42px; font-weight: 800; color: var(--text-main); margin: 15px 0; font-family: var(--font-heading); }
.pricing-features { list-style: none; text-align: left; margin: 25px 0; flex-grow: 1; padding: 0 10px; }
.pricing-features li { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px; color: var(--text-muted); font-size: 14px; }
.pricing-badge { position: absolute; top: 15px; right: 15px; background: var(--primary); color: white; padding: 5px 10px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.full-width { width: 100%; }

/* Addons */
.addons-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.addon-card { background: var(--bg-card); border: 1px solid var(--border); padding: 20px; text-align: center; border-radius: 12px; transition: 0.3s; }
.addon-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.addon-card i { font-size: 24px; color: var(--primary); margin-bottom: 10px; }
.addon-price { font-weight: bold; color: var(--text-main); font-size: 18px; }

/* Tech Stack */
.tech-stack { padding: 40px 0; background: var(--bg-card); overflow: hidden; white-space: nowrap; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tech-track { display: inline-block; animation: scroll 20s linear infinite; }
.tech-item { display: inline-block; padding: 0 40px; font-size: 18px; font-weight: 600; color: var(--text-muted); opacity: 0.7; }
@keyframes scroll { from{transform: translateX(0);} to{transform: translateX(-50%);} }

/* Process */
.process-container { max-width: 800px; margin: 0 auto; }
.process-step { display: flex; gap: 30px; margin-bottom: 30px; padding: 30px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; align-items: flex-start; }
.step-number { font-size: 40px; font-weight: 800; color: var(--border); line-height: 1; }

/* Contact & Form */
.contact-wrapper { display: flex; flex-wrap: wrap; gap: 50px; max-width: 1200px; margin: 0 auto; }
.contact-info, .contact-form-box { flex: 1; min-width: 300px; }
.contact-item { display: flex; gap: 15px; margin-bottom: 30px; align-items: flex-start; }
.contact-item i { font-size: 20px; color: var(--primary); background: rgba(59,130,246,0.1); width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 12px; flex-shrink: 0; }
.contact-form-box { background: var(--bg-card); padding: 40px; border-radius: 24px; border: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 13px; }
input, select, textarea {
  width: 100%; padding: 15px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-main); outline: none; transition: 0.3s; font-family: var(--font-body);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.secure-badge { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 15px; }
.secure-badge a { color: var(--primary); text-decoration: none; }

/* Toast */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 10000; }
.toast {
  background: var(--bg-card); color: var(--text-main); padding: 15px 25px; border-radius: 10px; margin-top: 10px;
  border-left: 4px solid var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 10px; animation: slideIn 0.3s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: #ef4444; }
@keyframes slideIn { from{transform:translateX(100%);} to{transform:translateX(0);} }

/* Portfolio */
.portfolio-img { height: 200px; width: 100%; border-radius: 10px; margin-bottom: 20px; }
.portfolio-card { padding: 20px; }

/* --- FOOTER --- */
footer { 
  padding: 80px 5% 30px; 
  background: var(--bg-card); 
  border-top: 1px solid var(--border); 
}
.footer-brand h2 { color: var(--text-main); font-family: var(--font-heading); font-size: 28px; }
.social-links { margin-top: 20px; display: flex; gap: 15px; }
.social-links a { width: 40px; height: 40px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-main); text-decoration: none; transition: 0.3s; }
.social-links a:hover { background: var(--primary); color: white; }
.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 40px; margin: 40px 0; }
.footer-col h4 { color: var(--text-main); margin-bottom: 20px; }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 10px; transition: color 0.3s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { text-align: center; border-top: 1px solid var(--border); padding-top: 30px; color: var(--text-muted); font-size: 14px; }

/* Floating Buttons */
.whatsapp-float { position: fixed; bottom: 25px; left: 25px; background: #25d366; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: white; box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 999; transition: transform 0.3s ease; text-decoration: none; }
.whatsapp-float:hover { transform: scale(1.1); }

/* --- BUG FIX: SCROLL TO TOP VISIBILITY & POSITION --- */
#scrollToTop {
  position: fixed;
  bottom: 100px; /* Sits above WhatsApp float */
  left: 25px;
  background: var(--primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 998;
}
#scrollToTop.visible { opacity: 1; visibility: visible; }
#scrollToTop:hover { background: #2563eb; transform: translateY(-3px); }

/* --- NEW DYNAMIC PRICING STYLES --- */
.pricing-tabs-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}
.pricing-tabs-container::-webkit-scrollbar { display: none; } /* Hide Chrome Safari */

.pricing-tabs {
  display: flex;
  gap: 10px;
  padding: 5px;
  background: var(--bg-input);
  border-radius: 50px;
  border: 1px solid var(--border);
  min-width: max-content; 
}

.pricing-tabs button {
  background: none;
  border: none;
  padding: 10px 20px;
  color: var(--text-muted);
  border-radius: 40px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: 0.3s;
}

.pricing-tabs button:hover { color: var(--text-main); }
.pricing-tabs button.active { background: var(--primary); color: white; box-shadow: 0 4px 15px var(--primary-glow); }

.pricing-grid-dynamic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.action-buttons { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap; }
.action-buttons button { flex: 1; min-width: 200px; justify-content: center; }
#pay-btn { background: var(--success); color: #fff; border: none; }
#pay-btn:hover { background: #16a34a; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4); }

.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- RESPONSIVE FIXES --- */
@media(max-width: 1100px) {
  .pricing-grid-dynamic { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width: 900px) {
  .menu-toggle { display: block; }
  .nav-container {
    position: fixed; top: 66px; left: -100%; width: 100%; height: calc(100vh - 66px);
    background: var(--bg-nav); flex-direction: column; padding: 40px 20px; transition: left 0.4s ease;
    overflow-y: auto;
  }
  .nav-container.active { left: 0; }
  nav { flex-direction: column; width: 100%; text-align: center; gap: 20px; }
  nav a { font-size: 18px; display: block; padding: 10px; }
  .controls { flex-direction: column; width: 100%; margin-top: 20px; }
  .controls .btn { width: 100%; max-width: 300px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-bar { gap: 30px; }
  .process-step { flex-direction: column; gap: 15px; }
}

@media(max-width: 600px) {
  .pricing-grid-dynamic { grid-template-columns: 1fr; }
  .pricing-tabs-container { justify-content: flex-start; padding-left: 20px; }
  .section { padding: 60px 5%; }
  .hero { padding-top: 100px; }
  .contact-form-box { padding: 25px 20px; }
  .action-buttons { flex-direction: column; }
}

/* Optimize hover effect on mobile */
@media (pointer: coarse) {
  .tilt-card { transform: none !important; transition: none !important; }
}