/* ======================
   GLOBAL
====================== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

section {
  padding: 100px 20px;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* ======================
   NAVBAR (Glass SaaS)
====================== */
.navbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  z-index: 999;
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  position: relative;
  transition: 0.3s;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: #4f46e5;
  transition: 0.3s;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-btn {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white !important;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(79,70,229,0.35);
}

/* ======================
   HERO (Modern Gradient)
====================== */
.hero {
  background: radial-gradient(circle at top left, #4f46e5, #1e293b);
  color: white;
  text-align: center;
  padding: 140px 20px 120px;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 48px;
  max-width: 800px;
  margin: auto;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  margin: 20px 0 30px;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(34,197,94,0.4);
  transition: 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px);
}

.btn-secondary {
  background: white;
  color: #111;
  padding: 14px 28px;
  border-radius: 999px;
  margin-left: 15px;
  text-decoration: none;
  font-weight: 600;
}

/* ======================
   PRODUCT SECTION
====================== */
.products {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.product-card {
  background: white;
  padding: 40px;
  border-radius: 20px;
  width: 360px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.08);
  transition: 0.3s;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(15,23,42,0.15);
}

.product-card ul {
  padding-left: 18px;
  color: #475569;
}

/* ======================
   PRICING (Premium Look)
====================== */
.pricing {
  background: linear-gradient(to bottom, #f8fafc, #eef2ff);
  text-align: center;
}

.pricing h2 {
  margin-bottom: 50px;
}

.pricing-grid {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.price-card {
  background: white;
  padding: 50px 40px;
  width: 320px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.08);
  transition: 0.3s;
}

.price-card:hover {
  transform: translateY(-10px);
}

.price-card h1 {
  font-size: 42px;
  margin: 10px 0;
}

.price-card.popular {
  border: 2px solid #4f46e5;
  transform: scale(1.05);
}

/* ======================
   WIDGET GRID
====================== */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 60px 60px 80px;
}

.widget-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.07);
  transition: 0.3s;
}

.widget-card:hover {
  transform: translateY(-6px);
}

/* ======================
   BUTTONS
====================== */
.actions button {
  flex: 1;
  padding: 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  transition: 0.3s;
}

.actions button:hover {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
}

/* ======================
   MODAL (Enhanced)
====================== */
.modal-content {
  border-radius: 24px;
  box-shadow: 0 50px 100px rgba(0,0,0,0.3);
}

/* ======================
   FOOTER
====================== */
.footer {
  background: #0f172a;
  color: white;
  padding: 80px 20px;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer a {
  color: #94a3b8;
  text-decoration: none;
}

.footer a:hover {
  color: white;
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 34px;
  }

  .products,
  .pricing-grid {
    flex-direction: column;
    align-items: center;
  }

  .widget-grid {
    padding: 40px 20px;
  }
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: 0.3s ease;
  z-index: 999999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}


/* ======================
   ANIMATION
====================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======================
   MODAL OVERLAY
====================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.modal.show {
  display: flex;
}

/* ======================
   MODAL CONTENT
====================== */
.modal-content {
  width: 90%;
  max-width: 1000px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.25);
  animation: modalIn 0.3s ease;
  overflow: hidden;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ======================
   MODAL HEADER
====================== */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.modal-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.close-btn {
  background: #f1f5f9;
  border: none;
  color: #0f172a;
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: #e2e8f0;
}

/* ======================
   MODAL BODY
====================== */
.modal-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  padding: 26px;
}

/* PREVIEW */
.modal-preview {
  background: #f8fafc;
  border-radius: 16px;
  overflow: hidden;
  height: 420px;
  border: 1px solid #e2e8f0;
}

.modal-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* CODE */
.modal-code {
  display: flex;
  flex-direction: column;
  height: 420px;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.code-header span {
  font-size: 14px;
  color: #475569;
}

.code-header button {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.35);
}

.modal-code pre {
  flex: 1;
  background: #0f172a;
  border-radius: 14px;
  padding: 16px;
  color: #e5e7eb;
  font-size: 13px;
  overflow: auto;
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 36px;
  }

  .widget-grid {
    padding: 40px 20px 60px;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-preview,
  .modal-code {
    height: 300px;
  }
}
