* {
  box-sizing: border-box;
}

:root {
  --color-bg-page: #f4f6f8;
  --color-text-primary: #1f2937;
  --color-text-dark: #0f172a;
  --color-text-darker: #020617;
  --color-header-bg: #111827;
  --color-header-text: #f9fafb;
  --color-footer-text: #64748b;
  --color-border-light: #e5e7eb;
  --focus-accent: #6366f1;
  --radius-pill: 999px;
  --space-page-x: 1.5rem;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  --header-height: 88px;
  --footer-height: 56px;
}

main {
  padding: calc(var(--header-height) + 1.2rem) var(--space-page-x)
    calc(var(--footer-height) + 1.2rem);
}

button,
.btn {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--color-text-dark);
  padding: 0.35rem 0.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

button:hover,
.btn:hover {
  color: var(--color-text-darker);
  opacity: 0.86;
  border-bottom-color: #0f172a;
}

button:focus-visible,
.btn:focus-visible {
  outline: none;
  border-bottom-color: var(--focus-accent);
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem;
  background: var(--color-header-bg);
  color: var(--color-header-text);
}

.header h1 {
  margin: 0;
}

.header p {
  margin: 0.4rem 0 0;
  color: #d1d5db;
}

.header-guest h1,
.header-auth h1 {
  margin: 0;
}

.header-guest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-guest-left {
  min-width: 0;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.header-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.header-auth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.header-auth-btn,
.header-login-btn,
.auth-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: none;
  border-radius: 0;
  padding: 0.2rem 0.15rem;
  background: transparent;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.1;
  transition: color 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.header-auth-btn:hover,
.header-login-btn:hover,
.auth-back-btn:hover {
  color: #ffffff;
  opacity: 0.88;
}

.header-auth-btn:focus-visible,
.header-login-btn:focus-visible,
.auth-back-btn:focus-visible {
  outline: none;
  border-bottom: 2px solid #93c5fd;
}

.header-auth-icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.header-auth-icon-btn:hover {
  background: rgba(148, 163, 184, 0.18);
  border-color: #bfdbfe;
  opacity: 0.95;
}

.header-auth-icon-btn:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.45);
  outline-offset: 1px;
}

.header-auth-icon-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  padding: 1rem var(--space-page-x);
  border-top: 1px solid var(--color-border-light);
  color: var(--color-footer-text);
  font-size: 0.9rem;
  background: #fff;
}
