/* barzly.net — motyw ciemny szaro-żółty (z poświatą) */
:root {
  --bg:      #110f0c;
  --bg2:     #1a1813;
  --panel:   #201d16;
  --panel2:  #272318;
  --line:    #38321f;
  --line2:   #4a4226;
  --text:    #f2ecdb;
  --muted:   #a39a80;
  --muted2:  #726c52;
  --yellow:  #f5c518;
  --yellow2: #ffd84d;
  --amber:   #c99700;
  --good:    #c6e06a;
  --bad:     #e0863f;
  --radius:  18px;
  --glow:    0 0 24px rgba(245,197,24,.30);
  --glow-sm: 0 0 12px rgba(245,197,24,.25);
  --shadow:  0 18px 50px rgba(0,0,0,.55);
  --shadow-soft: 0 8px 26px rgba(0,0,0,.4);
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 520px at 78% -8%,  rgba(245,197,24,.14), transparent 60%),
    radial-gradient(820px 480px at -8% 108%,  rgba(245,197,24,.08), transparent 55%),
    radial-gradient(600px 600px at 50% 50%,   rgba(60,52,28,.18),  transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}
/* delikatna winieta + ziarno */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 90% at 50% 0%, transparent 60%, rgba(0,0,0,.45) 100%);
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 32px 20px 90px; position: relative; z-index: 1; }

/* ---- header ---- */
header.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand .mark { display: block; border-radius: 13px; animation: boltpulse 3.6s ease-in-out infinite; }
@keyframes boltpulse {
  0%, 100% { filter: drop-shadow(0 0 11px rgba(245,197,24,.28)); }
  50%      { filter: drop-shadow(0 0 22px rgba(245,197,24,.52)); }
}
.logo {
  font-family: var(--mono); font-weight: 800; font-size: 2.7rem; letter-spacing: -1.5px;
  color: var(--text); margin: 0; line-height: 1; text-shadow: 0 2px 20px rgba(0,0,0,.6);
}
.logo b { color: var(--yellow); text-shadow: 0 0 22px rgba(245,197,24,.55), 0 0 4px rgba(245,197,24,.5); }
.logo .dot { color: var(--amber); text-shadow: 0 0 18px rgba(201,151,0,.7); }
.tagline { color: var(--muted); font-size: .98rem; }
.badge {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .5px;
  color: #1a1710; background: linear-gradient(180deg, var(--yellow2), var(--yellow));
  padding: 4px 11px; border-radius: 999px; font-weight: 800;
  box-shadow: var(--glow-sm), inset 0 1px 0 rgba(255,255,255,.4);
}
.badge.ghost { background: transparent; color: var(--amber); border: 1px solid var(--line2); box-shadow: none; }

/* ---- input card ---- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
  padding: 22px;
  margin-top: 24px;
  position: relative;
}
/* subtelny żółty rant-poświata na górze karty */
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: var(--radius); pointer-events: none;
  background: linear-gradient(180deg, rgba(245,197,24,.18), transparent 28%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
textarea {
  width: 100%; min-height: 240px; resize: vertical;
  background: #131009; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; font-family: var(--mono); font-size: .98rem; line-height: 1.65;
  outline: none; transition: border-color .18s, box-shadow .18s;
  box-shadow: inset 0 2px 14px rgba(0,0,0,.5);
}
textarea:focus { border-color: var(--amber); box-shadow: inset 0 2px 14px rgba(0,0,0,.5), 0 0 0 3px rgba(245,197,24,.14), 0 0 26px rgba(245,197,24,.18); }
textarea::placeholder { color: var(--muted2); }

.row { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.spacer { flex: 1; }
.count { color: var(--muted); font-size: .82rem; font-family: var(--mono); }
.khint { font-family: var(--mono); font-size: .68rem; color: var(--muted2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.verdict:focus { outline: none; }
@media (max-width: 560px) { .khint { display: none; } }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--panel2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 13px; font-size: .8rem; cursor: pointer;
  transition: all .16s;
}
.chip:hover { color: var(--text); border-color: var(--amber); box-shadow: var(--glow-sm); transform: translateY(-1px); }

button.go {
  background: linear-gradient(180deg, var(--yellow2), var(--yellow) 60%, var(--amber));
  color: #14120a; font-weight: 800; font-size: 1.02rem;
  border: none; border-radius: 12px; padding: 13px 30px; cursor: pointer;
  letter-spacing: .3px; transition: transform .08s, filter .18s, box-shadow .18s;
  box-shadow: 0 8px 22px rgba(245,197,24,.30), 0 0 30px rgba(245,197,24,.22), inset 0 1px 0 rgba(255,255,255,.45);
}
button.go:hover { filter: brightness(1.08); box-shadow: 0 10px 30px rgba(245,197,24,.42), 0 0 44px rgba(245,197,24,.34), inset 0 1px 0 rgba(255,255,255,.5); }
button.go:active { transform: translateY(1px); }
button.go:disabled { opacity: .5; cursor: default; box-shadow: none; }

/* ---- results ---- */
.results { margin-top: 30px; display: none; }
.results.show { display: block; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.verdict { font-size: 1.45rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -.3px; }
.verdict .score { color: var(--yellow); font-family: var(--mono); text-shadow: 0 0 22px rgba(245,197,24,.5); }
.subverdict { color: var(--muted); margin-bottom: 20px; }

.grid { display: grid; grid-template-columns: 400px 1fr; gap: 24px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

.chartbox {
  background: radial-gradient(120% 120% at 50% 30%, rgba(245,197,24,.06), transparent 60%), var(--bg2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-soft), 0 0 50px rgba(245,197,24,.07) inset;
}

.axes { display: flex; flex-direction: column; gap: 13px; }
.axis {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px;
  box-shadow: var(--shadow-soft); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.axis:hover { transform: translateY(-2px); border-color: var(--line2); box-shadow: var(--shadow-soft), var(--glow-sm); }
.axis .head { display: flex; align-items: center; gap: 9px; }
.axis .name { font-weight: 700; }
.axis .val { margin-left: auto; font-family: var(--mono); font-weight: 800; font-size: 1.15rem; color: var(--yellow); text-shadow: 0 0 16px rgba(245,197,24,.45); }
.axis .bar { height: 8px; background: #131009; border-radius: 999px; margin: 10px 0 8px; overflow: hidden; box-shadow: inset 0 1px 4px rgba(0,0,0,.6); }
.axis .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--yellow2)); border-radius: 999px; width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px rgba(245,197,24,.6); }
.axis .hint { color: var(--muted); font-size: .82rem; }
.tag {
  font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted);
}
.tag.algo { color: var(--good); border-color: #4d5a2a; box-shadow: 0 0 10px rgba(198,224,106,.12); }
.tag.ai { color: var(--yellow2); border-color: var(--amber); box-shadow: var(--glow-sm); }
.tag.est { color: var(--bad); border-color: #6a4423; }

/* ---- info / footer ---- */
/* ---- werdykt + pierścień wyniku ---- */
.verdict-row { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.scorering {
  --p: 0; width: 108px; height: 108px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(var(--yellow) calc(var(--p) * 1%), #2a2618 0);
  display: grid; place-items: center;
  box-shadow: 0 0 28px rgba(245,197,24,.25), inset 0 0 0 1px rgba(0,0,0,.3);
  transition: background .8s cubic-bezier(.2,.8,.2,1);
}
.ring-inner { width: 84px; height: 84px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; line-height: 1; }
.ring-inner b { font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--yellow); text-shadow: 0 0 18px rgba(245,197,24,.5); }
.ring-inner small { color: var(--muted); font-size: .72rem; }
.verdict-text .verdict { margin: 0; }
.share { margin-left: auto; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.nick { background: #14120d; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .85rem; outline: none; min-width: 210px; }
.nick:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,197,24,.12); }
.dl { background: var(--panel2); color: var(--text); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 700; cursor: pointer; transition: color .15s, border-color .15s, box-shadow .15s; }
.dl:hover { color: var(--yellow2); border-color: var(--amber); box-shadow: var(--glow-sm); }
@media (max-width: 560px) { .verdict-row { flex-wrap: wrap; } .share { margin-left: 0; width: 100%; } }

/* ---- kafelki statystyk ---- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.tile { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; box-shadow: var(--shadow-soft); }
.tile .tv { display: block; font-family: var(--mono); font-size: 1.45rem; font-weight: 800; color: var(--text); }
.tile .tk { display: block; color: var(--muted); font-size: .72rem; margin-top: 4px; }

/* ---- podpowiedzi "co podkręcić" ---- */
.tips { margin-bottom: 24px; background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-left: 3px solid var(--yellow); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow-soft); }
.tips-head { font-weight: 800; color: var(--yellow2); margin-bottom: 8px; font-size: .95rem; }
.tip { color: var(--text); font-size: .9rem; padding: 5px 0 5px 18px; position: relative; }
.tip::before { content: "›"; position: absolute; left: 2px; color: var(--amber); font-weight: 800; }

/* ---- historia ---- */
.history { display: none; margin-top: 16px; }
.history.show { display: block; animation: fade .3s ease; }
.hist-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .8rem; margin-bottom: 8px; }
.hist-clear { background: transparent; border: none; color: var(--muted2); font: inherit; font-size: .78rem; cursor: pointer; }
.hist-clear:hover { color: var(--bad); }
.hist-items { display: flex; flex-wrap: wrap; gap: 8px; }
.hist-item { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 13px; cursor: pointer; color: var(--muted); font: inherit; font-size: .8rem; transition: color .15s, border-color .15s; }
.hist-item:hover { color: var(--text); border-color: var(--line2); }
.hist-item .hp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.hist-item .hs { font-family: var(--mono); font-weight: 800; color: var(--yellow); background: #14120d; border-radius: 999px; padding: 2px 8px; font-size: .78rem; }

/* ---- panel rymów + podświetlanie ---- */
.panel { margin-top: 24px; background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-soft); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 1.05rem; }
.muted { color: var(--muted); font-weight: 400; font-size: .85rem; }
.legend { display: inline-flex; align-items: center; }
.legend i.rh { display: inline-block; width: 15px; height: 15px; border-radius: 4px; background: var(--c); margin-left: 5px; box-shadow: 0 0 8px var(--c); }
.rhtext {
  font-family: var(--mono); line-height: 2.05; font-size: .98rem; color: var(--text);
  background: #14120d; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  box-shadow: inset 0 2px 14px rgba(0,0,0,.45); overflow-wrap: anywhere;
}
.rhtext .rh { color: var(--c); background: color-mix(in srgb, var(--c) 17%, transparent); border-radius: 5px; padding: 1px 3px; font-weight: 600; }
.rhtext .rh-deep { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rhtext .rh-full { font-weight: 800; box-shadow: inset 0 -2px 0 var(--c); }
.rhtext .rh-soft { font-weight: 600; background: color-mix(in srgb, var(--c) 9%, transparent); border: 1px dashed color-mix(in srgb, var(--c) 55%, transparent); }

/* ---- zakładki Rymy/Klisze + klisze ---- */
.tabs { display: inline-flex; gap: 4px; background: #14120d; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tab { background: transparent; border: none; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 700; padding: 5px 13px; border-radius: 7px; cursor: pointer; transition: color .15s, background .15s; }
.tab:hover { color: var(--text); }
.tab.active { background: linear-gradient(180deg, var(--yellow2), var(--yellow)); color: #14120a; box-shadow: 0 0 14px rgba(245,197,24,.25); }
.tab .muted { font-weight: 400; }
.tab.active .muted { color: #3a3206; }
.rhtext .cl { color: #ff9a6b; background: rgba(224,134,63,.14); border-bottom: 2px dotted #e0863f; border-radius: 3px; padding: 1px 2px; }
.clist { display: none; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.clist.show { display: flex; }
.clitem { background: rgba(224,134,63,.12); border: 1px solid #6a4423; color: #ffb487; border-radius: 999px; padding: 4px 11px; font-size: .82rem; font-family: var(--mono); }
.clitem b { color: #ffd1a8; margin-left: 6px; font-weight: 700; }

/* ---- przełącznik trybu + pojedynek ---- */
.modeswitch { display: inline-flex; gap: 4px; background: #14120d; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-top: 22px; }
.ms { background: transparent; border: none; color: var(--muted); font: inherit; font-weight: 700; padding: 8px 18px; border-radius: 9px; cursor: pointer; transition: color .15s, background .15s; }
.ms:hover { color: var(--text); }
.ms.active { background: linear-gradient(180deg, var(--yellow2), var(--yellow)); color: #14120a; box-shadow: 0 0 16px rgba(245,197,24,.25); }
.battle-in { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .battle-in { grid-template-columns: 1fr; } }
.bcol { display: flex; flex-direction: column; gap: 8px; }
.bcol label { color: var(--muted); font-size: .85rem; font-weight: 700; }
.bcol textarea { min-height: 180px; }
.btable { display: flex; flex-direction: column; gap: 8px; }
.brow { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.brow.head { background: transparent; border: none; padding: 0 12px; color: var(--muted); font-size: .74rem; }
.brow .ba { font-family: var(--mono); font-weight: 800; text-align: left; color: var(--text); }
.brow .bb { font-family: var(--mono); font-weight: 800; text-align: right; color: var(--text); }
.brow .blabel { text-align: center; color: var(--muted); font-size: .85rem; }
.brow.win-a { border-color: #4a4226; }
.brow.win-a .ba { color: var(--yellow); text-shadow: 0 0 12px rgba(245,197,24,.4); }
.brow.win-b { border-color: #2f5a55; }
.brow.win-b .bb { color: #5fd2c6; text-shadow: 0 0 12px rgba(95,210,198,.4); }
.rhnote { color: var(--muted); font-size: .8rem; margin: 12px 0 0; }
.rh-0 { --c: #ffd84d; } .rh-1 { --c: #5fd2c6; } .rh-2 { --c: #ff8fb3; } .rh-3 { --c: #a8e06a; }
.rh-4 { --c: #80b3ff; } .rh-5 { --c: #ffab66; } .rh-6 { --c: #c79bff; } .rh-7 { --c: #ff7d7d; }
.rh-8 { --c: #00d4aa; } .rh-9 { --c: #ff6fae; } .rh-10 { --c: #b6e24a; } .rh-11 { --c: #5aa0ff; }
.rh-12 { --c: #ffc14d; } .rh-13 { --c: #b07bff; } .rh-14 { --c: #ff9a6b; } .rh-15 { --c: #66e0d0; }

/* ---- per zwrotka ---- */
.verses { display: none; margin-top: 24px; }
.verses.show { display: block; animation: fade .35s ease; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.vcard { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-soft); }
.vhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.vnum { font-weight: 700; font-size: .9rem; }
.vscore { font-family: var(--mono); font-weight: 800; color: var(--yellow); font-size: 1.25rem; text-shadow: 0 0 14px rgba(245,197,24,.4); }
.vbars { display: flex; flex-direction: column; gap: 6px; }
.mb { display: grid; grid-template-columns: 48px 1fr 26px; align-items: center; gap: 8px; }
.mbl { color: var(--muted); font-size: .72rem; }
.mbt { height: 6px; background: #14120d; border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.6); }
.mbt > i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--yellow2)); border-radius: 999px; }
.mbv { font-family: var(--mono); font-size: .72rem; color: var(--text); text-align: right; }

/* ---- podpowiedź / shake ---- */
.hint-msg { color: var(--yellow2); font-size: .82rem; }
textarea.shake { animation: shake .35s; border-color: var(--amber); }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

.note {
  margin-top: 28px; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--amber); border-radius: 12px; color: var(--muted); font-size: .88rem;
  box-shadow: var(--shadow-soft), -8px 0 24px rgba(201,151,0,.06);
}
.note b { color: var(--text); }
footer { margin-top: 44px; color: var(--muted2); font-size: .8rem; text-align: center; }
footer a, a { color: var(--yellow2); text-decoration: none; }
footer a:hover, a:hover { text-shadow: var(--glow-sm); }

/* ---- "Jak to działa" ---- */
.howto { margin-top: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 2px 18px; }
.howto summary { cursor: pointer; padding: 15px 0; font-weight: 700; color: var(--text); list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: "▸  "; color: var(--amber); }
.howto[open] summary::before { content: "▾  "; }
.howto-body { color: var(--muted); font-size: .9rem; padding-bottom: 16px; }
.howto-body ul { margin: 10px 0; padding-left: 18px; }
.howto-body li { margin: 7px 0; }
.howto-body b { color: var(--text); }
.howto-note { color: var(--muted2); font-style: italic; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
