@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-color: #0d0e12;
  --text-color: #f3f4f6;
  --text-muted: #9ca3af;
  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(99, 102, 241, 0.15);

  --primary: #6366f1; /* Indigo */
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);

  --secondary: #06b6d4; /* Cyan */
  --secondary-hover: #0891b2;
  --secondary-glow: rgba(6, 182, 212, 0.4);

  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.15);
  --error-border: rgba(239, 68, 68, 0.3);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.3);

  --radius-lg: 16px;
  --radius-md: 10px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 2rem 1rem;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Background overlay elements for subtle animated glows */
body::before, body::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(150px);
  opacity: 0.5;
  pointer-events: none;
}
body::before {
  top: 10%;
  left: 5%;
  background: var(--primary);
}
body::after {
  bottom: 10%;
  right: 5%;
  background: var(--secondary);
}

/* Layout container */
.container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Glass panel wrapper */
.card-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 0 40px var(--glass-glow);
  width: 100%;
  transition: var(--transition);
}

/* Brand header */
.header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 400;
}

/* Forms & inputs */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  letter-spacing: 0.025em;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
  background: rgba(17, 24, 39, 0.95);
}

/* Validation status styles */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.validation-status {
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-weight: 500;
  display: none;
}

.validation-status.valid {
  color: var(--success);
  display: block;
}

.validation-status.invalid {
  color: var(--error);
  display: block;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

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

.tier-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(31, 41, 55, 0.4);
  padding: 2rem 1.5rem;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.tier-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(31, 41, 55, 0.6);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.tier-card.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.15);
}

/* Premium Highlight */
.tier-card.premium-highlight {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.4) 0%, rgba(6, 182, 212, 0.05) 100%);
}

.tier-card.premium-highlight.selected {
  border-color: var(--secondary);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.15);
}

.tier-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--secondary);
  color: var(--bg-color);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tier-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.tier-price {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.tier-price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.tier-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.tier-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tier-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

.tier-card.selected .tier-features li::before {
  color: inherit;
}

/* Radio button replacement layout */
.tier-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  background: var(--primary-hover);
}

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

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

.btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-delete {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: #fecaca;
}

.btn-delete:hover {
  background: var(--error);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
  width: auto;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
}

.alert.error {
  background: var(--error-bg);
  color: #fecaca;
  border-color: var(--error-border);
}

.alert.success {
  background: var(--success-bg);
  color: #d1fae5;
  border-color: var(--success-border);
}

/* Tables for admin */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

th {
  background: rgba(17, 24, 39, 0.8);
  font-weight: 600;
  color: #fff;
}

tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.status {
  display: inline-flex;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status.active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.status.used {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

/* Form checkmarks support (accent-color fallback) */
body {
  accent-color: var(--primary);
}

@supports not (accent-color: var(--primary)) {
  /* Provide custom checkbox and radio fallback styling if needed */
}
