/* ─── GlossIO Global Styles ─────────────────────────────────────────────────── */

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

:root {
  --bg: #0A0A0F;
  --bg-card: #111118;
  --bg-sidebar: #0D0D15;
  --bg-input: #0D0D15;
  --bg-hover: #1a1a2e;
  --border: #1E1E2E;
  --border-light: #2a2a3e;

  --primary: #00C2FF;
  --secondary: #A259FF;
  --highlight: #FF6B35;
  --gold: #FFD60A;
  --success: #00E5A0;
  --danger: #FF3366;

  --text: #F0EDE8;
  --text-muted: #888888;
  --text-dim: #666666;
  --text-faint: #555555;

  --font-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

html, body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* Reset inputs */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Input base style */
.input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 15px;
  transition: border-color 0.2s;
}

.input:focus { border-color: var(--primary); }
.input::placeholder { color: var(--text-faint); }

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.1s;
  cursor: pointer;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

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

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

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pending    { background: rgba(255,107,53,0.15); color: var(--highlight); }
.badge-confirmed  { background: rgba(0,194,255,0.15);  color: var(--primary); }
.badge-complete   { background: rgba(0,229,160,0.15);  color: var(--success); }
.badge-cancelled  { background: rgba(255,51,102,0.15); color: var(--danger); }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* Focus ring */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin { to { transform: rotate(360deg); } }

.animate-fade-in { animation: fadeIn 0.3s ease forwards; }
.animate-slide-up { animation: slideUp 0.4s ease forwards; }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Safe area (notched devices) */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* ─── Scroll Reveal ──────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Button Hover Effects ───────────────────────────────────────────────── */
button:not(:disabled):hover,
.auth-btn:not(.auth-btn-disabled):hover {
  filter: brightness(1.1);
}
button:not(:disabled):active,
.auth-btn:not(.auth-btn-disabled):active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* ─── Focus Visible ──────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
