:root{
  --text:#f2e6c9;
  --muted:rgba(242,230,201,.70);

  --panel: rgba(20,16,12,.86);
  --panel2: rgba(12,10,8,.78);
  --stroke: rgba(255,215,150,.22);
  --stroke2: rgba(0,0,0,.45);

  --gold: #f0d08a;
  --gold2:#caa45c;

  --blood:#b84a3a;
  --mana:#4e7ad6;

  --shadow: 0 18px 40px rgba(0,0,0,.55);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%; margin:0; color:var(--text);}

body{
  font-family: Georgia, 'Times New Roman', serif;
  background:
    radial-gradient(900px 500px at 50% 10%, rgba(240,208,138,.12), transparent 65%),
    linear-gradient(180deg, #09070a, #050409);
  /* Если положишь web/assets/bg.jpg — будет как в твоём примере */
  background-image:
    linear-gradient(180deg, rgba(0,0,0,.65), rgba(0,0,0,.85)),
    url("./assets/bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.app{ min-height:100%; display:flex; flex-direction:column; }

.topbar{
  position:sticky; top:0; z-index:10;
  padding: 12px 14px;
  display:flex; justify-content:space-between; align-items:center;
  background: linear-gradient(180deg, rgba(8,6,6,.92), rgba(8,6,6,.65));
  border-bottom:1px solid rgba(240,208,138,.18);
  backdrop-filter: blur(8px);
}

.brand{display:flex; gap:12px; align-items:center}
.sigil{
  width:34px; height:34px; border-radius:12px;
  background: radial-gradient(circle at 30% 30%, rgba(240,208,138,.35), rgba(0,0,0,.15) 60%),
              linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
  border:1px solid rgba(240,208,138,.25);
  box-shadow: var(--shadow);
}

.title{font-weight:900; letter-spacing:3px; font-size:13px; color:var(--gold); text-transform:uppercase;}
.subtitle{font-size:12px; color:var(--muted)}

.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(240,208,138,.25);
  background: rgba(0,0,0,.25);
  color:var(--muted);
}

.content{ padding:14px; display:flex; flex-direction:column; gap:14px; }

.frame{
  position:relative;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.frame:before{
  content:"";
  position:absolute; inset:0;
  pointer-events:none;
  background:
    radial-gradient(600px 250px at 30% 0%, rgba(240,208,138,.10), transparent 60%),
    radial-gradient(500px 250px at 100% 20%, rgba(184,74,58,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 45%);
  opacity:.95;
}
.panel{ padding:14px; }
.panelTitle{ position:relative; font-weight:900; letter-spacing:.4px; }
.panelTitle.small{ font-size:13px; color:var(--gold); margin-top:2px; }
.panelDesc{ position:relative; margin-top:6px; color:var(--muted); font-size:12px; line-height:1.35; }

.screen{ display:none; }
.screen.active{ display:block; }

.btn{
  font-size:13px;
  appearance:none; border:none;
  border-radius: 16px;
  padding:10px 12px;
  font-weight:900;
  color:var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border:1px solid rgba(240,208,138,.22);
  cursor:pointer;
}
.btn:active{ transform: translateY(1px); }
.btn.wide{ width:100%; }
.btn.primary{
  background: linear-gradient(180deg, rgba(240,208,138,.26), rgba(255,255,255,.03));
  border-color: rgba(240,208,138,.35);
}
.btn.big{ padding:10px 10px; border-radius:16px; font-size:13px; }
.btn.rune{ border-radius:14px; padding:10px 8px; font-size:13px; }
.btn.locked{ opacity:.55; cursor:not-allowed; }

.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }

.formRow{ margin-top:12px; display:flex; flex-direction:column; gap:8px; position:relative; }
.label{ font-size:12px; color:var(--muted); }
.input{
  border-radius:14px;
  padding:12px;
  outline:none;
  border:1px solid rgba(240,208,138,.22);
  background: rgba(0,0,0,.28);
  color:var(--text);
}

.hint{ margin-top:10px; font-size:11px; color:rgba(242,230,201,.60); position:relative; }

.classGrid{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.classBtn{
  text-align:left;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(240,208,138,.20);
  background: rgba(0,0,0,.22);
  cursor:pointer;
}
.classBtn .cTitle{ font-weight:950; color:var(--gold); }
.classBtn .cDesc{ font-size:11px; color:var(--muted); margin-top:4px; line-height:1.25; }
.classBtn.active{
  border-color: rgba(240,208,138,.55);
  background: linear-gradient(180deg, rgba(240,208,138,.14), rgba(0,0,0,.18));
}

.hero{ display:flex; gap:14px; align-items:stretch; }
.avatarWrap{ position:relative; width:96px; flex:0 0 96px; }
.avatar{
  width:96px; height:96px; border-radius: 20px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.20), rgba(0,0,0,.12) 55%),
    linear-gradient(180deg, rgba(240,208,138,.10), rgba(0,0,0,.20));
  border:1px solid rgba(240,208,138,.25);
  box-shadow: var(--shadow);
}
.aura{
  position:absolute; inset:-18px;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(240,208,138,.10), transparent 70%);
  filter: blur(2px);
  pointer-events:none;
}

.heroInfo{ flex:1; position:relative; display:flex; flex-direction:column; gap:10px; }
.nameRow{ display:flex; align-items:baseline; gap:10px; }
.heroName{ font-weight:950; font-size:16px; letter-spacing:.3px; }
.heroClass{ color:var(--gold2); font-weight:900; font-size:12px; opacity:.95; }

.metaRow{ display:flex; gap:10px; }
.metaItem{
  border:1px solid rgba(240,208,138,.18);
  background: rgba(0,0,0,.22);
  border-radius:14px;
  padding:8px 10px;
  min-width:120px;
}
.metaLabel{ font-size:11px; color:var(--muted); }
.metaValue{ font-weight:950; margin-top:2px; }

.barBlock{ display:flex; flex-direction:column; gap:6px; }
.barLabel{ font-size:11px; color:var(--muted); letter-spacing:.4px; }
.bar{
  position:relative;
  height:14px;
  border-radius:999px;
  border:1px solid rgba(240,208,138,.18);
  background: rgba(0,0,0,.25);
  overflow:hidden;
}
.barFill{ height:100%; width:0%; }
.bar.hp .barFill{ background: linear-gradient(90deg, rgba(184,74,58,.95), rgba(240,208,138,.35)); }
.bar.mana .barFill{ background: linear-gradient(90deg, rgba(78,122,214,.95), rgba(240,208,138,.25)); }
.barText{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:flex-end;
  padding:0 8px;
  font-size:11px;
  color:rgba(242,230,201,.88);
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

.statsGrid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; }
.stat{
  border:1px solid rgba(240,208,138,.16);
  border-radius:14px;
  padding:8px 10px;
  background: rgba(0,0,0,.22);
}
.statKey{ font-size:11px; color:var(--muted); }
.statVal{ font-weight:950; margin-top:2px; }

.heroActions{ display:flex; gap:10px; }

.divider{ height:1px; background: rgba(240,208,138,.12); margin:14px 0; }

.equipGrid{ display:grid; grid-template-columns: 1fr 1fr 1fr; gap:10px; margin-top:10px; }
.slot{
  border:1px solid rgba(240,208,138,.14);
  border-radius:16px;
  background: rgba(0,0,0,.20);
  padding:8px;
}
.slotName{ font-size:11px; color:var(--muted); margin-bottom:8px; }
.slotBtn{
  width:100%;
  text-align:left;
  border:1px solid rgba(240,208,138,.18);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:8px;
  border-radius:14px;
  cursor:pointer;
  font-weight:900;
}

.bag{ display:grid; grid-template-columns: 1fr 1fr; gap:8px; margin-top:10px; }
.item{
  min-height:52px;
  display:flex; align-items:center; justify-content:space-between;
  border:1px solid rgba(240,208,138,.14);
  border-radius:16px;
  background: rgba(0,0,0,.20);
  padding:8px;
}
.itemName{ font-weight:950; }
.itemMeta{ font-size:11px; color:var(--muted); }

.pvpCards{ display:grid; gap:10px; margin-top:10px; }
.miniCard{
  border:1px solid rgba(240,208,138,.14);
  background: rgba(0,0,0,.20);
  border-radius:18px;
  padding:12px;
}
.miniTitle{ font-weight:950; color:var(--gold); }
.miniText{ margin-top:6px; color:var(--muted); font-size:12px; min-height:18px; white-space:pre-wrap; }

.battleGrid{ display:grid; grid-template-columns:1fr; gap:10px; margin-top:12px; }
.fighter{
  border:1px solid rgba(240,208,138,.14);
  background: rgba(0,0,0,.20);
  border-radius:18px;
  padding:12px;
}
.fighterHead{ display:flex; gap:10px; align-items:center; }
.medallion{
  width:44px; height:44px; border-radius:16px;
  background: radial-gradient(circle at 40% 35%, rgba(240,208,138,.22), rgba(0,0,0,.10) 60%),
              linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
  border:1px solid rgba(240,208,138,.22);
}
.medallion.enemy{
  background: radial-gradient(circle at 40% 35%, rgba(184,74,58,.22), rgba(0,0,0,.10) 60%),
              linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
}
.fighterName{ font-weight:950; letter-spacing:.2px; }
.fighterSub{ font-size:11px; color:var(--muted); margin-top:2px; }

.effects{ margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }
.effect{
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(240,208,138,.14);
  background: rgba(0,0,0,.25);
  color:rgba(242,230,201,.82);
}

.actionBar{ display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; margin-top:12px; }

.logWrap{ margin-top:12px; }
.logTitle{ font-weight:950; color:var(--gold); }
.log{
  margin-top:8px;
  border:1px solid rgba(240,208,138,.14);
  background: rgba(0,0,0,.22);
  border-radius: 18px;
  padding:8px;
  max-height: 240px;
  overflow:auto;
  font-size:12px;
  line-height:1.35;
  white-space:pre-wrap;
}
.logLine{ padding:6px 6px; border-bottom:1px solid rgba(255,255,255,.04); }
.logLine:last-child{ border-bottom:none; }

.footerActions{ margin-top:12px; display:flex; gap:10px; }

.modal.hidden{ display:none; }
.modal{
  position:fixed; inset:0; z-index:30;
  display:flex; align-items:flex-end; justify-content:center;
}
.modalBackdrop{ position:absolute; inset:0; background: rgba(0,0,0,.60); }
.modalCard{
  position:relative;
  width:min(520px, 96vw);
  border-radius: 22px;
  padding:14px;
  margin: 0 0 14px;
}
.modalTitle{ font-weight:950; color:var(--gold); }
.modalBody{ margin-top:10px; color:rgba(242,230,201,.86); font-size:12px; line-height:1.4; }


.frame:after{
  content:"";
  position:absolute; inset:0;
  pointer-events:none;
  opacity:.22;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}
