/* Glitch Art - Main Styles */
:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --accent-cyan: #22d3ee;
  --accent-pink: #f472b6;
  --accent-amber: #fbbf24;
  --bg-dark: #0f0a1e;
  --bg-card: #1a1333;
  --bg-input: #251b44;
  --text: #f5f3ff;
  --text-muted: #a78bfa;
  --border: rgba(167, 139, 250, 0.2);
  --error: #f87171;
  --success: #34d399;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(124, 58, 237, 0.15);
  --shadow-lg: 0 8px 40px rgba(124, 58, 237, 0.25);
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.2), transparent),
    radial-gradient(ellipse 50% 30% at 90% 20%, rgba(34, 211, 238, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 10% 80%, rgba(244, 114, 182, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(109, 40, 217, 0.1), transparent),
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(124, 58, 237, 0.1), transparent);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #c4b5fd;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.3s, transform 0.3s;
}

.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-error {
  background: linear-gradient(135deg, #451a1a 0%, #7f1d1d 100%);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.toast-success {
  background: linear-gradient(135deg, #052e16 0%, #14532d 100%);
  color: #bbf7d0;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.nav-brand i {
  color: var(--primary);
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.5));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

.nav-link:hover {
  background: rgba(124, 58, 237, 0.2);
  color: var(--primary-light);
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

.user-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.15) 100%);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
}

.user-vip-badge i {
  color: #fbbf24;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5), 0 0 0 1px rgba(167, 139, 250, 0.2);
}

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

.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--primary);
}

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

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-input::placeholder {
  color: rgba(167, 139, 250, 0.5);
}

/* Card */
.card {
  background: linear-gradient(145deg, rgba(26, 19, 51, 0.95) 0%, rgba(21, 14, 42, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.3), transparent);
  opacity: 0.6;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Page layout */
.page {
  max-width: 480px;
  margin: 60px auto;
  padding: 0 24px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

/* Payment return banner */
.payment-banner {
  padding: 16px 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.payment-banner.success {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: var(--success);
}

.payment-banner.error {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: var(--error);
}

.payment-banner i {
  font-size: 1.25rem;
}

.page-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.form-link {
  font-size: 14px;
}

main, .page, .glitch-page, .pricing-page, .settings-page {
  position: relative;
  z-index: 1;
}

.site-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  position: relative;
  z-index: 1;
  margin-top: 60px;
}

.site-footer .footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.site-footer .footer-links a {
  color: var(--primary-light);
}

.site-footer .footer-links a:hover {
  color: var(--primary);
}

.site-footer .footer-links span {
  color: var(--border);
}
