/* AXEMAN — UI: σκούρα πάνελ με χρυσό, serif γράμματα, μεσαιωνική αίσθηση */
:root {
  --gold: #e8c46a; --gold2: #b8862e; --ink: #f3ead6; --dim: #b8ab90; --panel: rgba(14, 10, 8, 0.82); --edge: rgba(232, 196, 106, 0.55);
  --red: #c8342a; --blue: #4a8aff; --green: #4ad06a;
  --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, 'Times New Roman', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: var(--serif); color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: none; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#ui .screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto; }
.hidden { display: none !important; }

/* ---------- φόρτωση */
#loading { position: fixed; inset: 0; z-index: 50; background: radial-gradient(ellipse at 50% 40%, #241812, #050302 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; transition: opacity .8s; }
#loading .bar { width: min(420px, 70vw); height: 6px; border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; background: #120c08; }
#loading .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold2), var(--gold)); transition: width .2s; }
#loading .msg { color: var(--dim); font-size: 14px; letter-spacing: .12em; }

/* ---------- λογότυπο */
.logo { font-size: clamp(54px, 10vw, 132px); font-weight: 700; letter-spacing: .12em; line-height: .95; text-align: center;
  background: linear-gradient(180deg, #fff6d6 0%, #f2cf74 32%, #b07a26 58%, #f6d888 78%, #8a5a18 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #2a1606) drop-shadow(0 0 24px rgba(255, 180, 80, .35)); text-transform: uppercase; }
.logo small { display: block; font-size: .2em; letter-spacing: .5em; margin-top: .6em; filter: none; }
.tagline { margin-top: 6px; color: #e9dcc0; font-size: clamp(15px, 1.8vw, 22px); letter-spacing: .3em; text-shadow: 0 2px 6px #000; font-style: italic; }
.press { margin-top: 7vh; font-size: 18px; letter-spacing: .4em; color: var(--gold); animation: pulse 1.6s infinite; text-shadow: 0 0 12px rgba(255, 200, 100, .5); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- μενού */
.menu { display: flex; flex-direction: column; gap: 10px; margin-top: 4vh; min-width: min(420px, 86vw); }
.btn { pointer-events: auto; font-family: var(--serif); font-size: clamp(17px, 1.9vw, 22px); letter-spacing: .18em; color: var(--ink); background: linear-gradient(180deg, rgba(40, 28, 18, .9), rgba(16, 10, 6, .92));
  border: 1px solid var(--edge); border-radius: 3px; padding: 12px 22px; cursor: pointer; text-align: center; position: relative; transition: transform .12s, background .12s, color .12s; text-transform: uppercase; }
.btn::before, .btn::after { content: '◆'; position: absolute; top: 50%; transform: translateY(-50%); color: var(--gold2); font-size: 10px; opacity: .7; }
.btn::before { left: 10px; } .btn::after { right: 10px; }
.btn:hover, .btn.sel { background: linear-gradient(180deg, rgba(120, 78, 26, .95), rgba(60, 34, 10, .95)); color: #fff4d4; transform: scale(1.03); box-shadow: 0 0 22px rgba(232, 196, 106, .28); }
.btn .sub { display: block; font-size: 12px; letter-spacing: .12em; color: var(--dim); text-transform: none; margin-top: 3px; font-style: italic; }
.btn.small { font-size: 14px; padding: 8px 14px; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 4px; padding: 22px 26px; box-shadow: 0 10px 50px rgba(0, 0, 0, .6), inset 0 0 40px rgba(0, 0, 0, .5); }
h2.title { font-size: clamp(26px, 3.2vw, 40px); letter-spacing: .2em; color: var(--gold); margin: 0 0 14px; text-align: center; text-transform: uppercase; text-shadow: 0 2px 0 #2a1606, 0 0 16px rgba(255, 190, 90, .3); font-weight: 700; }
.hint { color: var(--dim); font-size: 13px; letter-spacing: .08em; text-align: center; margin-top: 12px; }

/* ---------- επιλογή ήρωα */
.screen.herosel { justify-content: flex-end; padding-bottom: 3vh; }
.screen.herosel h2.title { margin-bottom: 4px; }
.heroes { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 2vh; max-width: 1180px; }
.hcard { width: 262px; background: linear-gradient(180deg, rgba(30, 20, 14, .92), rgba(10, 6, 4, .94)); border: 1px solid rgba(232, 196, 106, .3); border-radius: 4px; padding: 14px 16px; cursor: pointer; pointer-events: auto; transition: transform .15s, border-color .15s, box-shadow .15s; position: relative; }
.hcard:hover, .hcard.sel { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 0 30px rgba(232, 196, 106, .35); }
.hcard.p2 { box-shadow: 0 0 0 2px #4a8aff, 0 0 30px rgba(74, 138, 255, .4); }
.hcard .tag { position: absolute; top: 8px; right: 10px; font-size: 12px; letter-spacing: .1em; padding: 2px 8px; border-radius: 3px; }
.hcard .tag.p1 { background: #8a1a14; } .hcard .tag.p2 { background: #1a3a8a; }
.hcard img { width: 64px; height: 64px; float: left; margin-right: 12px; filter: drop-shadow(0 3px 4px #000); }
.hcard h3 { margin: 4px 0 0; font-size: 22px; letter-spacing: .08em; color: #fff0d0; }
.hcard .ht { color: var(--gold); font-size: 13px; font-style: italic; }
.hcard p { clear: both; font-size: 13.5px; line-height: 1.45; color: #d8ccb0; margin: 12px 0 10px; min-height: 58px; }
.stat { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .12em; color: var(--dim); margin: 3px 0; }
.stat b { width: 78px; font-weight: normal; }
.stat i { flex: 1; height: 6px; background: #20160e; border-radius: 3px; overflow: hidden; }
.stat i u { display: block; height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); }

/* ---------- επιλογή πίστας */
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; width: min(1100px, 92vw); max-height: 64vh; overflow: auto; padding: 4px; }
.scard { background: linear-gradient(180deg, rgba(34, 24, 16, .92), rgba(12, 8, 5, .94)); border: 1px solid rgba(232, 196, 106, .28); border-radius: 4px; padding: 12px 14px; cursor: pointer; pointer-events: auto; transition: .15s; }
.scard:hover, .scard.sel { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 0 22px rgba(232, 196, 106, .28); }
.scard .ch { font-size: 11px; letter-spacing: .25em; color: var(--gold); }
.scard h4 { margin: 4px 0; font-size: 18px; color: #fff0d0; letter-spacing: .04em; }
.scard .ty { font-size: 12px; color: var(--dim); font-style: italic; }
.scard .best { font-size: 11px; color: #9ad0a0; margin-top: 4px; }

/* ---------- ρυθμίσεις */
.set { display: grid; grid-template-columns: 200px 260px; gap: 12px 18px; align-items: center; font-size: 16px; letter-spacing: .06em; }
.set input[type=range] { width: 100%; accent-color: var(--gold); pointer-events: auto; }
.set select { font-family: var(--serif); font-size: 15px; background: #1a120c; color: var(--ink); border: 1px solid var(--edge); padding: 5px 8px; pointer-events: auto; }
.keys { font-size: 15px; line-height: 1.9; color: #e8dcc0; }
.keys kbd { display: inline-block; min-width: 26px; padding: 0 7px; margin: 0 2px; border: 1px solid var(--edge); border-radius: 3px; background: #241810; color: var(--gold); font-family: var(--serif); font-size: 13px; text-align: center; }

/* ---------- εισαγωγή πίστας */
#intro { background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,.25), rgba(0,0,0,.75) 70%); }
#intro .ch { font-size: 16px; letter-spacing: .6em; color: var(--gold); text-shadow: 0 2px 8px #000; }
#intro h1 { font-size: clamp(36px, 6vw, 76px); margin: 10px 0; letter-spacing: .08em; color: #fff3d6; text-shadow: 0 4px 0 #2a1606, 0 0 30px rgba(255, 170, 70, .4); text-align: center; }
#intro p { max-width: 760px; text-align: center; font-size: clamp(15px, 1.6vw, 19px); line-height: 1.6; color: #e9dcc0; text-shadow: 0 2px 6px #000; font-style: italic; padding: 0 20px; }
#intro .press { margin-top: 3vh; font-size: 14px; }

/* ---------- HUD */
#hud { position: absolute; inset: 0; pointer-events: none; }
.pp { position: absolute; bottom: 18px; display: flex; gap: 12px; align-items: flex-end; padding: 10px 14px; background: linear-gradient(180deg, rgba(10, 6, 4, .55), rgba(10, 6, 4, .78)); border: 1px solid rgba(232, 196, 106, .35); border-radius: 4px; min-width: 330px; }
.pp.p1 { left: 18px; } .pp.p2 { right: 18px; }
.pp img { width: 58px; height: 58px; filter: drop-shadow(0 2px 3px #000); }
.pp .nm { font-size: 17px; letter-spacing: .08em; color: #fff0d0; display: flex; gap: 10px; align-items: baseline; }
.pp .nm em { font-size: 12px; color: var(--gold); font-style: normal; letter-spacing: .14em; }
.hp { width: 240px; height: 14px; background: #1a0c08; border: 1px solid rgba(0, 0, 0, .8); border-radius: 2px; margin-top: 5px; position: relative; overflow: hidden; box-shadow: inset 0 0 6px #000; }
.hp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #ff7a5a, #c8241a 55%, #8a1008); transition: width .12s; }
.hp b { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 220, 160, .55); transition: width .6s .25s; }
.hp s { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 23px, rgba(0, 0, 0, .55) 23px 24px); }
.xp { width: 240px; height: 3px; background: #1a120a; margin-top: 3px; }
.xp i { display: block; height: 100%; background: var(--gold); }
.pots { display: flex; gap: 3px; margin-top: 5px; height: 18px; align-items: center; }
.pot { width: 11px; height: 17px; border-radius: 3px 3px 5px 5px; background: #1c2440; border: 1px solid #3a4a7a; position: relative; }
.pot.on { background: linear-gradient(180deg, #8ab8ff, #2a5aff); box-shadow: 0 0 8px #3a7aff; border-color: #a8c8ff; }
.pp .meta { font-size: 13px; color: var(--dim); letter-spacing: .06em; display: flex; gap: 12px; margin-top: 4px; }
.pp .meta b { color: #ffe0a0; font-weight: normal; }
.boss { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: min(720px, 80vw); text-align: center; }
.boss .bn { font-size: 18px; letter-spacing: .2em; color: #ffd8b0; text-shadow: 0 2px 4px #000; margin-bottom: 5px; }
.boss .hp { width: 100%; height: 16px; border: 1px solid rgba(232, 196, 106, .5); }
.boss .hp i { background: linear-gradient(180deg, #ff9a3a, #c8441a 55%, #6a1008); }
.timer { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font-size: 34px; letter-spacing: .1em; color: #fff0d0; text-shadow: 0 3px 0 #000, 0 0 14px rgba(255, 120, 40, .5); }
.timer.low { color: #ff6a4a; animation: pulse .6s infinite; }
.go { position: absolute; right: 40px; top: 42%; font-size: 40px; letter-spacing: .15em; color: var(--gold); text-shadow: 0 3px 0 #2a1606, 0 0 20px rgba(255, 200, 90, .6); animation: gob 0.7s infinite; }
@keyframes gob { 50% { transform: translateX(14px); opacity: .55; } }
.banner { position: absolute; top: 30%; left: 0; right: 0; text-align: center; font-size: clamp(22px, 3vw, 38px); letter-spacing: .22em; color: #fff0d0; text-shadow: 0 3px 0 #2a1606, 0 0 24px rgba(255, 180, 80, .55); animation: bin .35s ease-out; }
.banner.big { font-size: clamp(48px, 8vw, 104px); color: transparent; background: linear-gradient(180deg, #fff6d6, #f2cf74 40%, #b07a26 70%, #f6d888); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 5px 0 #2a1606) drop-shadow(0 0 26px rgba(255, 170, 60, .5)); }
.banner.magic { color: #e0d8ff; text-shadow: 0 3px 0 #1a1040, 0 0 26px rgba(160, 130, 255, .9); }
@keyframes bin { from { transform: scale(1.4); opacity: 0; } }
.bosstitle { position: absolute; bottom: 22%; left: 0; right: 0; text-align: center; font-size: clamp(28px, 4.2vw, 56px); letter-spacing: .14em; color: #ffd0a0; text-shadow: 0 4px 0 #2a0a06, 0 0 30px rgba(255, 80, 30, .6); animation: bin .5s ease-out; }
.combo { position: absolute; right: 44px; top: 24%; text-align: right; font-size: 54px; font-weight: 700; color: #fff0c0; text-shadow: 0 4px 0 #3a1a06, 0 0 18px rgba(255, 170, 60, .6); line-height: 1; }
.combo small { display: block; font-size: 15px; letter-spacing: .3em; color: var(--gold); }
.float { position: absolute; transform: translate(-50%, -50%); font-size: 18px; letter-spacing: .08em; font-weight: 700; text-shadow: 0 2px 0 #000, 0 0 8px rgba(0, 0, 0, .8); white-space: nowrap; pointer-events: none; }
.prompt { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); font-size: 16px; letter-spacing: .14em; color: var(--gold); text-shadow: 0 2px 4px #000; }

/* ---------- αποτελέσματα */
.res { min-width: min(520px, 90vw); }
.res .line { display: flex; justify-content: space-between; font-size: 19px; letter-spacing: .08em; padding: 7px 0; border-bottom: 1px solid rgba(232, 196, 106, .15); }
.res .line b { color: #ffe0a0; font-weight: normal; }

/* ---------- αφή */
.touchpad { position: fixed; inset: 0; pointer-events: none; z-index: 8; }
.tp-stick { position: absolute; left: 30px; bottom: 30px; width: 150px; height: 150px; border-radius: 50%; border: 2px solid rgba(232, 196, 106, .35); background: rgba(0, 0, 0, .25); pointer-events: auto; }
.tp-knob { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255, 230, 160, .55), rgba(140, 90, 30, .5)); }
.tp-btns { position: absolute; right: 24px; bottom: 24px; width: 230px; height: 200px; pointer-events: none; }
.tp-btns button { position: absolute; width: 78px; height: 78px; border-radius: 50%; border: 2px solid rgba(232, 196, 106, .55); background: rgba(30, 18, 8, .55); color: #ffe8b0; font-size: 30px; pointer-events: auto; }
.tp-btns button[data-a=attack] { right: 0; bottom: 70px; width: 92px; height: 92px; }
.tp-btns button[data-a=jump] { right: 100px; bottom: 0; }
.tp-btns button[data-a=block] { right: 120px; bottom: 100px; }
.tp-btns button[data-a=magic] { right: 10px; bottom: 170px; width: 64px; height: 64px; font-size: 24px; }
.tp-btns button.small { width: 52px; height: 52px; font-size: 18px; }
.tp-btns button[data-a=special] { right: 190px; bottom: 30px; }
.tp-btns button.top { position: fixed; top: 14px; right: 14px; }

@media (max-width: 760px) { .pp { min-width: 0; transform: scale(.8); transform-origin: bottom left; } .pp.p2 { transform-origin: bottom right; } .hcard { width: 46vw; } .hcard p { display: none; } }
