/* Subscription Page Styles */

.subscription-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  animation: fadeIn 0.5s ease-in;
}

.subscription-header {
  text-align: center;
  margin-bottom: 3rem;
}

.subscription-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.subscription-header p {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* Current Subscription Banner */
.current-subscription-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.current-subscription-info.premium {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.current-subscription-info.pro {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.subscription-badge {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subscription-details p {
  margin: 0.25rem 0;
}

.subscription-details .warning {
  color: #ffd700;
  font-weight: bold;
}

.subscription-actions {
  display: flex;
  gap: 1rem;
}

.btn-cancel,
.btn-reactivate {
  padding: 0.75rem 1.5rem;
  border: 2px solid white;
  background: transparent;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-reactivate:hover {
  background: white;
  color: #667eea;
}

/* Pricing Cards */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.pricing-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  border: 2px solid var(--border-color);
  transition: all 0.3s;
  animation: slideInUp 0.3s ease-out;
}

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

.pricing-card.premium-tier {
  border-color: #f5576c;
}

.pricing-card.premium-tier:hover {
  border-color: #f5576c;
  box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
}

.pricing-card.pro-tier {
  border-color: #00f2fe;
}

.pricing-card.pro-tier:hover {
  border-color: #00f2fe;
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.3);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  border: 2px solid var(--border-color);
  color: var(--text-primary);
}

.plan-badge.popular {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border-color: #f5576c;
}

.plan-badge.best-value {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border-color: #00f2fe;
}

.pricing-card h2 {
  text-align: center;
  font-size: 2rem;
  margin: 1rem 0;
}

.price {
  text-align: center;
  margin: 1.5rem 0;
}

.price .amount {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.pricing-card .features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.pricing-card .features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-card .features li:last-child {
  border-bottom: none;
}

.pricing-card .features i {
  color: var(--success);
  font-size: 1.1rem;
}

.pricing-card .features li strong {
  color: var(--primary-light);
}

.subscribe-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 1rem;
}

.subscribe-btn.premium {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.subscribe-btn.pro {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.subscribe-btn.current {
  background: var(--border-color);
  color: #888;
  cursor: not-allowed;
}

.subscribe-btn:not(.current):hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Feature Comparison Table */
.feature-comparison {
  margin: 3rem 0;
}

.feature-comparison h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.feature-comparison table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feature-comparison thead {
  background: var(--primary);
  color: white;
}

.feature-comparison th,
.feature-comparison td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.feature-comparison th:first-child,
.feature-comparison td:first-child {
  text-align: left;
  font-weight: bold;
}

.feature-comparison tbody tr:hover {
  background: var(--bg-tertiary);
}

.feature-comparison .text-success {
  color: var(--success);
  font-size: 1.2rem;
}

.feature-comparison .text-danger {
  color: var(--danger);
  font-size: 1.2rem;
}

/* Billing History */
.billing-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.billing-section h2 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

.billing-table thead {
  background: var(--primary);
  color: white;
}

.billing-table th,
.billing-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.billing-table tbody tr:hover {
  background: var(--bg-tertiary);
}

/* Payment Modal */
.subscription-modal {
  max-width: 600px;
}

#payment-element {
  margin: 1.5rem 0;
}

.payment-message {
  color: var(--danger);
  margin: 1rem 0;
  text-align: center;
  font-weight: bold;
}

/* Management Section */
.management-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.management-section h2 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .pricing-cards {
    grid-template-columns: 1fr;
  }

  .current-subscription-info {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .subscription-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-cancel,
  .btn-reactivate {
    width: 100%;
  }

  .subscription-header h1 {
    font-size: 2rem;
  }

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

/* Success/Error States */
.subscription-success {
  background: var(--success);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.subscription-error {
  background: var(--danger);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

/* Subscription Tier Badges */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
}

.tier-badge.free {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.tier-badge.premium {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.tier-badge.pro {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 242, 254, 0.3);
}

.tier-badge i {
  font-size: 0.875rem;
}

/* Profile Badge Integration */
.profile-header .tier-badge {
  margin-left: 0.5rem;
}

/* Leaderboard Badge */
.player-info .tier-badge {
  margin-left: 0.5rem;
}

/* Tournament Access Badge */
.tournament-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.tournament-access-badge i {
  font-size: 1rem;
}
