/* src/options/options.css */

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

:root {
  --primary: #6366f1;
  --primary-light: #eef2ff;
  --danger: #ef4444;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 12px;
  --sidebar-w: 200px;
}

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

.page {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: #1e1b4b;
  color: #c7d2fe;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}

.sidebar__name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.sidebar__sub {
  font-size: 10px;
  color: #a5b4fc;
  letter-spacing: 0.04em;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  color: #c7d2fe;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: rgba(165, 180, 252, 0.12);
  color: #fff;
}

.nav-item--active {
  background: rgba(165, 180, 252, 0.2);
  color: #fff;
}

/* Content area */
.content {
  flex: 1;
  padding: 32px 40px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Save banner */
.save-banner {
  position: fixed;
  top: 16px;
  right: 24px;
  background: #22c55e;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  z-index: 100;
  transition: opacity 0.3s;
}

.save-banner.hidden {
  display: none;
}

.access-notice {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #fca5a5;
  background: #fff1f2;
  color: #9f1239;
}

.access-notice a {
  color: #be123c;
  text-decoration: underline;
}

.access-notice.hidden {
  display: none;
}

/* Card */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.card__desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -10px;
}

/* Field */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field__hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Badge */
.badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  padding: 1px 8px;
  min-width: 24px;
  text-align: center;
  display: inline-block;
}

.badge--gray {
  background: #6b7280;
}

/* Slider */
.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.4);
  cursor: pointer;
}

/* Score guide */
.score-guide {
  display: flex;
  gap: 8px;
}

.score-guide__item {
  flex: 1;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  font-size: 11px;
  font-weight: 600;
}

.score-guide__item--green {
  background: #dcfce7;
  color: #15803d;
}

.score-guide__item--amber {
  background: #fef9c3;
  color: #b45309;
}

.score-guide__item--red {
  background: #fee2e2;
  color: #b91c1c;
}

/* Mode list */
.mode-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mode-option {
  cursor: pointer;
}

.mode-option input {
  display: none;
}

.mode-option__inner {
  display: block;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s;
}

.mode-option input:checked+.mode-option__inner {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Domain section */
.add-domain-row {
  display: flex;
  gap: 8px;
}

.text-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

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

.domain-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 20px;
}

.domain-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 13px;
}

.domain-tag__remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  font-family: inherit;
}

.empty-state {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0;
}

/* Privacy */
.info-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: #15803d;
}

.info-box ul {
  margin-top: 6px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cache-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* About */
.about-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 12px;
  color: #92400e;
}

.about-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.about-meta span {
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.85;
}

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

.btn--lg {
  padding: 11px 28px;
  font-size: 14px;
}

.btn--ghost {
  background: none;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn--danger-outline {
  background: #fff;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}

/* Footer */
.footer {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 32px;
}
