/* Base Reset & Variables */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --border-color: rgba(51, 65, 85, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --error: #f87171;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Background Animations */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-dark);
}

.blob {
  position: absolute;
  filter: blur(100px);
  border-radius: 50%;
  opacity: 0.15;
  animation: float 15s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -150px;
  left: -100px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: #3b82f6;
  bottom: -100px;
  right: -50px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 100px) scale(1.1); }
  100% { transform: translate(-50px, 50px) scale(1.2); }
}

/* Navbar (Glassmorphism) */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 8%;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.glow-text {
  color: var(--primary);
  text-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s, transform 0.2s;
}

nav a:not(.btn-primary):hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* Load-in Animations */
.fade-down { animation: fadeDown 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.fade-up { animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.fade-in { animation: fadeIn 1.2s ease forwards; opacity: 0; }

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1.0s; }

@keyframes fadeDown { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Hero Section */
.hero {
  text-align: center;
  padding: 8rem 1rem 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #020617;
  border: none;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.4);
}

.btn-primary:disabled {
  background-color: #475569;
  color: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pulse-btn {
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  border-color: #64748b;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Scroll Reveal Classes */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Layout & Cards */
.features, .pricing {
  padding: 5rem 8%;
  text-align: center;
}

.features h2, .pricing h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.card, .plan {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  padding: 2.5rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover, .plan:hover {
  transform: translateY(-10px);
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(34, 197, 94, 0.05);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  transition: transform 0.3s;
}

.card:hover .card-icon {
  transform: scale(1.2) rotate(5deg);
}

/* Pricing Specifics */
.tier-switcher {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(5px);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
  background: var(--primary);
  color: #020617;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.plan-group {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.plan-group.active {
  display: block;
  opacity: 1;
}

.plan.popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.05) 0%, rgba(30, 41, 59, 0.7) 100%);
}

.plan.popular:hover {
  box-shadow: 0 20px 40px rgba(34, 197, 94, 0.15), inset 0 0 20px rgba(34, 197, 94, 0.1);
}

.badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary);
  color: #020617;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 1.5rem 0;
  color: var(--text-main);
}

.price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.plan ul {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
  display: inline-block;
}

.plan ul li {
  margin: 0.8rem 0;
  color: #cbd5e1;
  font-size: 0.95rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 1rem;
  background: rgba(2, 6, 23, 0.8);
  border-top: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.footer-links {
  margin-top: 1rem;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Purchase Modal (Buy Now -> Discord ID -> Cashfree checkout)
   ========================================================================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease forwards;
}

.modal-box {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  max-width: 380px;
  width: 100%;
  text-align: left;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-box h3 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.modal-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-summary strong {
  color: var(--primary);
}

.modal-field {
  margin-bottom: 1.2rem;
}

.modal-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.modal-field input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 1rem;
}

.modal-field input:focus {
  outline: none;
  border-color: var(--primary);
}

.modal-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.modal-error {
  display: none;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--error);
  font-size: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.modal-error.show {
  display: block;
}

.modal-box .btn-primary {
  width: 100%;
  text-align: center;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(2, 6, 23, 0.3);
  border-top-color: #020617;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
