/* BosePresets - App Styles */
:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-hover: #243044;
  --border: #2d3a4d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --error: #f85149;
  --radius: 8px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}
.nav a {
  margin-left: 1rem;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
button,
.btn {
  font-family: inherit;
  font-size: 1rem;
}
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}
label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.form-group {
  margin-bottom: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.btn-danger {
  background: var(--error);
  color: #fff;
}
.btn-danger:hover {
  opacity: 0.9;
}
.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.auth-box h1 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}
.auth-box .btn {
  width: 100%;
  margin-top: 0.5rem;
}
.message {
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.message-error {
  background: rgba(248, 81, 73, 0.15);
  color: var(--error);
  border: 1px solid rgba(248, 81, 73, 0.3);
}
.message-success {
  background: rgba(63, 185, 80, 0.15);
  color: var(--success);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

/* Dashboard */
.dashboard {
  padding: 2rem 0;
}
.presets-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}
.preset-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.preset-slot.empty {
  opacity: 0.85;
}
.preset-slot .info {
  flex: 1;
  min-width: 0;
}
.preset-slot .title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.preset-slot .url {
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
}
.preset-slot .actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.preset-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

/* Radio browser */
.radio-section {
  margin-top: 2rem;
}
.radio-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.radio-filters input {
  flex: 1;
  min-width: 200px;
}
.stations-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}
.station-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.station-item:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}
.station-item.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}
.station-item .favicon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--border);
  object-fit: cover;
}
.station-item .meta {
  flex: 1;
  min-width: 0;
}
.station-item .name {
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.station-item .details {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  animation: toast-in 0.2s ease;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
}
.modal h3 { margin: 0 0 1rem; }
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* Landing */
.hero {
  text-align: center;
  padding: 4rem 2rem;
}
.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 1rem;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 540px;
  margin: 0 auto 2rem;
}
.hero .btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* 404 */
.not-found {
  text-align: center;
  padding: 4rem 2rem;
}
.not-found h1 { font-size: 4rem; margin: 0; color: var(--text-muted); }
.not-found p { margin: 1rem 0; }
