/* ── Login Modal ─────────────────────────────────────────────────────────── */

#pc-login-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: pcFadeIn 0.15s ease;
}
@keyframes pcFadeIn { from { opacity: 0; } to { opacity: 1; } }

.pc-login-modal {
  background: #13151c; border: 1px solid #2e3140;
  border-top: 2px solid #8a6f2e; border-radius: 4px;
  width: 380px; max-width: 90vw; padding: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.pc-login-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid #2e3140;
  font-family: 'Cinzel', serif; font-size: 16px; color: #c8a84b;
}
.pc-login-close {
  background: none; border: none; color: #787d90; font-size: 22px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.pc-login-close:hover { color: #c9cdd8; }

.pc-login-error {
  margin: 16px 24px 0; padding: 10px 14px; border-radius: 3px;
  background: rgba(200,72,72,0.12); border: 1px solid rgba(200,72,72,0.4);
  color: #e87878; font-size: 13px;
}

#pc-login-form { padding: 20px 24px 24px; }

.pc-login-field { margin-bottom: 16px; }
.pc-login-field label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: #787d90; margin-bottom: 6px;
}
.pc-login-field input {
  width: 100%; padding: 10px 14px;
  background: #1a1d26; border: 1px solid #2e3140;
  border-radius: 3px; color: #c9cdd8; font-size: 14px;
  font-family: 'Open Sans', sans-serif; outline: none;
  transition: border-color 0.2s;
}
.pc-login-field input:focus { border-color: #c8a84b; }
.pc-login-field input::placeholder { color: #787d90; }

.pc-login-btn {
  width: 100%; padding: 11px;
  background: linear-gradient(180deg, #2a2010 0%, #1a1408 100%);
  border: 1px solid #8a6f2e; border-radius: 3px;
  color: #c8a84b; font-family: 'Cinzel', serif;
  font-size: 14px; font-weight: 600; letter-spacing: 1px;
  cursor: pointer; transition: all 0.2s; margin-top: 4px;
}
.pc-login-btn:hover {
  background: linear-gradient(180deg, #3a3018 0%, #2a2010 100%);
  color: #e8cc80; border-color: #c8a84b;
}
.pc-login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.pc-login-footer {
  padding: 14px 24px; border-top: 1px solid #2e3140;
  text-align: center; font-size: 13px; color: #787d90;
}
.pc-login-footer a { color: #c8a84b; }
.pc-login-footer a:hover { color: #e8cc80; }

/* ── Nav Auth Area ──────────────────────────────────────────────────────── */

#pc-auth-area {
  display: flex; align-items: center; margin-left: 8px;
}

.pc-auth-login-btn {
  background: linear-gradient(180deg, #2a2010 0%, #1a1408 100%);
  border: 1px solid #8a6f2e; border-radius: 3px;
  color: #c8a84b; font-family: 'Cinzel', serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  padding: 6px 16px; cursor: pointer; transition: all 0.2s;
  text-transform: uppercase;
}
.pc-auth-login-btn:hover {
  background: linear-gradient(180deg, #3a3018 0%, #2a2010 100%);
  color: #e8cc80; border-color: #c8a84b;
}

.pc-auth-user { position: relative; }

.pc-auth-char-btn {
  background: rgba(200,168,75,0.08); border: 1px solid #2e3140;
  border-radius: 3px; color: #c9cdd8; font-size: 13px;
  font-weight: 600; padding: 5px 12px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-family: 'Open Sans', sans-serif;
  transition: all 0.2s;
}
.pc-auth-char-btn:hover {
  border-color: #8a6f2e; background: rgba(200,168,75,0.12);
}
.pc-auth-arrow { font-size: 10px; color: #787d90; }

/* ── Character Dropdown ─────────────────────────────────────────────────── */

.pc-char-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: #13151c; border: 1px solid #2e3140;
  border-radius: 4px; min-width: 200px; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
}
.pc-char-dropdown.open { display: block; }

.pc-char-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; cursor: pointer; font-size: 13px;
  transition: background 0.15s;
}
.pc-char-item:hover { background: rgba(200,168,75,0.08); }
.pc-char-active { background: rgba(200,168,75,0.06); }
.pc-char-active::before {
  content: '\2713'; color: #c8a84b; font-size: 11px;
  margin-right: 6px; font-weight: 700;
}

.pc-char-name { font-weight: 600; }
.pc-char-info { font-size: 11px; color: #787d90; margin-left: 12px; white-space: nowrap; }

.pc-char-divider {
  height: 1px; background: #2e3140; margin: 4px 0;
}

.pc-char-profile {
  color: #7ab3cc; text-decoration: none; font-size: 12px;
}
.pc-char-profile:hover { color: #a0d0e8; }

.pc-char-logout {
  color: #c84848; font-size: 12px;
}
.pc-char-logout:hover { background: rgba(200,72,72,0.1); }

.pc-char-empty {
  color: #787d90; font-size: 12px; cursor: default;
}
.pc-char-empty:hover { background: none; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  #pc-auth-area { margin-left: 0; margin-top: 8px; width: 100%; }
  .pc-auth-login-btn { width: 100%; text-align: center; }
  .pc-auth-char-btn { width: 100%; justify-content: center; }
  .pc-char-dropdown { right: auto; left: 0; width: 100%; }
  .pc-login-modal { width: 95vw; }
}
