@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;500;600;700&family=Noto+Serif+SC:wght@400;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #c9a44a;
  --gold-light: #e8d48b;
  --gold-dark: #8b6914;
  --crimson: #8b1a1a;
  --crimson-deep: #5a0f0f;
  --bg-dark: #0a0705;
  --bg-panel: rgba(15, 10, 5, 0.85);
  --text-light: #e8dcc8;
  --text-dim: #9a8b72;
  --ember: #ff6b35;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cinzel', serif;
  background: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== AMBIENT PARTICLES ========== */
.embers {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ember {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--ember);
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255, 107, 53, 0.6);
  animation: float-up linear infinite;
  opacity: 0;
}

@keyframes float-up {
  0% { transform: translateY(100vh) translateX(0) scale(1); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-10vh) translateX(80px) scale(0.3); opacity: 0; }
}

/* ========== NAVIGATION ========== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(10, 7, 5, 0.95) 0%, rgba(10, 7, 5, 0.7) 70%, transparent 100%);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(201, 164, 74, 0.15);
}

nav.nav-solid {
  background: rgba(10, 7, 5, 0.97);
}

.nav-brand {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(201, 164, 74, 0.3);
  letter-spacing: 2px;
  text-decoration: none;
}

.nav-brand span {
  color: var(--crimson);
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.3s, text-shadow 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(201, 164, 74, 0.4);
}

.nav-links a:hover::after { width: 100%; }

.nav-user {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 2px;
}

/* ========== BUTTONS ========== */
.btn-war {
  display: inline-block;
  padding: 1rem 3rem;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 40%, var(--gold-light) 60%, var(--gold) 100%);
  border: none;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: all 0.4s;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

.btn-war:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 164, 74, 0.4);
  filter: brightness(1.1);
}

.btn-ghost {
  display: inline-block;
  padding: 0.8rem 2.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 164, 74, 0.4);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s;
}

.btn-ghost:hover {
  background: rgba(201, 164, 74, 0.1);
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(201, 164, 74, 0.15);
}

/* ========== PAGE CONTAINER ========== */
.page-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 120px 16px 60px;
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* ========== CARD / PANEL ========== */
.panel {
  background: var(--bg-panel);
  border: 1px solid rgba(201, 164, 74, 0.12);
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), var(--gold), var(--gold-dark), transparent);
}

.panel h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
  text-shadow: 0 0 20px rgba(201, 164, 74, 0.3);
}

.panel h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(201, 164, 74, 0.2);
}

.panel-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--text-light);
  background: rgba(201, 164, 74, 0.06);
  border: 1px solid rgba(201, 164, 74, 0.2);
  outline: none;
  transition: all 0.3s;
}

.form-group input:focus {
  border-color: var(--gold);
  background: rgba(201, 164, 74, 0.1);
  box-shadow: 0 0 15px rgba(201, 164, 74, 0.1);
}

.form-group input::placeholder {
  color: rgba(154, 139, 114, 0.4);
}

.form-actions {
  margin-top: 1.5rem;
}

.form-actions .btn-war {
  width: 100%;
  text-align: center;
}

/* ========== ALERTS ========== */
.alert {
  padding: 10px 14px;
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  border-left: 3px solid;
}

.alert-error {
  background: rgba(139, 26, 26, 0.3);
  border-color: #cc4444;
  color: #ff8888;
}

.alert-success {
  background: rgba(26, 100, 26, 0.3);
  border-color: #44aa44;
  color: #88dd88;
}

/* ========== PANEL FOOTER ========== */
.panel-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
}

.panel-footer a {
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.panel-footer a:hover {
  color: var(--gold);
}

.panel-footer-center {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.7rem;
}

.panel-footer-center a {
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.panel-footer-center a:hover {
  color: var(--gold);
}

/* ========== ACCOUNT INFO ========== */
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(201, 164, 74, 0.08);
}

.info-row:last-child { border-bottom: none; }

.info-row .label {
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.info-row .value {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-light);
}

.status-online {
  color: #44cc44;
  text-shadow: 0 0 10px rgba(68, 204, 68, 0.3);
}

.status-offline {
  color: var(--text-dim);
}

/* ========== CHARACTER LIST ========== */
.character-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.character-card {
  background: rgba(201, 164, 74, 0.04);
  border: 1px solid rgba(201, 164, 74, 0.1);
  border-left: 3px solid var(--gold-dark);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.character-card:hover {
  border-left-color: var(--gold);
  background: rgba(201, 164, 74, 0.08);
  box-shadow: 0 0 20px rgba(201, 164, 74, 0.05);
}

.char-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 1px;
}

.char-details {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.char-level { color: var(--gold); font-weight: 700; }
.char-class { color: #8a9ab0; }
.char-country { font-weight: 700; }

.country-wei { color: #4488dd; }
.country-shu { color: #44bb44; }
.country-wu { color: #dd4444; }

.empty-state {
  color: var(--text-dim);
  text-align: center;
  padding: 1.5rem;
  font-style: italic;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

/* ========== ACTIONS ========== */
.actions {
  display: flex;
  gap: 12px;
}

/* ========== FOOTER ========== */
footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(201, 164, 74, 0.1);
  background: rgba(5, 3, 2, 0.8);
  position: relative;
  z-index: 2;
}

footer p {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  opacity: 0.6;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  nav { padding: 0.6rem 1rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.65rem; letter-spacing: 2px; }

  .page-container { padding: 100px 12px 40px; }
  .panel { padding: 1.5rem; }

  .character-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
