/* Reset-ish */
* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { height: 100%; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; background: linear-gradient(180deg,#0f1724 0%, #0a0b0f 100%); color: #e6eef8; -webkit-font-smoothing:antialiased; }

:root{
  --accent1: linear-gradient(135deg,#7c3aed,#06b6d4);
  --muted: rgba(230,238,248,0.7);
  --card-bg: rgba(255,255,255,0.04);
  --glass: rgba(255,255,255,0.03);
  --glass-2: rgba(255,255,255,0.02);
  --primary: #7c3aed;
  --success: #10b981;
  --shadow: 0 10px 30px rgba(2,6,23,0.6);
}

/* Page layout */
.page { max-width: 1100px; margin: 28px auto; padding: 20px; }

.topbar{
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding: 12px 16px; background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border-radius: 12px; margin-bottom: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px) saturate(110%);
}

.brand { display:flex; align-items:center; gap:10px; color: #fff; font-weight:600; }
.brand svg { color: #fff; opacity:0.95; }
.brand .dot { color: var(--primary); font-weight:900; margin-left:2px; }

/* Toggle switch */
.toggle-wrap{ display:flex; align-items:center; gap:10px; font-size:14px; color:var(--muted); }
.small { opacity:0.9; font-size:13px; }
.switch { display:inline-block; width:52px; height:28px; position:relative; }
.switch input{ display:none; }
.switch .slider{
  position:absolute; inset:0; border-radius:999px; background:linear-gradient(90deg,#111827,#0b1220); box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.switch .slider::after{
  content:''; position:absolute; top:4px; left:4px; width:20px; height:20px; border-radius:50%; background:linear-gradient(180deg,#fff,#dcdcdc);
  transition: transform .28s cubic-bezier(.2,.9,.2,1);
  box-shadow: 0 6px 14px rgba(2,6,23,0.5);
}
.switch input:checked + .slider{ background: var(--accent1); }
.switch input:checked + .slider::after{ transform: translateX(24px); }

/* Hero */
.hero{ text-align:center; margin: 20px 0 28px; }
.hero h1{ font-size:1.6rem; letter-spacing: -0.4px; margin-bottom:6px; color:#fff; }
.hero .muted{ color:var(--muted); font-size:14px; }

/* Grid */
.pricing-grid{
  display:grid; grid-template-columns: repeat(3,1fr); gap:18px;
}

/* Card */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:16px; overflow:hidden; position:relative;
  border: 1px solid rgba(255,255,255,0.03);
  transition: transform .32s ease, box-shadow .32s ease;
  box-shadow: 0 8px 30px rgba(2,6,23,0.5);
}
.card:hover{ transform: translateY(-8px) scale(1.01); box-shadow: 0 22px 50px rgba(2,6,23,0.7); }

/* ribbon */
.ribbon{
  position:absolute; top:12px; left:12px; padding:6px 10px; border-radius:999px;
  background: linear-gradient(90deg,#111827,#0b1220); color:var(--muted); font-size:13px; z-index:2;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

/* highlight popular card */
.card.popular{
  background: linear-gradient(180deg, rgba(124,58,237,0.12), rgba(6,182,212,0.03));
  border: 1px solid rgba(124,58,237,0.25);
}
.card.popular .ribbon{ background: var(--accent1); color:#fff; }

/* body */
.card-body{ padding:28px 22px 30px; display:flex; flex-direction:column; gap:12px; min-height:320px; align-items:flex-start; }
.card-body h2{ font-size:20px; color:#fff; }
.price{ font-size:26px; font-weight:800; color:#fff; display:flex; align-items:baseline; gap:10px; }
.price .monthly, .price .yearly{ transition: opacity .28s, transform .28s; display:inline-block; }
.price .yearly{ opacity:0; transform: translateY(6px) scale(.98); color: #dbeafe; font-weight:700; font-size:20px; }

/* small per text */
.per{ color: var(--muted); font-size:12px; margin-left:4px; }

/* description & features */
.desc{ color: var(--muted); font-size:14px; }
.features{ list-style:none; margin-top:8px; display:flex; flex-direction:column; gap:8px; color:var(--muted); font-size:14px; }
.features li::before{ content:'•'; color: var(--primary); margin-right:8px; opacity:0.9; }

/* buttons */
.btn{ margin-top:auto; width:100%; text-align:center; padding:12px 14px; border-radius:12px; display:inline-block; text-decoration:none; font-weight:700;
  background: transparent; color: #fff; border:1px solid rgba(255,255,255,0.06); transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  backdrop-filter: blur(4px);
}
.btn:hover{ transform: translateY(-4px); box-shadow: 0 10px 30px rgba(2,6,23,0.6); }

/* primary button */
.btn-primary{
  background: linear-gradient(90deg,#7c3aed,#06b6d4);
  color: #fff; border: none;
  box-shadow: 0 8px 30px rgba(12,6,40,0.45), 0 0 20px rgba(99,102,241,0.12);
}
.btn-primary:hover{ filter:brightness(1.03); transform: translateY(-6px) scale(1.01); }

/* footer */
.foot{ text-align:center; margin-top:20px; color:var(--muted); font-size:13px; }

/* Toggle effect (CSS-only) */
/* When checkbox is checked (yearly), show .yearly prices and hide .monthly. We rely on the input placed earlier in DOM (topbar). Use :checked with general sibling + */
#billingToggle:checked ~ .hero ~ .pricing-grid .price .monthly { opacity:0; transform: translateY(6px) scale(.98); }
#billingToggle:checked ~ .hero ~ .pricing-grid .price .yearly { opacity:1; transform: translateY(0) scale(1); }

/* Also change per text to show yearly label */
#billingToggle:checked ~ .hero ~ .pricing-grid .price .per::after { content: ' /month billed yearly'; font-size:12px; display:block; margin-top:4px; color:var(--muted); }

/* Responsive */
@media (max-width: 880px){
  .pricing-grid{ grid-template-columns: repeat(2,1fr); }
  .page{ padding: 14px; }
  .hero h1{ font-size:1.3rem; }
}
@media (max-width: 560px){
  .pricing-grid{ grid-template-columns: 1fr; gap:14px; }
  .card-body{ padding:20px; min-height:300px; }
  .hero h1{ font-size:1.15rem; }
}

/* small animated accent on popular card */
.card.popular::after{
  content:''; position:absolute; right:-40px; top:40%; width:180px; height:180px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, rgba(124,58,237,0.22), transparent 40%),
              radial-gradient(circle at 70% 70%, rgba(6,182,212,0.14), transparent 40%);
  filter: blur(20px); transform:translateY(-50%); z-index:0; pointer-events:none; animation: float 6s ease-in-out infinite;
}
@keyframes float{
  0%{ transform: translateY(-50%) rotate(0deg); }
  50%{ transform: translateY(-60%) rotate(6deg); }
  100%{ transform: translateY(-50%) rotate(0deg); }
}

/* Accessibility tweaks */
.card:focus-within{ outline: 3px solid rgba(124,58,237,0.12); outline-offset:4px; }
