﻿:root {
  --bg-deep: #16090b;
  --bg-warm: #451116;
  --ink: #201712;
  --wood-1: #3d2c29;
  --wood-2: #241915;
  --gold: #caa65a;
  --gold-strong: #f0cf7a;
  --paper: #ece3cf;
  --paper-edge: #d5c7a7;
  --text-dark: #352920;
  --text-light: #f1e5cf;
  --muted: #b29e83;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text-light);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.45;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 166, 84, 0.52) 0, rgba(255, 166, 84, 0.18) 26%, rgba(40, 8, 10, 0) 52%),
    radial-gradient(circle at 50% 60%, #5f1920 0, #2e0f14 36%, #16090b 74%);
}

.backdrop {
  position: fixed;
  inset: 0;
  background: url("../img/texture-dirt.jpg") center/cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0.14;
  pointer-events: none;
  z-index: -2;
}

.wrap {
  width: min(1180px, 96vw);
  margin: 0 auto;
}

.site-header {
  padding-top: 26px;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.55);
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(180deg, rgba(86, 57, 42, 0.96), rgba(35, 23, 18, 0.98)),
    linear-gradient(90deg, rgba(255, 211, 117, 0.08), rgba(0, 0, 0, 0));
  box-shadow: 0 26px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 220, 150, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold-strong);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 #000;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.main-nav a {
  text-decoration: none;
  color: #f6e0ad;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.22);
}

.main-nav a:hover,
.main-nav a.active {
  color: #1d150d;
  background: linear-gradient(180deg, #f3cf81, #b98d41);
  border-color: rgba(0, 0, 0, 0.32);
}

.auth-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-user {
  color: #ffeec4;
  font-size: 0.8rem;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 214, 130, 0.25);
}

.status-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.status-pill.ok {
  background: #8ac170;
  color: #17290f;
}

.status-pill.warn {
  background: #e0b86a;
  color: #31200d;
}

.btn-link,
.hero-cta {
  display: inline-block;
  text-decoration: none;
  color: #2a1d0f;
  background: linear-gradient(180deg, #f1cc78, #bd8d3f);
  border: 1px solid rgba(0, 0, 0, 0.38);
  border-radius: 7px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 233, 168, 0.8), 0 4px 10px rgba(0, 0, 0, 0.35);
}

.btn-link.danger {
  background: linear-gradient(180deg, #c45656, #7f2121);
  color: #fae6e6;
}

.menu-toggle {
  display: none;
  color: var(--text-light);
  border: 1px solid rgba(255, 215, 135, 0.35);
  background: rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  padding: 8px 10px;
}

.hero {
  min-height: 330px;
  border: 1px solid rgba(0, 0, 0, 0.6);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background:
    linear-gradient(180deg, rgba(15, 10, 10, 0.62), rgba(18, 12, 10, 0.72)),
    var(--hero) center top/cover no-repeat;
  box-shadow: 0 32px 45px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, rgba(14, 8, 8, 0), rgba(14, 8, 8, 0.92));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: 34px 30px;
}

.kicker {
  margin: 0;
  color: #f8d88f;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.hero h1 {
  margin: 8px 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  color: #fff1cf;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hero p {
  margin: 0;
  color: #efdec0;
}

.layout {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.65);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.45);
}

.panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.news-panel {
  background:
    linear-gradient(180deg, rgba(255, 250, 238, 0.93), rgba(241, 230, 204, 0.96)),
    url("../img/texture-dirt.jpg") center/cover no-repeat;
  color: var(--text-dark);
  border-right: 1px solid rgba(109, 78, 48, 0.25);
}

.side-panel {
  background: linear-gradient(180deg, #2d1b22, #21141a 65%, #1b1116);
  color: var(--text-light);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
}

.news-panel .panel-head {
  background: linear-gradient(180deg, rgba(236, 223, 191, 0.92), rgba(220, 204, 169, 0.92));
}

.side-panel .panel-head {
  border-bottom-color: rgba(255, 210, 124, 0.18);
}

.panel-head h2 {
  margin: 0;
  font-size: 1.12rem;
  color: inherit;
}

.panel-head span {
  font-size: 0.75rem;
  color: inherit;
  opacity: 0.8;
}

.news-grid {
  display: grid;
  gap: 0;
}

.news-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(91, 63, 39, 0.2);
  background: rgba(255, 252, 245, 0.36);
}

.news-card img {
  width: 128px;
  height: 88px;
  object-fit: cover;
  border: 1px solid rgba(95, 66, 38, 0.42);
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.news-copy {
  padding-right: 6px;
}

.news-tag {
  margin: 0;
  color: #8a5a2f;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.news-copy h3 {
  margin: 4px 0;
  font-size: 1.02rem;
  color: #2d2018;
}

.news-copy p {
  margin: 0;
  color: #4a3b2c;
}

.news-copy time {
  display: block;
  margin-top: 8px;
  font-size: 0.76rem;
  color: #755f4a;
}

.ext-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.ext-item {
  border: 1px solid rgba(255, 219, 145, 0.16);
  background: linear-gradient(180deg, rgba(64, 42, 51, 0.82), rgba(36, 24, 30, 0.86));
  border-radius: 8px;
  padding: 10px;
}

.ext-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.ext-item h3 {
  margin: 0;
  font-size: 0.92rem;
  color: #f7e5be;
}

.ext-top span {
  color: #26190c;
  background: linear-gradient(180deg, #f3cf82, #b7873c);
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  font-size: 0.66rem;
  text-transform: uppercase;
  padding: 3px 7px;
}

.ext-item p {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: #cab79b;
}

.quick-panels {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-card {
  border: 1px solid rgba(255, 211, 123, 0.22);
  border-radius: 9px;
  padding: 15px;
  background: linear-gradient(180deg, rgba(56, 33, 39, 0.92), rgba(26, 16, 21, 0.95));
}

.quick-card h3 {
  margin: 0 0 8px;
  color: #f0cf87;
  font-size: 1rem;
}

.quick-card p {
  margin: 0;
  color: #cdb799;
}

.site-footer {
  padding: 20px 0 36px;
  text-align: center;
  color: #b89c81;
  font-size: 0.8rem;
}

.full-width {
  grid-column: 1 / -1;
}

.flash {
  margin: 0;
  padding: 11px 14px;
  background: linear-gradient(180deg, rgba(90, 54, 36, 0.95), rgba(53, 33, 24, 0.96));
  border-bottom: 1px solid rgba(240, 199, 121, 0.3);
  color: #f6e6c6;
}

.profile-page {
  padding-top: 24px;
  padding-bottom: 28px;
  display: grid;
  gap: 12px;
}

.profile-head,
.profile-card {
  border: 1px solid rgba(0, 0, 0, 0.62);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(233, 220, 190, 0.95), rgba(220, 204, 170, 0.95));
  color: #2e231c;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  padding: 16px;
}

.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-head h1,
.profile-card h2 {
  margin: 0;
}

.profile-card p {
  margin: 10px 0;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .auth-box {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .news-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(109, 78, 48, 0.25);
  }

  .quick-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    margin-top: 6px;
  }

  .main-nav.open {
    display: flex;
  }

  .hero {
    min-height: 280px;
  }

  .hero-content {
    padding: 22px 18px;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .news-card img {
    width: 100%;
    height: 170px;
    margin-bottom: 8px;
  }
}

.character-list {
  display: grid;
  gap: 12px;
}

.character-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(77, 55, 37, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.45);
}

.character-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.character-main h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.character-main p {
  margin: 2px 0;
  color: #5b4938;
  font-size: 0.86rem;
}

.character-avatar {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(58, 40, 26, 0.4);
}

.character-avatar.fallback {
  background: linear-gradient(180deg, #76573f, #463228);
}

.character-actions {
  flex-shrink: 0;
}

.guild-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.guild-member {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 142, 0.12);
  background: linear-gradient(180deg, rgba(58, 37, 44, 0.82), rgba(31, 20, 26, 0.9));
}

.guild-member strong {
  display: block;
  font-size: 0.9rem;
}

.guild-member span {
  color: #bfa88b;
  font-size: 0.8rem;
}

.guild-rank {
  color: #f0cf87;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  .character-item,
  .guild-member {
    flex-direction: column;
    align-items: flex-start;
  }
}

.small-note {
  margin: 8px 0 0;
  color: #7b6957;
  font-size: 0.84rem;
}
