/* _base.css */

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  position: relative;
  overflow-x: hidden;
  height: 100%;
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Typography Utilities */
.muted {
  color: var(--text-muted) !important;
}

.small-muted {
  color: var(--text-muted);
  font-size: 13px;
}

/* Generic Button Classes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-norm);
  cursor: pointer;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-muted);
  padding: 10px 20px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Global Form Elements (Dark Theme) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="search"],
select,
textarea {
  padding: 12px 16px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary), 0 0 12px var(--accent-glow);
}

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

select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 28px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
