/* ============================================================
   VouchCord Design System — globals.css
   ProBot-inspired dark UI with gradient purple accents
   ============================================================ */

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

/* ────────────────────────────────────────────────────────────
   1. CSS Reset
   ──────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ────────────────────────────────────────────────────────────
   2. Design Tokens (Custom Properties)
   ──────────────────────────────────────────────────────────── */

:root {
  /* Colors — Surfaces */
  --bg: #0a0a0f;
  --bg-secondary: #12121a;
  --panel: #16161f;
  --panel-hover: #1c1c2a;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);

  /* Colors — Text */
  --text: #e2e2e8;
  --text-muted: #8888a0;
  --text-bright: #ffffff;

  /* Colors — Brand / Accent */
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-dim: rgba(124, 58, 237, 0.15);
  --accent-light: #a855f7;

  /* Colors — Semantic */
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.15);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.15);
  --discord: #5865F2;
  --discord-hover: #4752c4;

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #7c3aed, #a855f7);
  --gradient-accent-hover: linear-gradient(135deg, #6d28d9, #9333ea);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.2) 0%, transparent 60%);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ────────────────────────────────────────────────────────────
   3. Typography
   ──────────────────────────────────────────────────────────── */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  color: var(--text);
  background-color: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  color: var(--text-muted);
  line-height: 1.7;
}

strong { font-weight: 600; }

small { font-size: 0.875rem; }

a:not(.btn) {
  color: var(--accent-light);
  transition: color var(--transition-fast);
}

a:not(.btn):hover {
  color: var(--accent);
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  padding: 2px 6px;
  background: var(--accent-dim);
  border-radius: 4px;
  color: var(--accent-light);
}

/* ────────────────────────────────────────────────────────────
   4. Layout
   ──────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-sm { max-width: 800px; }
.container-lg { max-width: 1400px; }

.section {
  padding: var(--space-3xl) 0;
}

.section-sm {
  padding: var(--space-2xl) 0;
}

/* ────────────────────────────────────────────────────────────
   5. Buttons
   ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: var(--shadow-sm), 0 0 12px rgba(124, 58, 237, 0.25);
}

.btn-primary:hover {
  background: var(--gradient-accent-hover);
  box-shadow: var(--shadow-md), 0 0 20px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--panel-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
}

.btn-discord:hover {
  background: var(--discord-hover);
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.35);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--panel);
  color: var(--text);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.0625rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-sm);
}

/* ────────────────────────────────────────────────────────────
   6. Cards
   ──────────────────────────────────────────────────────────── */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(124, 58, 237, 0.08);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.card-flat:hover {
  transform: none;
  box-shadow: none;
}

/* ────────────────────────────────────────────────────────────
   7. Badges
   ──────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-free {
  background: var(--success-dim);
  color: var(--success);
}

.badge-premium {
  background: var(--accent-dim);
  color: var(--accent-light);
}

.badge-danger {
  background: var(--danger-dim);
  color: var(--danger);
}

.badge-warning {
  background: var(--warning-dim);
  color: var(--warning);
}

.badge-discord {
  background: rgba(88, 101, 242, 0.15);
  color: var(--discord);
}

/* ────────────────────────────────────────────────────────────
   8. Forms
   ──────────────────────────────────────────────────────────── */

.input,
.select,
textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ────────────────────────────────────────────────────────────
   9. Flash / Alert Messages
   ──────────────────────────────────────────────────────────── */

.flash {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.flash-success {
  background: var(--success-dim);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.2);
}

.flash-error {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.flash-warning {
  background: var(--warning-dim);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.flash-info {
  background: rgba(88, 101, 242, 0.15);
  color: var(--discord);
  border-color: rgba(88, 101, 242, 0.2);
}

/* ────────────────────────────────────────────────────────────
   10. Tables
   ──────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  font-size: 0.9375rem;
}

.table th,
.table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
}

.table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.table td {
  border-bottom: 1px solid var(--border);
}

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

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--panel-hover);
}

/* ────────────────────────────────────────────────────────────
   11. Utility Classes
   ──────────────────────────────────────────────────────────── */

/* Text */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.text-bright  { color: var(--text-bright); }
.text-accent  { color: var(--accent-light); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-sm      { font-size: 0.875rem; }
.text-lg      { font-size: 1.125rem; }

/* Visibility */
.hidden     { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Flexbox */
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }

/* Gap */
.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* Responsive Grids */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Margin */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }

/* Padding */
.p-sm   { padding: var(--space-sm); }
.p-md   { padding: var(--space-md); }
.p-lg   { padding: var(--space-lg); }
.p-xl   { padding: var(--space-xl); }

/* Borders */
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Width */
.w-full { width: 100%; }

/* ────────────────────────────────────────────────────────────
   12. Animations
   ──────────────────────────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(124, 58, 237, 0.2); }
  50%      { box-shadow: 0 0 20px rgba(124, 58, 237, 0.45); }
}

.animate-in {
  animation: slideUp 0.5s var(--transition-base) both;
}

.animate-fade {
  animation: fadeIn 0.4s ease both;
}

.animate-scale {
  animation: scaleIn 0.3s ease both;
}

/* Stagger children — add .stagger to parent */
.stagger > * {
  animation: slideUp 0.5s ease both;
}
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }

/* Skeleton loading placeholder */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--panel) 25%,
    var(--panel-hover) 50%,
    var(--panel) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ────────────────────────────────────────────────────────────
   13. Scrollbar
   ──────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

/* ────────────────────────────────────────────────────────────
   14. Selection
   ──────────────────────────────────────────────────────────── */

::selection {
  background: var(--accent-dim);
  color: var(--text-bright);
}

/* ────────────────────────────────────────────────────────────
   15. Responsive Base
   ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  html { font-size: 15px; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  h3 { font-size: 1.25rem; }

  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-2xl) 0;
  }
}

@media (max-width: 480px) {
  html { font-size: 14px; }

  .btn-lg {
    padding: 12px 22px;
    font-size: 1rem;
  }
}
