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

:root {
  --bg:     #1a1a1a;
  --panel:  #262626;
  --panel2: #1f1f1f;
  --text:   #e2e2e2;
  --muted:  #9ca3af;
  --muted2: #6b7280;
  --line:   #3a3a3a;
  --accent:  #8B0000;
  --accent2: #5e0000;
  --gold:     #C5A059;
  --gold-dim: #9a7540;
  --radius:  12px;
  --radius2: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: 'Noto Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html:not(.dark) {
  --bg:     #E5E5E5;
  --panel:  #ffffff;
  --panel2: #F2F2F2;
  --text:   #0F0F0F;
  --muted:  #4b5563;
  --muted2: #6b7280;
  --line:   #d1d5db;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

.container {
  width: 100%;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 2.2em;
}

.subtitle {
  text-align: center;
  margin-bottom: 20px;
  color: var(--muted2);
  font-size: 12px;
}

.subtitle a {
  color: var(--muted2);
  text-decoration: none;
}

.subtitle a:hover {
  color: var(--accent);
}

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

.page > .container {
  flex: 1;
}

.shared-header {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.22), rgba(20, 20, 20, 0.95));
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  box-shadow: var(--shadow);
}

html:not(.dark) .shared-header {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.10), rgba(229, 229, 229, 0.98));
}

.shared-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
}

.shared-header__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shared-header__title {
  text-align: left;
  margin: 0;
}

.shared-header__subtitle {
  text-align: left;
  margin: 0;
}

.shared-header__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.shared-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
}

.shared-header__auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shared-header__auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0F0F0F;
  border-radius: 8px;
  padding: 4px 10px;
  border: 1px solid transparent;
}

.shared-header__auth-user[hidden] {
  display: none;
}

.shared-header__auth-link[hidden] {
  display: none;
}

.shared-header__auth-label {
  font-size: 0.75rem;
  color: #9ca3af;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.shared-header__auth-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e2e2;
}

.shared-header__links a {
  color: #e2e2e2;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #0F0F0F;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.shared-header__auth-link {
  color: #e2e2e2;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #0F0F0F;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.shared-header__auth-link:hover,
.shared-header__links a:hover {
  border-color: var(--accent);
  color: #e2e2e2;
  background: #1a1a1a;
}

.shared-header__auth-button {
  border: 0;
  background: #0F0F0F;
}

.header-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0F0F0F;
  color: #e2e2e2;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.header-theme-btn:hover {
  background: rgba(139, 0, 0, 0.3);
  border-color: var(--accent);
  color: #fff;
}
.header-theme-btn .material-symbols-outlined {
  font-size: 20px;
}
