/* ========================================================
   DISCX DESIGN SYSTEM - BASE & TOKENS
   ======================================================== */
:root {
  --bg-darkest: #070B14;
  --bg-primary: #0B1020;
  --bg-secondary: #101728;
  --bg-tertiary: #151D32;
  --bg-card: #18223C;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(255, 255, 255, 0.08);

  --accent-blue: #4C6FFF;
  --accent-indigo: #6C63FF;
  --accent-purple: #7C4DFF;
  --accent-magenta: #9B5CFF;
  --accent-gradient: linear-gradient(135deg, #4C6FFF 0%, #6C63FF 50%, #9B5CFF 100%);
  --accent-glow: 0 0 20px rgba(108, 99, 255, 0.35);

  --status-online: #10B981;
  --status-idle: #F59E0B;
  --status-dnd: #EF4444;
  --status-offline: #6B7280;

  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-link: #60A5FA;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(108, 99, 255, 0.6);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app-root {
  height: 100vh;
  width: 100vw;
  display: flex;
  overflow: hidden;
  background-color: var(--bg-darkest);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  outline: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.3);
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: #EF4444;
  color: #ffffff;
}

/* Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.input-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-field {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  outline: none;
}

.input-field.no-icon {
  padding-left: 14px;
}

.input-field:focus {
  border-color: var(--accent-indigo);
  background: var(--bg-tertiary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* Loading Screen */
.app-loading-screen {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: radial-gradient(circle at center, #101728 0%, #070B14 100%);
}

.glow-logo {
  animation: pulse-glow 2s infinite alternate ease-in-out;
  border-radius: 14px;
}

@keyframes pulse-glow {
  0% { transform: scale(0.98); filter: drop-shadow(0 0 10px rgba(108, 99, 255, 0.4)); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(155, 92, 255, 0.8)); }
}

.loading-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-size: 14px;
  min-width: 280px;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success { border-left: 4px solid var(--status-online); }
.toast.toast-error { border-left: 4px solid var(--status-dnd); }
.toast.toast-info { border-left: 4px solid var(--accent-blue); }

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-live {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.badge-hd {
  background: rgba(76, 111, 255, 0.2);
  color: #60A5FA;
  border: 1px solid rgba(76, 111, 255, 0.4);
}

.badge-owner {
  color: #FBBF24;
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  animation: fadeIn 0.2s ease;
}

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