/* ===============================
   TERMINUS THEME (FINAL)
=============================== */

:root {
  --bg-main: #020617;
  --bg-card: #0b1220;
  --bg-hover: #111827;
  --border: #1e293b;

  --text-main: #e5e7eb;
  --text-muted: #94a3b8;

  --accent: #22c55e;
  --danger: #ef4444;
}

/* ===============================
   RESET / BASE
=============================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu;
  background: var(--bg-main);
  color: var(--text-main);
}

/* links */
a {
  color: var(--text-main);
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}

/* ===============================
   HEADER / AUTH TOOLBAR
=============================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 48px;
  padding: 0 18px;

  background: rgba(2, 6, 23, 0.85);
  border-bottom: 1px solid rgba(255,255,255,0.08);

  max-width: 1200px;
  margin: 0 auto;
}

.site-logo a {
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 0.95rem;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===============================
   NAV PILLS
=============================== */

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  height: 30px;
  padding: 0 12px;

  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;

  transition: all 0.15s ease;
}

/* outline */
.nav-pill.outline {
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-main);
  background: transparent;
}

.nav-pill.outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* solid */
.nav-pill.solid {
  background: var(--accent);
  color: #052e16;
}

.nav-pill.solid:hover {
  filter: brightness(1.1);
}

/* profile */
.profile-pill {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
}

.profile-pill:hover {
  border-color: var(--accent);
}

.profile-pill img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* danger */
.nav-pill.danger {
  border: 1px solid rgba(239,68,68,0.35);
  color: #fca5a5;
}

.nav-pill.danger:hover {
  background: rgba(239,68,68,0.15);
}

/* ===============================
   AUTH CARDS (LOGIN / REGISTER)
=============================== */

/* ===============================
   AUTH (LOGIN / REGISTER)
=============================== */

.auth-wrapper {
  min-height: calc(100dvh - 70px); /* account for header */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;

  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,.45);

  padding: 28px;
}

.auth-card h2 {
  margin: 0 0 18px;
  text-align: center;
}

.auth-card label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.auth-card input {
  width: 100%;
  padding: 14px;
  margin-bottom: 16px;

  border-radius: 12px;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text-main);

  font-size: 1rem;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-card button {
  width: 100%;
  padding: 14px;

  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #052e16;

  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

.auth-card button:hover {
  filter: brightness(1.1);
}

.auth-error {
  color: var(--danger);
  margin-bottom: 12px;
  font-size: 0.9rem;
  text-align: center;
}

.auth-success {
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 0.9rem;
  text-align: center;
}

/* smaller phones */
@media (max-width: 420px) {
  .auth-card {
    padding: 22px;
    border-radius: 16px;
  }
}


/* ===============================
   RESPONSIVE TWEAK
=============================== */

@media (max-width: 600px) {
  .site-logo {
    display: none;
  }
}
/* Force header profile avatar size */
.tg-pill-profile img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
/* ===============================
   TERMINUS HEADER (MODERN)
=============================== */

.tg-header {
  background: linear-gradient(
    180deg,
    rgba(11,18,32,0.95),
    rgba(2,6,23,0.95)
  );
  border-bottom: 1px solid var(--border);
}

.tg-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* logo */
.tg-logo a {
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 0.95rem;
  color: var(--text-main);
}

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

/* nav */
.tg-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* pills */
.tg-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  height: 30px;
  padding: 0 12px;

  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;

  text-decoration: none;
  transition: all 0.15s ease;
}

/* outline */
.tg-pill-outline {
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-main);
}

.tg-pill-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* solid */
.tg-pill-solid {
  background: var(--accent);
  color: #052e16;
}

.tg-pill-solid:hover {
  filter: brightness(1.1);
}

/* profile */
.tg-pill-profile {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
}

.tg-pill-profile:hover {
  border-color: var(--accent);
}

.tg-pill-profile img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* danger */
.tg-pill-danger {
  border: 1px solid rgba(239,68,68,0.35);
  color: #fca5a5;
}

.tg-pill-danger:hover {
  background: rgba(239,68,68,0.15);
}

/* mobile */
@media (max-width: 600px) {
  .tg-logo {
    display: none;
  }
}
/* ===============================
   TERMINUS HEADER (HARD-SCOPED)
=============================== */

.tg-header {
  background: linear-gradient(
    180deg,
    rgba(11,18,32,0.95),
    rgba(2,6,23,0.95)
  );
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tg-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* logo */
.tg-logo a {
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 0.95rem;
  color: var(--text-main);
}

/* nav */
.tg-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* pills */
.tg-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  height: 32px;
  padding: 0 12px;

  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;

  text-decoration: none;
  white-space: nowrap;
}

/* avatar wrapper — THIS IS THE FIX */
.tg-avatar-wrap {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;

  border-radius: 50%;
  overflow: hidden;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* avatar image — cannot grow */
.tg-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* outline */
.tg-outline {
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text-main);
}

/* solid */
.tg-solid {
  background: var(--accent);
  color: #052e16;
}

/* profile */
.tg-profile {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}

/* danger */
.tg-danger {
  border: 1px solid rgba(239,68,68,0.35);
  color: #fca5a5;
}

.tg-danger:hover {
  background: rgba(239,68,68,0.15);
}
