:root {
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* HSL Color Palette */
  /* Light Theme Color Palette */
  --bg-main: 220, 33%, 98%; /* #f8fafc */
  --card-bg: 0, 0%, 100%; /* #ffffff */
  --primary: 235, 86%, 65%; /* #5A67D8 */
  --primary-glow: 235, 86%, 65%, 0.1;
  --secondary: 210, 100%, 50%; /* #007bff */
  --success: 142, 71%, 45%;
  --warning: 38, 92%, 50%;
  --error: 350, 89%, 60%;
  --text-main: 222, 47%, 11%; /* #0f172a */
  --text-muted: 215, 16%, 47%; /* #64748b */
  --border-color: 214, 32%, 91%; /* #e2e8f0 */
}

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

body {
  font-family: var(--font-primary);
  background-color: hsl(var(--bg-main));
  color: hsl(var(--text-main));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  background-image: linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Background Gradients & Glows - Removed for light theme clean look */
.glow-bg { display: none; }
.stars-overlay { display: none; }

/* Top Navbar */
.top-nav {
  width: 100%;
  background: #ffffff;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 40px;
  border-radius: 0 0 16px 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: hsl(var(--text-main));
}

.nav-logo-icon {
  width: 24px;
  height: 24px;
  background: hsl(var(--primary));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px 12px 6px 6px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: hsl(var(--text-muted));
}

.nav-user-avatar {
  width: 24px;
  height: 24px;
  background: hsl(var(--primary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 500px;
  padding: 16px;
  z-index: 1;
  transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.container.wide {
  max-width: 960px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, hsl(var(--text-main)) 0%, hsla(var(--text-main), 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1.5px;
}

.subtitle {
  font-size: 1rem;
  color: hsl(var(--text-muted));
  margin-top: 8px;
  letter-spacing: 0.5px;
  font-weight: 400;
}

/* Glassmorphism Card Base */
.card {
  background: hsl(var(--card-bg));
  border: 1px solid hsl(var(--border-color));
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.03);
}

.dashboard.card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.card:hover {
  border-color: rgba(0, 0, 0, 0.1);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  text-align: center;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: -0.5px;
}

.description {
  color: hsl(var(--text-muted));
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 32px;
}

/* Forms & Inputs */
.input-group {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: hsl(var(--text-muted));
}

input[type="email"], input[type="text"] {
  background: #ffffff;
  border: 1px solid hsl(var(--border-color));
  border-radius: 12px;
  color: hsl(var(--text-main));
  font-family: var(--font-primary);
  font-size: 1rem;
  padding: 16px 20px;
  transition: all 0.2s;
  width: 100%;
}

input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.15);
}

/* Buttons */
.btn {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.btn-primary {
  background: hsl(var(--primary));
  color: #ffffff;
  box-shadow: 0 8px 20px hsla(var(--primary), 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px hsla(var(--primary), 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: #e2e8f0;
  color: hsl(var(--text-main));
}

.btn-secondary:hover:not(:disabled) {
  background: #cbd5e1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Hidden old user bar elements since we moved them to Top Nav */
.user-bar { display: none; }

/* Stats Cards */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid hsl(var(--border-color));
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.8rem;
  color: hsl(var(--text-muted));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 4px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: flex-start;
}

.tab-btn {
  background: #f1f5f9;
  border: none;
  color: hsl(var(--text-muted));
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn.active {
  background: hsl(var(--primary));
  color: #fff;
  box-shadow: 0 4px 12px hsla(var(--primary), 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active-content {
  display: block;
}

.tab-desc {
  font-size: 0.9rem;
  color: hsl(var(--text-muted));
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Dynamic Grid (Stacked Layout) */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Item Options (Coins or Plans) */
.item-card {
  background: #ffffff;
  border: 1px solid hsl(var(--border-color));
  border-radius: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
  gap: 16px;
}

.item-card:hover {
  border-color: hsl(var(--primary));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.item-card.selected {
  background: hsla(var(--primary-glow));
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary)), 0 4px 12px hsla(var(--primary), 0.1);
}

.item-card.selected .coin-check-icon {
  opacity: 1 !important;
  transform: scale(1) !important;
}

.item-card.selected {
  background: hsla(var(--primary-glow));
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary)), 0 10px 30px hsla(var(--primary), 0.2);
}

.item-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(var(--primary)) 100%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.item-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-desc {
  font-size: 0.85rem;
  color: hsl(var(--text-muted));
  line-height: 1.4;
  margin-bottom: 0px;
}

.item-price-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.item-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: hsl(var(--text-main));
}

.item-original-price {
  font-size: 0.8rem;
  text-decoration: line-through;
  color: hsl(var(--text-muted));
}

.item-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid hsl(var(--border-color));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.item-radio-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: hsl(var(--primary));
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.item-card.selected .item-radio {
  border-color: hsl(var(--primary));
}

.item-card.selected .item-radio-inner {
  opacity: 1;
  transform: scale(1);
}



/* Order Summary */
.summary-card {
  margin-top: 32px;
  background: #ffffff;
  border: 1px solid hsl(var(--border-color));
  border-radius: 16px;
  padding: 24px;
}

.summary-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: hsl(var(--text-main));
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: hsl(var(--text-muted));
  margin-bottom: 12px;
}

.summary-line.discount {
  color: hsl(var(--success));
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid hsl(var(--border-color));
  margin: 16px 0;
}

.summary-line.total {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: hsl(var(--primary));
  margin-bottom: 24px;
}

/* Coupon Styling */
.coupon-section {
  margin-bottom: 20px;
}

.coupon-input-group {
  display: flex;
  gap: 12px;
}

.coupon-input-group input {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.coupon-input-group .btn {
  width: auto;
  padding: 12px 24px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.coupon-msg {
  font-size: 0.8rem;
  margin-top: 8px;
  font-weight: 600;
}

.coupon-msg.success-msg {
  color: hsl(var(--success));
}

.coupon-msg.error-msg {
  color: hsl(var(--error));
}

.btn-pay {
  margin-top: 16px;
}

/* Success Card */
.success-card {
  text-align: center;
}

.success-details, .verify-details {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
  border-radius: 16px;
  margin-top: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
}

.success-details strong, .verify-details strong {
  color: hsl(var(--text-muted));
}

/* Loaders & Spinners */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s ease-in-out infinite;
}

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

.verify-card {
  text-align: center;
}

.verify-loader {
  width: 50px;
  height: 50px;
  position: relative;
  margin: 0 auto 24px;
}

.double-bounce1, .double-bounce2 {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: hsl(var(--primary));
  opacity: 0.6;
  position: absolute;
  top: 0;
  left: 0;
  animation: sk-bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
  animation-delay: -1.0s;
  background-color: hsl(var(--secondary));
}

@keyframes sk-bounce {
  0%, 100% { transform: scale(0.0) }
  50% { transform: scale(1.0) }
}

/* Checkmark animation */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.success-checkmark .check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid hsl(var(--success));
}

.success-checkmark .check-icon::before, .success-checkmark .check-icon::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 120px;
  background: hsl(var(--bg-main));
  transform: rotate(45deg);
}

.success-checkmark .check-icon::before {
  border-radius: 120px 0 0 120px;
  top: -7px;
  left: -30px;
  transform-origin: 60px 60px;
  transform: rotate(-45deg);
}

.success-checkmark .check-icon::after {
  border-radius: 0 120px 120px 0;
  top: -8px;
  left: 30px;
  transform-origin: 0px 60px;
  transform: rotate(-45deg);
}

.success-checkmark .check-icon .icon-line {
  height: 5px;
  background-color: hsl(var(--success));
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
  top: 46px;
  left: 19px;
  width: 25px;
  transform: rotate(45deg);
}

.success-checkmark .check-icon .icon-line.line-long {
  top: 38px;
  right: 15px;
  width: 47px;
  transform: rotate(-45deg);
}

.success-checkmark .check-icon .icon-circle {
  top: -4px;
  left: -4px;
  position: absolute;
  box-sizing: content-box;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid rgba(76, 175, 80, 0.2);
  z-index: 1;
}

.success-checkmark .check-icon .icon-fix {
  top: 8px;
  left: 28px;
  width: 5px;
  height: 85px;
  position: absolute;
  z-index: 1;
  transform: rotate(-45deg);
}

/* Utils classes */
.hide {
  display: none !important;
}

.error-msg {
  color: hsl(var(--error));
  font-size: 0.9rem;
  margin-top: 16px;
  text-align: center;
  font-weight: 600;
}

.status-pending {
  color: hsl(var(--warning));
  font-weight: 700;
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dynamic Benefits & Features Card styling */
.benefits-card {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 32px;
  text-align: left;
}
.benefits-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #FBBF24;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.benefits-card p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 20px;
}
.benefits-card strong {
  color: hsl(var(--text-main));
}
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.benefit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-radius: 12px;
}
.benefit-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.benefit-icon {
  font-size: 1.25rem;
}
.benefit-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: hsl(var(--text-main));
}
.benefit-sub {
  font-size: 0.75rem;
  color: hsl(var(--text-muted));
  display: block;
  margin-top: 2px;
}
.benefit-cost {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #FBBF24;
}

.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 24px;
  padding: 0;
  text-align: left;
}
.features-list li {
  font-size: 0.85rem;
  color: hsl(var(--text-muted));
  display: flex;
  align-items: center;
  gap: 10px;
}
.features-list li .check-icon {
  color: #10B981;
  font-weight: 900;
}

/* Plan Benefits specific styles (Green Accent) */
.benefits-card.plan-benefits {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.15);
}
.benefits-card.plan-benefits h4 {
  color: #10B981;
}
.benefits-card.plan-benefits .benefit-cost {
  color: #10B981;
}

