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

:root {
  --primary: #0066ff;
  --primary-dark: #0052cc;
  --secondary: #f0f2f5;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
  color: var(--text-primary);
  background-color: #fafafa;
}

.header {
  background: white;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.pricing-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Plans Section */
.plans-section {
  margin-bottom: 60px;
}

.plans-header {
  text-align: center;
  margin-bottom: 50px;
}

.plans-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.plans-header .subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.error-message {
    background: #fee;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Simplify layout to exactly match design image */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 1200px) {
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Recommended card styling - matches design with warning border and badge */
.plan-card.recommended {
  border: 2px solid var(--warning);
  box-shadow: 0 0 0 1px var(--warning);
  transform: scale(1.02);
}

.plan-card.recommended:hover {
  box-shadow: 0 0 0 1px var(--warning), var(--shadow-lg);
}

.plan-card.current {
  border-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(16, 185, 129, 0.01) 100%);
}

/* Plan category styling - small gray uppercase text */
.plan-category {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.recommended-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warning);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.plan-header {
  margin-bottom: 20px;
  text-align: center;
}

.plan-purpose {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
  justify-content: flex-start;
  display: flex;
}

.plan-name {
  font-size: 24px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 8px;
  justify-content: flex-start;
  display: flex;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 3px;
  margin-bottom: 0;
}

.plan-price .currency {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
}

.plan-price .amount {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* .plan-price .period {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 2px;
} */

.plan-features {
  margin-top: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 13px;
}

.feature-item i {
  color: var(--text-secondary);
  width: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 12px;
}

.plan-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-action-text {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.upgrade-link {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-style: italic;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

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

.current-plan-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--success);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  width: 100%;
}

.help-section {
  text-align: center;
  padding: 20px;
  background: var(--secondary);
  border-radius: 12px;
}

.help-section p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.help-section a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.help-section a:hover {
  text-decoration: underline;
}

.gradient-text {
  font-size: 15px;
  font-weight: 700;
  /* background: linear-gradient(90deg, #ff4edb, #4d7fff); */
  /* -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; */
}

.billing-display {
  color: var(--text-primary);
  margin-top: 8px;
  text-align: center;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.tab-switcher {
    text-align: center;
    margin-bottom: 25px;
}

.tab-btn {
    border: none;
    padding: 10px 22px;
    margin: 0 8px;
    border-radius: 8px;
    font-weight: 600;
    background: #eee;
    cursor: pointer;
    transition: 0.2s;
}

.tab-btn.active {
    background: #007bff;
    color: #fff;
}

.subscription-box.active {
    max-width: 600px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #53cd8e;
    border-radius: 12px;
    padding: 24px;
}

.subscription-box.expired {
    max-width: 600px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #e74141;
    border-radius: 12px;
    padding: 24px;
}

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

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

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.active {
    background: #1f7a3c;
    color: #a6f4c5;
}

.status-badge.expired {
    background: #e74141;
    color: #ffffff;
}

.subscription-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.subscription-row .label {
    color: #000000;
}

.subscription-row .value {
    font-weight: 600;
}

.subscription-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.subscription-empty {
    text-align: center;
    margin-top: 60px;
}

/* Subscription progress container */
.subscription-box .progress {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0;
}

/* Progress bar */
.subscription-box .progress-bar {
    background: linear-gradient(90deg, #4cafef, #00c6ff); /* gradient */
    height: 100%;
    transition: width 0.5s ease;
}

/* Optional: % text inside progress */
.subscription-box .progress-bar::after {
    content: attr(aria-valuenow) '%';
    display: inline-block;
    color: white;
    font-weight: bold;
    position: absolute;
    right: 10px;
    top: 0;
    height: 100%;
    line-height: 20px;
}

.subscription-box .progress-text {
    color: #000000;
    text-align: right;
    font-size: 12px;
    margin-top: 4px;
}