/* css/system_wierzchowcow.css */
:root{
  --bg:#0b1116;
  --card:#0e151c;
  --ink:#dbe7ee;
  --muted:#96a7b3;
  --acc:#00ffaa;
  --edge:#203040;
  --chip:#0f161d;
  --slot-size: 32px;
  --gap: 14px;
  --rad: 14px;
  --shadow: 0 6px 22px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  background:#071017;
  color:var(--ink);
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;
}
img{display:block;max-width:100%}

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:24px 16px 32px;
}

.page-head h1{margin:0 0 8px;font-size:28px}
.lead{color:var(--muted);line-height:1.6;margin:0 0 18px}

/* Karty */
.card{
  background:linear-gradient(180deg,rgba(15,22,28,.95),rgba(13,19,24,.95));
  border:1px solid var(--edge);
  border-radius:18px;
  padding:18px 18px 20px;
  box-shadow:var(--shadow);
  margin:20px 0;
}
.card-title{
  font-weight:700;
  margin:2px 0 14px;
  color:#b8f7ff;
}

/* Tabele */
.table-wrap{
  overflow:auto;
  border-radius:10px;
  border:1px solid var(--edge);
}
.tbl{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}
.tbl th,.tbl td{
  padding:10px 12px;
  border-bottom:1px solid #12202b;
  vertical-align:middle;
}
.tbl thead th{
  background:#0f1a22;
  color:#9fe8ff;
  position:sticky;
  top:0;
  z-index:1;
}
.tbl tbody tr:hover{background:#0e1820}
.tbl .ico{
  width:38px;
  height:38px;
  object-fit:contain;
  filter:drop-shadow(0 0 4px rgba(0,0,0,.4));
}

.tbl th, .tbl td{font-size:15px}
.tbl .ico{width:44px;height:44px}

.page-foot{
  margin:28px 0 12px;
  color:#6f8796;
  font-size:13px;
}

/* UI board */
.ui-board{
  position:relative;
  width:100%;
  max-width:500px;
  margin:0 auto 18px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--edge);
}
#ui-img{
  width:100%;
  height:auto;
  display:block;
}
.ui-wrap{
  position:absolute;
  inset:0;
}

/* Sloty */
.slot{
  position:absolute;
  width:var(--slot-size);
  height:var(--slot-size);
  transform:translate(-50%,-50%);
  border-radius:14px;
  background:transparent;
  border:none;
  outline:1px dashed rgba(76, 52, 3, 0.5);
  outline-offset:-2px;
  display:grid;
  place-items:center;
  transition:outline-color .2s, box-shadow .2s;
}
.slot.hover{outline-color:rgba(0,255,170,.5)}
.slot.filled{outline:none}
.slot.locked{
  outline-color:rgba(71, 43, 2, 0.4);
  filter:grayscale(.4) brightness(.8);
}

.slot img{
  width:100%;
  height:100%;
  object-fit:contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.45));
  pointer-events:none;
}

.slot .badge{
  position:absolute;
  bottom:6px;
  left:50%;
  transform:translateX(-50%);
  font-size:12px;
  color:#9fe8ff;
  background:rgba(10,18,24,.85);
  border:1px solid #1f3545;
  padding:2px 6px;
  border-radius:999px;
}
.slot .remove{
  position:absolute;
  top:4px;
  right:4px;
  width:24px;
  height:24px;
  border-radius:999px;
  border:1px solid #2a3f4f;
  background:#0f151c;
  color:#cdeaf2;
  cursor:pointer;
  font-weight:700;
  line-height:1;
}
.slot .remove:hover{background:#14222d}

/* Flash animacje */
.slot.flash{
  animation:flash 0.6s ease;
}
@keyframes flash{
  0%{box-shadow:0 0 0 rgba(255,255,255,0);}
  40%{box-shadow:0 0 20px rgba(255,255,255,0.9);}
  100%{box-shadow:0 0 0 rgba(255,255,255,0);}
}
.slot.error{
  animation:errorFlash 0.5s ease;
}
@keyframes errorFlash{
  0%{box-shadow:0 0 0 rgba(255,50,50,0);}
  40%{box-shadow:0 0 20px rgba(255,50,50,0.9);}
  100%{box-shadow:0 0 0 rgba(255,50,50,0);}
}

/* Panel ekwipunku */
.gear-panel{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  margin-top:16px;
}
.gear-panel.single{
  margin-top:10px;
}
.gear-col{
  flex:1 1 220px;
}
.gear-col h3{
  margin:4px 0 8px;
  font-size:15px;
}
.gear-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:10px;
}

.chip{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--edge);
  background:var(--chip);
  border-radius:12px;
  cursor:grab;
  transition:transform .12s, border-color .2s, background .2s;
}
.chip:active{
  cursor:grabbing;
  transform:scale(.99);
}
.chip:hover{
  border-color:#1f4050;
  background:#131c25;
}
.chip img{
  width:40px;
  height:40px;
  object-fit:contain;
}
.chip .nm{
  font-weight:600;
}
.chip .meta{
  font-size:12px;
  color:var(--muted);
}

/* Podsumowanie */
.summary h3{
  margin:4px 0 10px;
}
.sum-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.sum-item{
  background:#0f181f;
  border:1px solid #224050;
  color:#c1eff4;
  padding:7px 10px;
  border-radius:999px;
  font-size:14px;
}

/* Tooltip */
.tooltip{
  position:fixed;
  z-index:9999;
  min-width:240px;
  max-width:360px;
  background:#0b1218;
  border:1px solid #254158;
  color:#d7f6ff;
  border-radius:12px;
  box-shadow:0 10px 34px rgba(0,0,0,.45);
  padding:10px 12px;
  pointer-events:none;
}
.tooltip .tt-h{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:6px;
}
.tooltip .tt-h img{
  width:30px;
  height:30px;
  object-fit:contain;
}
.tooltip .kv{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:6px 12px;
  font-size:13px;
}
.tooltip hr{
  border:none;
  border-top:1px solid #203848;
  margin:8px 0;
}

/* Intro card */
.intro-card{
  border:1px solid var(--edge);
  background:linear-gradient(180deg,rgba(14,20,25,0.96),rgba(11,17,22,0.95));
  box-shadow:var(--shadow);
  border-radius:18px;
  padding:22px 20px;
}
.intro-card .card-title{
  font-size:20px;
  color:#a3eaff;
  margin-bottom:10px;
  text-shadow:0 0 8px rgba(0,255,200,.15);
}
.intro-card .card-body{
  color:var(--muted);
  font-size:15.5px;
  line-height:1.7;
}
.intro-card .card-body b{
  color:var(--acc);
}
.intro-card .card-body i{
  color:#b8f7ff;
}

/* Hint */
.hint{
  margin:8px 2px 0;
  color:var(--muted);
  font-size:13px;
}

/* Back button */
.back-bar{
  display:flex;
  justify-content:flex-start;
  margin:10px 0 22px;
}
.back-btn{
  display:inline-block;
  background:linear-gradient(90deg,#00ffaa1a,#00ffaa33);
  color:var(--acc);
  padding:10px 18px;
  border:1px solid var(--edge);
  border-radius:12px;
  font-weight:600;
  text-decoration:none;
  transition:all 0.2s ease;
  box-shadow:0 4px 12px rgba(0,255,170,.1);
}
.back-btn:hover{
  background:linear-gradient(90deg,#00ffaa3a,#00ffaa4a);
  color:#b8fff5;
  box-shadow:0 4px 14px rgba(0,255,170,.25);
  transform:translateY(-1px);
}

/* Responsywność */
@media (min-width: 860px){
  :root{ --slot-size: 90px; }
}

/* === PANEL METIN2 STYLE === */

.horse-panel {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
}

.horse-ui-left {
  width: 60%;
}

.horse-ui-right {
  width: 40%;
  background: rgba(0,0,0,.25);
  padding: 15px;
  border-radius: 10px;
}

.horse-exp-box {
  margin-top: 10px;
  background: rgba(0,0,0,.35);
  padding: 10px;
  border-radius: 8px;
}

.horse-exp-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.horse-lv-label {
  background: #222;
  padding: 4px 10px;
  border-radius: 5px;
  font-weight: bold;
  color: #00ffae;
}

.horse-exp-text {
  background: #111;
  padding: 4px 10px;
  border-radius: 5px;
}

.horse-exp-bar-wrap {
  background: #111;
  height: 16px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #0f0;
}

.horse-exp-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22ff99, #00cc88);
  transition: width .25s linear;
}

/* PANEL MEDALI PO PRAWEJ */
.medal-select {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.medal-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111;
  border: 1px solid #444;
  color: #eee;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: .15s;
}

.medal-btn img {
  width: 28px;
  height: 28px;
}

.medal-btn:hover {
  background: #222;
  transform: scale(1.03);
}

/* ===== PASEK EXPA W PANELU UI ===== */

.ui-exp-panel {
  position: absolute;
  left: 32px;           /* <<< PRZESUNIĘCIE W PRAWO */
  top: 319px;           /* twoje ustawienie – zostaje */
  width: 430px;         /* <<< MNIEJSZA SZEROKOŚĆ (obcięcie z lewej) */
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.ui-exp-title {
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 4px;
  color: #e6d3a2;
  text-shadow: 0 0 4px #000;
}

.ui-exp-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ui-exp-box {
  background: #0f0f0f;
  border: 1px solid #5c4023;
  padding: 3px 8px;
  border-radius: 4px;
  color: #d9d9d9;
  font-size: 13px;
  min-width: 50px;
}

.ui-exp-bar-wrap {
  width: 100%;            /* <<< dopasowane do nowego width panelu */
  height: 30px;           /* <<< realny rozmiar z UI Metina */
  border: 1px solid #5c4023;
  border-radius: 6px;
  overflow: hidden;
  background: #141414;
  position: relative;
}

.ui-exp-bar {
  height: 100%;
  background: linear-gradient(90deg, #33ff99, #00cc77);
  width: 0%;
  transition: width 0.25s linear;
}

.ui-exp-row {
  position: relative;
  height: 26px;
}

/* box z poziomem */
.ui-exp-level {
  position: absolute !important;
  left: -8px;          /* Ustawiasz gdzie chcesz */
  top: -13px;         /* Ustawiasz gdzie chcesz */
  width: 95px;  
  height: 32px;      /* <<< TERAZ MOŻESZ ZMIENIAĆ SZEROKOŚĆ */
  text-align: center; /* opcjonalnie */
}

/* box z doświadczeniem */
.ui-exp-value {
  position: absolute !important;
  right: -10px;        /* albo left: Xpx */
  top: -13px;         /* Ustawiasz gdzie chcesz */
  width: 345px;
  height: 32px;       /* <<< SZEROKOŚĆ DRUGIEGO BLOKU */
  text-align: center; /* wygląda ładnie */
}

.boost-level-panel {
  margin-top: 20px;
  background: rgba(0,0,0,.25);
  padding: 12px;
  border: 1px solid #203040;
  border-radius: 10px;
  width: 280px;
}

.boost-level-panel label {
  font-weight: bold;
  color: #00ffaa;
  display: block;
  margin-bottom: 8px;
}

.boost-row {
  display: flex;
  gap: 10px;
}

#boost-input {
  width: 80px;
  padding: 6px;
  background: #111;
  border: 1px solid #444;
  color: #eee;
  border-radius: 6px;
}

#boost-btn {
  flex: 1;
  background: #00cc77;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: #000;
  font-weight: bold;
  transition: .15s;
}

#boost-btn:hover {
  background: #00ff99;
  transform: scale(1.03);
}

.boost-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #8ca4b3;
}

.fast-level, .manual-level {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 15px;
}

.fast-btn {
  background: #0f1a22;
  border: 1px solid #1d3a4b;
  padding: 8px 12px;
  border-radius: 8px;
  color: #cff8ff;
  cursor: pointer;
  font-weight: 600;
  transition: .15s;
}

.fast-btn:hover {
  background: #162630;
  transform: scale(1.05);
}

.fast-btn:active {
  transform: scale(0.96);
}

.manual-level input {
  width: 70px;
  background: #111;
  border: 1px solid #1d3a4b;
  border-radius: 6px;
  padding: 6px;
  color: #00ffaa;
  text-align: center;
  font-size: 15px;
}
