/* ── Login overlay ─────────────────────────────────────────────── */
#login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020202;
  z-index: 10;
  font-family: var(--ui-font);
}

/* Centered card */
#login-frame {
  display: flex;
  flex-direction: row;
  width: clamp(680px, 72%, 1080px);
  height: clamp(420px, 78vh, 680px);
  border: 1px solid #181818;
  overflow: hidden;
}

/* ── Left sidebar ──────────────────────────────────────────────── */
#login-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #141414;
  background: #080808;
  padding: 32px 24px 20px;
}

#login-sidebar-header {
  margin-bottom: 28px;
}

#login-forms {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Each screen inside the overlay is a flex column */
.login-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.login-screen.active { display: flex; }
#screen-charselect.active { flex: 1; min-height: 0; }

/* Bottom action strip — shown by JS when charselect is active */
#charselect-actions {
  display: none;
  flex-direction: row;
  gap: 8px;
  padding: 10px 0 6px;
  border-top: 1px solid #141414;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}
#charselect-actions button { flex-shrink: 0; }

/* Prominent "first character" call-to-action */
.char-slot-adventure {
  padding: 12px 8px;
  background: #0d0d0d;
  border: 1px solid #2a2010;
  color: #806020;
  font-family: var(--ui-font);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: border-color 0.15s, color 0.15s;
}
.char-slot-adventure:hover { border-color: #c09000; color: #e0c040; background: #111008; }

#login-sidebar-header h1 {
  font-family: 'Manufacturing Consent', serif;
  color: #e0c040;
  font-size: 28px;
  letter-spacing: 2px;
  font-weight: 400;
  line-height: 1.2;
}
#login-sidebar-header h1::before,
#login-sidebar-header h1::after {
  content: ' ✦ ';
  color: #907020;
  font-size: 0.45em;
  vertical-align: middle;
}
#login-sidebar-header .login-tagline {
  color: #303030;
  font-size: 11px;
  letter-spacing: 2px;
  margin-top: 4px;
  text-transform: uppercase;
}

#login-overlay h2 {
  color: #e0c040;
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

/* ── Server status strip ───────────────────────────────────────── */
#login-server-status {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #141414;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sstat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3a3a3a;
  font-size: 12px;
}
.sstat-row .material-icons { font-size: 14px; color: #2a2a2a; }
.sstat-val { color: #585858; }

/* ── Right content area ────────────────────────────────────────── */
#login-content {
  flex: 1;
  overflow-y: auto;
  background: #050505;
  position: relative;
}

#content-news {
  padding: 40px 48px;
  display: block;
}
#login-content.creating #content-news { display: none; }

#content-create {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 48px;
  gap: 10px;
  min-height: 100%;
}
#login-content.creating #content-create { display: flex; }

/* ── News feed ─────────────────────────────────────────────────── */
.news-section-title {
  font-family: var(--ui-font);
  color: #2c2c2c;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.news-entry {
  border-top: 1px solid #111;
  padding: 18px 0 16px;
}
.news-entry:last-child { border-bottom: 1px solid #111; }

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.news-date {
  color: #333;
  font-size: 11px;
  letter-spacing: 1px;
}
.news-tag {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 1px 6px;
  border: 1px solid #1e1e1e;
  color: #383838;
}
.news-tag.tag-update { border-color: #2a3a1a; color: #4a7030; }
.news-tag.tag-notice { border-color: #3a2a10; color: #80601a; }
.news-tag.tag-coming { border-color: #1a1a3a; color: #303060; }

.news-headline {
  color: #b0a080;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.news-body {
  color: #484848;
  font-size: 13px;
  line-height: 1.7;
  max-width: 600px;
}

/* ── Shared form elements ──────────────────────────────────────── */
#login-overlay input {
  width: 220px;
  padding: 6px 10px;
  background: #0e0e0e;
  color: #eee;
  border: 1px solid #333;
  font-family: var(--ui-font);
  font-size: 13px;
  outline: none;
}
#login-overlay input:focus { border-color: #e0c040; }

#login-overlay button {
  padding: 6px 16px;
  background: #181818;
  color: #bbb;
  border: 1px solid #444;
  font-family: var(--ui-font);
  font-size: 13px;
  cursor: pointer;
}
#login-overlay button:hover { background: #282828; color: #eee; border-color: #666; }

.error-line { color: #e04040; min-height: 14px; font-family: var(--ui-font); font-size: 12px; }
.hint-line  { color: #666; font-family: var(--ui-font); font-size: 12px; }

#quick-login-btn { color: #4a7030; border-color: #2a3a1a; }
#quick-login-btn:hover { color: #80c050; border-color: #4a7030; background: #0e130a; }

/* ── Char select ───────────────────────────────────────────────── */
#char-slots {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  margin: 4px 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.char-slot {
  padding: 5px 8px;
  background: #111;
  border: 1px solid #444;
  font-family: var(--ui-font);
  font-size: 12px;
  color: #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.char-slot:hover { border-color: #e0c040; background: #1c1c1c; }

.slot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.slot-name  { color: #eee; }
.slot-class { color: #888; font-size: 11px; }

.char-delete-btn {
  padding: 1px 5px;
  background: transparent;
  color: #664040;
  border: 1px solid #442222;
  font-family: var(--ui-font);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.char-delete-btn:hover { background: #3a1010; color: #e04040; border-color: #884040; }

.charselect-btns { display: flex; gap: 8px; margin-top: 2px; }

/* ── Char create ───────────────────────────────────────────────── */
#race-picker, #gender-picker, #path-picker { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }

.cls-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  min-width: 72px;
  background: #1a1a1a;
  color: #888;
  border: 1px solid #444;
  font-family: var(--ui-font);
  font-size: 12px;
  cursor: pointer;
}
.cls-btn:hover           { background: #2a2a2a; color: #ccc; }
.cls-btn.selected        { background: #5a4000; color: #ffe060; border-color: #c09000; box-shadow: inset 0 0 0 1px #c09000; }
.cls-btn .material-icons { font-size: 22px; line-height: 1; }

#path-picker .cls-btn {
  position: relative;
  min-width: 88px;
  padding: 18px 16px 14px;
}
#path-picker .cls-btn .material-icons:not(.cls-btn-corner) { font-size: 38px; }

.cls-btn-corner {
  position: absolute !important;
  top: 5px;
  right: 5px;
  font-size: 13px !important;
  line-height: 1 !important;
  opacity: 0.22;
  transition: opacity 0.15s, color 0.15s;
}
.cls-btn:hover .cls-btn-corner    { opacity: 0.65; }
.cls-btn.selected .cls-btn-corner { color: #c09000; opacity: 0.5; }
.cls-btn-corner:hover             { opacity: 1 !important; color: #e0c040; }

.path-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.picker-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.picker-label-hint {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #3a3a3a;
  font-family: var(--ui-font);
  font-size: 10px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.15s;
  user-select: none;
}
.picker-label-hint .material-icons { font-size: 13px; line-height: 1; }
.picker-label-hint:hover { color: #909090; }

.picker-label {
  color: #555;
  font-family: var(--ui-font);
  font-size: 11px;
  letter-spacing: 1px;
  align-self: flex-start;
}

#race-desc, #path-desc {
  color: #666;
  font-family: var(--ui-font);
  font-size: 11px;
  min-height: 14px;
  text-align: center;
  max-width: 220px;
}

.create-btns { display: flex; gap: 8px; }

/* ── Name field with info icon ─────────────────────────────────── */
.name-field-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.name-field-row input { width: 220px; }

.name-info-icon {
  font-size: 15px !important;
  color: #383838;
  cursor: default;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.15s;
  user-select: none;
}
.name-info-icon:hover { color: #a09060; }

.name-info-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0e0e0e;
  border: 1px solid #2a2a2a;
  color: #888;
  font-family: var(--ui-font);
  font-size: 11px;
  line-height: 1.7;
  padding: 8px 12px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
}
.name-info-tip em { color: #806020; font-style: italic; }
.name-info-icon:hover ~ .name-info-tip { display: block; }
