/* Modern Billing Page - Polished Design */

:root {
  --primary: #58cc02;
  --primary-dark: #46a302;
  --primary-light: #6dd604;
  --secondary: #1cb0f6;
  --accent: #ff9500;
  --dark: #1a1a1a;
  --gray: #4a5568;
  --light-gray: #e2e8f0;
  --lighter-gray: #f7fafc;
  --white: #ffffff;
  --danger: #f56565;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
  --gradient: linear-gradient(135deg, #58cc02 0%, #1cb0f6 100%);
  --gradient-soft: linear-gradient(135deg, rgba(88, 204, 2, 0.08) 0%, rgba(28, 176, 246, 0.08) 100%);
}

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

.billing-page {
  background: #fafbfc;
  color: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

/* Hero background - cleaner gradient */
.billing-hero-bg {
  position: absolute;
  inset: 0 0 auto 0;
  height: 380px;
  background: var(--gradient);
  overflow: hidden;
  z-index: 0;
}

.billing-hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #fafbfc);
}

.floating-bubbles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  opacity: 0.6;
}

.bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
  filter: blur(1px);
}

.bubble:nth-child(1) {
  width: 100px;
  height: 100px;
  left: 15%;
  animation-delay: 0s;
}

.bubble:nth-child(2) {
  width: 140px;
  height: 140px;
  left: 65%;
  animation-delay: 3s;
}

.bubble:nth-child(3) {
  width: 70px;
  height: 70px;
  left: 35%;
  animation-delay: 6s;
}

.bubble:nth-child(4) {
  width: 110px;
  height: 110px;
  left: 80%;
  animation-delay: 9s;
}

.bubble:nth-child(5) {
  width: 95px;
  height: 95px;
  left: 45%;
  animation-delay: 12s;
}

@keyframes float {
  0% {
    transform: translateY(100vh) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-120vh) scale(1.1);
    opacity: 0;
  }
}

/* Top navigation */
.billing-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.billing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.billing-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.5rem;
  transition: transform 0.2s;
}

.billing-logo:hover {
  transform: scale(1.02);
}

.billing-logo .logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.logo-emoji {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(88, 204, 2, 0.2));
}

.billing-actions {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  text-decoration: none;
  color: var(--gray);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

/* Main content area */
.billing-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5.5rem 2rem 4rem;
}

.billing-hero {
  margin-bottom: 3rem;
  padding-top: 2rem;
}

.hero-card {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  color: var(--white);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

/* Status display card - modern design */
.status-row {
  background: var(--white);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.status-left {
  flex: 1;
}

.status-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.status-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}

.status-pills {
  display: inline-flex;
  gap: 0.625rem;
  align-items: center;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.8125rem;
  background: rgba(88, 204, 2, 0.1);
  color: var(--primary-dark);
  border: 1px solid rgba(88, 204, 2, 0.2);
  letter-spacing: 0.3px;
}

.pill-blue {
  background: rgba(28, 176, 246, 0.1);
  border-color: rgba(28, 176, 246, 0.2);
  color: #0c5a7a;
}

.period-line {
  margin-top: 1rem;
  color: black;
  font-weight: 500;
  font-size: 0.9375rem;
}

.billing-error {
  margin-top: 1rem;
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9375rem;
}

/* Plans grid - modern card design */
.plans {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.plan-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 2rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(88, 204, 2, 0.15);
}

.plan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.plan-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.plan-desc {
  margin-top: 0.375rem;
  color: var(--gray);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.plan-price {
  text-align: right;
  flex-shrink: 0;
}

.price-amount {
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.price-unit {
  color: var(--gray);
  font-weight: 500;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.plan-features {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  flex-grow: 1;
}

.plan-features li {
  margin: 0.875rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--dark);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.125rem;
}

.plan-cta {
  margin-top: auto;
  display: grid;
  gap: 0.75rem;
}

.pro-cta {
  grid-template-columns: 1fr 1fr;
}

.pro-cta .btn-danger {
  grid-column: 1 / -1;
}

.cta-note {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray);
  text-align: center;
  padding-top: 0.5rem;
  line-height: 1.4;
}

/* PRO plan highlighting - premium look */
.plan-pro {
  background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}

.plan-pro:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.plan-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
  color: var(--white);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Button styles - modern and clean */
.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(88, 204, 2, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(88, 204, 2, 0.35);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(88, 204, 2, 0.05);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(245, 101, 101, 0.25);
}

.btn-danger:hover:not(:disabled) {
  background: #e53e3e;
  box-shadow: 0 4px 12px rgba(245, 101, 101, 0.35);
  transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive Design */
@media (max-width: 968px) {
  .billing-main {
    padding: 5rem 1.5rem 3rem;
  }

  .plans {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .pro-cta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .billing-nav-inner {
    padding: 1rem 1.25rem;
  }

  .billing-main {
    padding: 5rem 1.25rem 2.5rem;
  }

  .billing-hero {
    padding-top: 1.5rem;
    margin-bottom: 2.5rem;
  }

  .billing-hero-bg {
    height: 340px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .status-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .status-pills {
    width: 100%;
  }

  .plan-card {
    padding: 1.75rem;
  }

  .plan-head {
    flex-direction: column;
    gap: 0.5rem;
  }

  .plan-price {
    text-align: left;
  }

  .price-amount {
    font-size: 2.25rem;
  }

  .plan-badge {
    top: -10px;
    right: 20px;
    font-size: 0.7rem;
    padding: 0.4rem 1rem;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger {
    padding: 0.8125rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .billing-logo {
    font-size: 1.3rem;
  }

  .logo-emoji {
    font-size: 1.6rem;
  }

  .billing-actions {
    gap: 0.625rem;
  }

  .nav-link {
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.9375rem;
  }

  .status-row {
    padding: 1.25rem;
  }

  .status-label {
    font-size: 0.75rem;
  }

  .status-value {
    font-size: 1.125rem;
  }

  .pill {
    font-size: 0.75rem;
    padding: 0.4rem 0.875rem;
  }

  .bubble {
    display: none;
  }

  .plan-card {
    padding: 1.5rem;
  }

  .plan-title {
    font-size: 1.5rem;
  }

  .price-amount {
    font-size: 2rem;
  }

  .plan-features li {
    font-size: 0.875rem;
  }
}

@media (max-width: 374px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .price-amount {
    font-size: 1.75rem;
  }

  .plan-badge {
    font-size: 0.65rem;
    padding: 0.35rem 0.875rem;
  }
}
