/* ═══════════════════════════════════════════════════════════════════════════
   BORINOT OT — Portal Styles
   (extends main.css variables and .ot-navbar)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Layout base ────────────────────────────────────────────────────────────── */
.portal-main {
  min-height: 100vh;
  padding: 96px 1.25rem 4rem;          /* 64px navbar + 32px breathing room */
  background:
    radial-gradient(ellipse 60% 40% at 10% 80%, rgba(0,230,118,.035) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 90% 10%, rgba(201,168,76,.05) 0%, transparent 65%),
    linear-gradient(175deg, #060e08 0%, var(--sm-bg) 45%, #091a10 100%);
}

/* Small fix: portal logout btn in the navbar */
.portal-nav-logout {
  font-size: .8rem;
  padding: .45rem 1rem;
  cursor: pointer;
}

/* ── Auth card ──────────────────────────────────────────────────────────────── */
.portal-auth {
  width: 100%;
  max-width: 440px;
  margin: 1.5rem auto 0;
}

.auth-card {
  background: linear-gradient(160deg, rgba(11,42,30,.92) 0%, rgba(7,28,18,.97) 100%);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 20px;
  padding: 2.5rem 2.25rem 2rem;
  box-shadow:
    0 0 0 1px rgba(201,168,76,.08),
    0 30px 70px rgba(0,0,0,.55),
    0 0 60px rgba(0,230,118,.04),
    inset 0 1px 0 rgba(255,255,255,.04);
}

/* ── Auth card header ───────────────────────────────────────────────────────── */
.auth-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-bee {
  display: inline-block;
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: .625rem;
  filter: drop-shadow(0 0 14px rgba(201,168,76,.45));
  animation: portal-bee 3.5s ease-in-out infinite;
}
@keyframes portal-bee {
  0%, 100% { transform: translateY(0)   rotate(0deg); }
  40%       { transform: translateY(-7px) rotate(3deg); }
  70%       { transform: translateY(-4px) rotate(-2deg); }
}

.auth-card-title {
  font-family: var(--font-fantasy);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--ot-gold);
  letter-spacing: 4px;
  line-height: 1;
  margin: 0 0 .375rem;
}
.auth-card-title span { color: var(--ot-gold-light); }

.auth-card-sub {
  font-size: .72rem;
  font-weight: 600;
  color: var(--sm-text-faint);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
}

/* ── Auth tab switcher ──────────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: rgba(0,0,0,.35);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1;
  padding: .625rem 1rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--sm-text-faint);
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s ease;
}
.auth-tab:hover { color: var(--sm-text-muted); }
.auth-tab.active {
  background: rgba(201,168,76,.15);
  color: var(--ot-gold);
  box-shadow: 0 0 0 1px rgba(201,168,76,.28), inset 0 1px 0 rgba(255,255,255,.05);
}

/* ── Form ───────────────────────────────────────────────────────────────────── */
.auth-form { display: none; }
.auth-form.active { display: block; animation: form-in .25s ease-out; }

@keyframes form-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pfield { margin-bottom: 1.125rem; }

.pfield label {
  display: flex;
  align-items: center;
  gap: .375rem;
  font-size: .72rem;
  font-weight: 700;
  color: rgba(201,168,76,.8);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: .4rem;
}
.pfield-optional {
  font-size: .68rem;
  font-weight: 500;
  color: var(--sm-text-faint);
  text-transform: none;
  letter-spacing: 0;
}

.pfield-wrap { position: relative; }
.pfield-wrap > i {
  position: absolute;
  left: .875rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(201,168,76,.45);
  font-size: .8rem;
  pointer-events: none;
  transition: color .2s;
}

.pfield-wrap input {
  width: 100%;
  padding: .8rem .875rem .8rem 2.375rem;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(201,168,76,.18);
  border-radius: 8px;
  color: var(--sm-text);
  font-family: var(--font-sans);
  font-size: .9375rem;
  transition: border-color .2s, box-shadow .2s;
}
.pfield-wrap input::placeholder { color: rgba(240,255,244,.25); }
.pfield-wrap input:focus {
  outline: none;
  border-color: rgba(201,168,76,.5);
  box-shadow: 0 0 0 3px rgba(201,168,76,.08), 0 0 16px rgba(201,168,76,.06);
}
.pfield-wrap input:focus + i,
.pfield-wrap:focus-within > i { color: rgba(201,168,76,.75); }

/* ── Primary button ─────────────────────────────────────────────────────────── */
.btn-auth-primary {
  width: 100%;
  margin-top: .875rem;
  padding: .9rem 1.5rem;
  background: linear-gradient(135deg, var(--ot-gold) 0%, var(--ot-gold-light) 50%, var(--ot-gold) 100%);
  background-size: 200% 100%;
  color: #0b2a1e;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-position .4s, transform .18s, box-shadow .18s;
  box-shadow: 0 5px 22px rgba(201,168,76,.28);
}
.btn-auth-primary:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(201,168,76,.38);
}
.btn-auth-primary:active { transform: translateY(0); }

/* ── Message ────────────────────────────────────────────────────────────────── */
.auth-message {
  min-height: 1.25rem;
  margin-top: .75rem;
  font-size: .82rem;
  text-align: center;
  color: transparent;
  animation: form-in .2s ease;
}
.auth-message.error   { color: var(--sm-danger); }
.auth-message.success { color: var(--sm-accent); }

/* ─────────────────────────────────────────────────────────────────────────────
   CHARACTERS SECTION
   ──────────────────────────────────────────────────────────────────────────── */
.portal-chars {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 .25rem;
}

/* Header */
.chars-head {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(201,168,76,.15);
}

.chars-title {
  font-family: var(--font-fantasy);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ot-gold);
  letter-spacing: 2px;
  line-height: 1;
  text-shadow: 0 0 24px rgba(201,168,76,.25);
  margin: 0 0 .375rem;
}

.chars-account {
  color: var(--sm-text-faint);
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
}
.chars-account i    { color: rgba(201,168,76,.4); }
.chars-account span { color: var(--ot-gold-light); font-weight: 600; }

/* ── Grid ───────────────────────────────────────────────────────────────────── */
.chars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Empty state */
.chars-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--sm-text-faint);
}
.chars-empty .chars-empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: .75rem;
  opacity: .5;
}
.chars-empty p { font-size: .9rem; }

/* ── Character card ─────────────────────────────────────────────────────────── */
.char-card {
  position: relative;
  background: linear-gradient(150deg, rgba(13,42,28,.9), rgba(7,26,17,.95));
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 14px;
  padding: 1.5rem 1.375rem 1.25rem;
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.char-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,.5) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .3s;
}
.char-card:hover {
  transform: translateY(-5px);
  border-color: rgba(201,168,76,.45);
  box-shadow: 0 16px 42px rgba(0,0,0,.35), 0 0 32px rgba(201,168,76,.07);
}
.char-card:hover::before { opacity: 1; }

/* Ambient glow blob */
.char-card-glow {
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
  top: -20px; right: -20px;
  pointer-events: none;
}

/* Vocation badge */
.char-voc-badge {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: .75rem;
  display: block;
  text-align: left;
}

/* Card body */
.char-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .2rem;
}

.char-name {
  font-family: var(--font-fantasy);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ot-gold);
  margin: 0;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.char-lvl-pill {
  flex-shrink: 0;
  background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.28);
  color: var(--ot-gold-light);
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: .3px;
  white-space: nowrap;
}

.char-voc-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--sm-text-faint);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin: 0 0 .875rem;
}

/* Stats */
.char-stats {
  list-style: none;
  padding: 0;
  margin: 0 0 1.125rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.char-stats li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--sm-text-muted);
}
.char-stats li i {
  width: 13px;
  text-align: center;
  color: rgba(201,168,76,.4);
  font-size: .75rem;
}

/* Action buttons */
.char-card-actions {
  display: flex;
  gap: .625rem;
}

.btn-char-play {
  flex: 1;
  padding: .6rem 1rem;
  background: linear-gradient(135deg, rgba(201,168,76,.18), rgba(201,168,76,.08));
  border: 1px solid rgba(201,168,76,.35);
  border-radius: 7px;
  color: var(--ot-gold);
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .18s;
}
.btn-char-play:hover {
  background: linear-gradient(135deg, rgba(201,168,76,.28), rgba(201,168,76,.15));
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201,168,76,.15);
}

.btn-char-del {
  width: 37px; height: 37px;
  padding: 0;
  background: rgba(248,113,113,.07);
  border: 1px solid rgba(248,113,113,.22);
  border-radius: 7px;
  color: rgba(248,113,113,.65);
  font-size: .82rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .18s;
}
.btn-char-del:hover {
  background: rgba(248,113,113,.18);
  border-color: rgba(248,113,113,.5);
  color: var(--sm-danger);
}

/* ── Add-new card ───────────────────────────────────────────────────────────── */
.char-add-card {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  min-height: 200px;
  border: 2px dashed rgba(201,168,76,.18);
  border-radius: 14px;
  background: rgba(201,168,76,.02);
  cursor: pointer;
  transition: all .25s;
  width: 100%;
  text-align: center;
}
.char-add-card:hover {
  border-color: rgba(201,168,76,.45);
  background: rgba(201,168,76,.06);
  transform: translateY(-3px);
}

.char-add-plus {
  font-size: 2rem;
  line-height: 1;
  color: rgba(201,168,76,.35);
  font-weight: 300;
  transition: transform .2s, color .2s;
}
.char-add-card:hover .char-add-plus {
  color: rgba(201,168,76,.7);
  transform: scale(1.15) rotate(90deg);
}

.char-add-text {
  font-family: var(--font-fantasy);
  font-size: .78rem;
  color: rgba(201,168,76,.4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: color .2s;
}
.char-add-card:hover .char-add-text { color: rgba(201,168,76,.75); }

/* ─────────────────────────────────────────────────────────────────────────────
   VOCATION & SEX PICKERS
   ──────────────────────────────────────────────────────────────────────────── */
.voc-radio { display: none; }

.voc-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  margin-top: .375rem;
}

.sex-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: .375rem;
}

.voc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: .6rem .25rem .5rem;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(201,168,76,.13);
  border-radius: 9px;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.voc-tile:hover {
  background: rgba(201,168,76,.08);
  border-color: rgba(201,168,76,.3);
}

.voc-radio:checked + .voc-tile {
  background: rgba(201,168,76,.14);
  border-color: rgba(201,168,76,.55);
  box-shadow: 0 0 0 1px rgba(201,168,76,.18), 0 0 14px rgba(201,168,76,.1);
}
.voc-radio:checked + .voc-tile .voc-name { color: var(--ot-gold); }

.voc-emoji { font-size: 1.45rem; line-height: 1; }

.voc-name {
  font-size: .62rem;
  font-weight: 700;
  color: var(--sm-text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  transition: color .15s;
}

.voc-hint {
  font-size: .57rem;
  color: var(--sm-text-faint);
  letter-spacing: .2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MODAL
   ──────────────────────────────────────────────────────────────────────────── */
.portal-modal {
  position: fixed;
  inset: 0;
  background: rgba(3,10,5,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  animation: modal-bg-in .2s ease;
}
@keyframes modal-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.portal-modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(155deg, rgba(11,42,30,.97), rgba(7,26,17,.99));
  border: 1px solid rgba(201,168,76,.35);
  border-radius: 20px;
  padding: 2.25rem 2rem 2rem;
  box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(201,168,76,.1);
  animation: modal-in .22s cubic-bezier(.34,1.36,.64,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.93) translateY(16px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.portal-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(201,168,76,.18);
  border-radius: 7px;
  color: var(--sm-text-faint);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .9rem;
  transition: all .18s;
}
.portal-modal-close:hover {
  background: rgba(201,168,76,.12);
  border-color: rgba(201,168,76,.4);
  color: var(--ot-gold);
  transform: rotate(90deg);
}

.portal-modal-title {
  font-family: var(--font-fantasy);
  font-size: 1.35rem;
  color: var(--ot-gold);
  margin: 0 0 1.5rem;
  letter-spacing: 1px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .portal-main { padding: 80px .875rem 3rem; }
  .auth-card   { padding: 2rem 1.375rem 1.75rem; }
  .chars-title { font-size: 1.5rem; }
  .voc-picker  { grid-template-columns: repeat(3, 1fr); }
  .chars-grid  { grid-template-columns: 1fr; }
  .char-add-card { min-height: 120px; }
  .portal-modal-box { padding: 1.75rem 1.25rem 1.5rem; }
}

@media (max-width: 400px) {
  .auth-card-title { font-size: 1.35rem; letter-spacing: 2px; }
  .voc-picker      { grid-template-columns: repeat(3, 1fr); }
}
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN ENHANCEMENTS v2
   ═══════════════════════════════════════════════════════════════════════════ */

/* Auth card: animated top-edge glow line */
.auth-card {
  position: relative;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201,168,76,.8) 40%,
    rgba(232,210,140,.9) 50%,
    rgba(201,168,76,.8) 60%,
    transparent 100%
  );
  border-radius: 50%;
  pointer-events: none;
}

/* Auth card inner shadow at bottom for depth */
.auth-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0,0,0,.28), transparent);
  border-radius: 0 0 20px 20px;
  pointer-events: none;
}

/* Tab active: stronger contrast */
.auth-tab.active {
  background: linear-gradient(160deg, rgba(201,168,76,.22), rgba(201,168,76,.12));
  color: var(--ot-gold);
  box-shadow:
    0 0 0 1px rgba(201,168,76,.35),
    0 2px 8px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.07);
}

/* Input: stronger visual base + focus glow */
.pfield-wrap input {
  background: rgba(0,0,0,.32);
  border-color: rgba(201,168,76,.2);
}
.pfield-wrap input:focus {
  background: rgba(0,0,0,.38);
  border-color: rgba(201,168,76,.6);
  box-shadow:
    0 0 0 3px rgba(201,168,76,.1),
    0 0 24px rgba(201,168,76,.07),
    inset 0 1px 0 rgba(255,255,255,.04);
}

/* Button: shimmer sweep on hover */
.btn-auth-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #a8842a 0%,
    var(--ot-gold) 30%,
    var(--ot-gold-light) 50%,
    var(--ot-gold) 70%,
    #a8842a 100%
  );
  background-size: 250% 100%;
  letter-spacing: 2px;
  box-shadow:
    0 5px 22px rgba(201,168,76,.32),
    0 1px 0 rgba(255,255,255,.12) inset;
}
.btn-auth-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,.18) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform .55s ease;
}
.btn-auth-primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow:
    0 10px 32px rgba(201,168,76,.4),
    0 2px 8px rgba(0,0,0,.25),
    0 1px 0 rgba(255,255,255,.15) inset;
}
.btn-auth-primary:hover::after { transform: translateX(140%); }
.btn-auth-primary:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(201,168,76,.25);
}

/* Char title: decorative underline accent */
.chars-title::after {
  content: '';
  display: block;
  width: 44px;
  height: 2px;
  margin-top: .45rem;
  background: linear-gradient(90deg, var(--ot-gold) 0%, transparent 100%);
  border-radius: 2px;
}

/* Char card: stronger hover + glow spot follows */
.char-card:hover {
  border-color: rgba(201,168,76,.5);
  box-shadow:
    0 20px 48px rgba(0,0,0,.4),
    0 0 40px rgba(201,168,76,.09),
    0 0 0 1px rgba(201,168,76,.12);
}

/* Voc tile: lift on selection */
.voc-radio:checked + .voc-tile {
  background: linear-gradient(160deg, rgba(201,168,76,.2), rgba(201,168,76,.08));
  border-color: rgba(201,168,76,.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201,168,76,.15), 0 0 0 1px rgba(201,168,76,.2);
}

/* Modal box: glass shine at top */
.portal-modal-box::before {
  content: '';
  position: absolute;
  top: -1px; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.7), transparent);
  pointer-events: none;
}

/* Chars empty: prettier icon area */
.chars-empty .chars-empty-icon {
  display: inline-block;
  animation: portal-bee 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(201,168,76,.2));
}

