/* RPS-Duell – grüner Spieltisch im Stil der klassischen Messenger-Spiele */
.rps-body { --g1: #8cc63f; --g2: #6fa52a; --g3: #4d7c0f; --g4: #365314; --cell1: #c5e17a; --cell2: #a8cf55; --ink: #1a2e05;
  background: radial-gradient(ellipse at top, #b5dc6a, #6fa52a 60%, #3f6212); color: var(--ink); min-height: 100vh; }
.rps-body .site-header { background: rgba(26,46,5,.85); border: 0; }
.rps-body .site-header a, .rps-body .logo { color: #f7fee7; }
.rps-body .site-footer { background: transparent; color: #f7fee7; border: 0; }
.rps-body .site-footer a { color: #ecfccb; }
[hidden] { display: none !important; }
.small { font-size: .85rem; } .tiny { font-size: .72rem; opacity: .8; } .err { color: #b91c1c; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .center { justify-content: center; }
.rps-main { max-width: 1060px; margin: 0 auto; padding: 12px 10px 30px; }
.rps-frame { background: linear-gradient(180deg, #9fd04a, #7db733); border: 6px solid #d9f99d; border-radius: 22px; box-shadow: 0 0 0 3px #4d7c0f, 0 18px 40px rgba(0,0,0,.35); padding: 14px; }

/* Knöpfe */
.rps-btn { display: inline-block; border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 800; font-size: 1rem; cursor: pointer; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, #f97316, #c2410c); box-shadow: 0 4px 0 #7c2d12, 0 6px 12px rgba(0,0,0,.25); transition: transform .08s; }
.rps-btn:hover { transform: translateY(-1px); } .rps-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #7c2d12; }
.rps-btn.alt { background: linear-gradient(180deg, #3b82f6, #1d4ed8); box-shadow: 0 4px 0 #1e3a8a, 0 6px 12px rgba(0,0,0,.25); }
.rps-btn.go { background: linear-gradient(180deg, #22c55e, #15803d); box-shadow: 0 4px 0 #14532d; }
.rps-btn.small { padding: 6px 11px; font-size: .85rem; }
.rps-btn.on { outline: 3px solid #fde047; }
.rps-btn[disabled] { opacity: .5; cursor: default; }
.rps-link { background: none; border: 0; color: var(--ink); text-decoration: underline; cursor: pointer; }
.rps-body input, .rps-body select { border: 2px solid #4d7c0f; border-radius: 10px; padding: 7px 10px; background: #f7fee7; color: var(--ink); font-size: .95rem; }

/* Logo */
.rps-logo { display: inline-flex; flex-direction: column; align-items: center; line-height: .85; padding: 14px 18px; border-radius: 50%; background: radial-gradient(circle, #ecfccb, #84cc16 70%); border: 4px solid #d9f99d; }
.rps-logo b { font-size: 2.6rem; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #3f6212; letter-spacing: -1px; }
.rps-logo span { font-size: 1.3rem; font-style: italic; font-weight: 900; color: #fff; -webkit-text-stroke: 1px #3f6212; }
.rps-logo.big b { font-size: 4.2rem; } .rps-logo.big span { font-size: 2rem; }

/* Menü */
.rps-hero { position: relative; text-align: center; padding: 10px 10px 14px; }
.rps-hero img { position: absolute; height: 150px; bottom: 30px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); animation: rpsbob 3s ease-in-out infinite; }
.rps-hero .hr1 { left: 4%; } .rps-hero .hr3 { right: 4%; animation-delay: -1.5s; } .rps-hero .hr2 { display: none; }
.rps-hero p { max-width: 560px; margin: 10px auto 0; font-size: 1.02rem; }
@media (max-width: 700px) { .rps-hero img { height: 90px; bottom: auto; top: 10px; } }
@keyframes rpsbob { 50% { translate: 0 -6px; } }
.rps-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
@media (max-width: 700px) { .rps-tiles { grid-template-columns: 1fr; } }
.rps-tile { position: relative; background: #ecfccb; border: 3px solid #4d7c0f; border-radius: 18px; padding: 16px 16px 16px 140px; min-height: 180px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rps-tile > img { position: absolute; left: 8px; bottom: 8px; height: 150px; max-width: 125px; object-fit: contain; object-position: bottom; }
.rps-tile h2 { margin: 0; font-size: 1.25rem; }
.rps-room { background: #fff; border-radius: 12px; padding: 8px; width: 100%; }
.rps-room input { flex: 1; min-width: 0; }
.rps-rules { margin-top: 14px; background: #ecfccb; border-radius: 14px; padding: 10px 16px; border: 2px solid #4d7c0f; }
.rps-rules summary { cursor: pointer; font-weight: 800; }

/* Spiel */
.rps-game { display: grid; grid-template-columns: minmax(0, 1fr) 260px; grid-template-areas: "left right" "chat chat"; gap: 14px; }
.rps-left { grid-area: left; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rps-right { grid-area: right; display: flex; flex-direction: column; gap: 12px; }
.rps-chat { grid-area: chat; }
@media (max-width: 820px) { .rps-game { grid-template-columns: 1fr; grid-template-areas: "right" "left" "chat"; } .rps-right { flex-direction: row; flex-wrap: wrap; } .rps-right .rps-box { flex: 1; min-width: 140px; } .rps-right .rps-box:first-child { display: none; } }
.rps-name { font-weight: 900; font-size: clamp(1.1rem, 3vw, 1.7rem); letter-spacing: .5px; text-shadow: 0 2px 0 rgba(255,255,255,.5); }
.rps-name.red { color: #dc2626; } .rps-name.blue { color: #1d4ed8; }
.rps-name.turn::after { content: " ◀"; animation: rpsblink 1s infinite; }
@keyframes rpsblink { 50% { opacity: .2; } }
.rps-board { position: relative; width: min(100%, 620px); aspect-ratio: 7 / 6; border: 4px solid #f7fee7; border-radius: 6px; box-shadow: 0 0 0 3px #4d7c0f; overflow: visible;
  background-image: conic-gradient(var(--cell1) 25%, var(--cell2) 0 50%, var(--cell1) 0 75%, var(--cell2) 0); background-size: calc(200% / 7) calc(200% / 6); }
.rps-board .hl { position: absolute; width: calc(100% / 7); height: calc(100% / 6); box-sizing: border-box; border-radius: 6px; cursor: pointer; z-index: 1; }
.rps-board .hl.go { background: rgba(253,224,71,.45); box-shadow: inset 0 0 0 3px #facc15; }
.rps-board .hl.atk { background: rgba(239,68,68,.35); box-shadow: inset 0 0 0 3px #ef4444; }
.rps-board .hl.sel { box-shadow: inset 0 0 0 4px #fff; }
.pc { position: absolute; width: calc(100% / 7); height: calc(100% / 6); transition: left .32s ease, top .32s ease, transform .2s, opacity .3s; z-index: 2; pointer-events: none; }
.pc img { position: absolute; left: 50%; bottom: 4%; height: calc(118% * var(--sc, 1)); transform: translateX(-50%); filter: drop-shadow(0 4px 3px rgba(0,0,0,.35)); }
.pc .shadow { position: absolute; left: 18%; right: 18%; bottom: 4%; height: 12%; border-radius: 50%; background: rgba(0,0,0,.18); }
.pc.mine img { cursor: pointer; } .pc.idle img { animation: rpsidle var(--idur, 2.4s) ease-in-out var(--idel, 0s) infinite; transform-origin: 50% 100%; }
/* jede Figur mit eigenem Takt (Dauer/Versatz je Figur aus app.js): leicht wippen + atmen statt alle im Gleichschritt */
@keyframes rpsidle { 0%, 100% { transform: translateX(-50%) translateY(0) scale(1, 1); } 45% { transform: translateX(-50%) translateY(-3px) scale(.99, 1.025); } 70% { transform: translateX(-50%) translateY(-1px) scale(1, 1.01); } }
.pc .eye { position: absolute; top: -6%; right: 6%; font-size: .8rem; background: #fff; border-radius: 99px; padding: 0 3px; box-shadow: 0 1px 3px rgba(0,0,0,.3); z-index: 3; }
.pc.dying { opacity: 0; transform: scale(.4) rotate(25deg); }
.pc.pop { animation: rpspop .35s; }
@keyframes rpspop { 40% { transform: scale(1.2); } }
.rps-setup { background: #ecfccb; border: 2px solid #4d7c0f; border-radius: 14px; padding: 8px 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; width: min(100%, 620px); }
.rps-box { background: #ecfccb; border: 3px solid #4d7c0f; border-radius: 16px; padding: 10px; text-align: center; }
.rps-turn img { height: 120px; transition: transform .3s; }
.rps-turn.mine img { transform: scaleX(1); } .rps-turn.theirs img { transform: scaleX(-1); }
#turnText { font-weight: 800; margin: 4px 0; min-height: 1.3em; }
.rps-timer { height: 8px; background: #d9f99d; border-radius: 99px; overflow: hidden; }
.rps-timer > div { height: 100%; background: linear-gradient(90deg, #22c55e, #eab308, #ef4444); background-size: 300% 100%; transition: width .25s linear; }
.rps-side .row { justify-content: center; margin-top: 8px; }
.rps-chat { background: #ecfccb; border: 3px solid #4d7c0f; border-radius: 14px; padding: 8px; }
.rps-chatlog { max-height: 90px; overflow-y: auto; font-size: .88rem; margin-bottom: 6px; }
.rps-chatlog .m b.r { color: #dc2626; } .rps-chatlog .m b.b { color: #1d4ed8; } .rps-chatlog .m.sys { color: #4d7c0f; font-style: italic; }
.rps-chat select { flex: 1; min-width: 0; }

/* Overlays */
.rps-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(26,46,5,.55); padding: 16px; }
.rps-pop { background: #f7fee7; border: 5px solid #84cc16; border-radius: 22px; padding: 18px 22px; text-align: center; width: min(94vw, 440px); box-shadow: 0 20px 50px rgba(0,0,0,.4); animation: rpspop .3s; }
.rps-pop h2 { margin: 4px 0; }
.rps-fight { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; width: min(96vw, 560px); }
.rps-fight img { width: calc(100% * var(--sc, 1)); max-width: calc(230px * var(--sc, 1)); filter: drop-shadow(0 8px 10px rgba(0,0,0,.4)); }
.f-a { text-align: right; animation: fa .45s ease-out; } .f-b { text-align: left; animation: fb .45s ease-out; }
@keyframes fa { from { transform: translateX(-120%); } } @keyframes fb { from { transform: translateX(120%); } }
.f-vs { font-size: 3rem; font-weight: 900; color: #fde047; -webkit-text-stroke: 2px #7c2d12; animation: rpspop .5s; }
.f-text { grid-column: 1 / -1; text-align: center; font-size: 1.6rem; font-weight: 900; color: #fff; -webkit-text-stroke: 1px #1a2e05; text-shadow: 0 3px 0 #1a2e05; min-height: 2em; }
.rps-fight .lose { animation: flose .6s 1.2s forwards; } .rps-fight .win { animation: fwin .5s 1.15s; }
@keyframes flose { to { opacity: 0; transform: scale(.3) rotate(-30deg); } } @keyframes fwin { 50% { transform: scale(1.18) translateY(-10px); } }
.rps-fight.shake { animation: fshake .4s .7s; } @keyframes fshake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.tie-opts { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.tie-opts button { width: 110px; border: 3px solid #4d7c0f; border-radius: 16px; background: #ecfccb; cursor: pointer; padding: 6px; font-weight: 800; }
.tie-opts button img { width: 100%; }
.tie-opts button:hover { background: #fef08a; }
.end-img { height: 150px; }
.rps-spin { width: 64px; height: 64px; margin: 6px auto; border-radius: 50%; border: 8px solid #d9f99d; border-top-color: #f97316; animation: rpsspin .9s linear infinite; }
@keyframes rpsspin { to { transform: rotate(360deg); } }
.xp-line { display: flex; justify-content: space-between; } .xp-line b { color: #a16207; }

/* Kampf-Bühne: Waffen treffen in der Mitte aufeinander */
.rps-fight { position: relative; }
.fx-stage { grid-column: 1 / -1; grid-row: 1 / -1; position: absolute; left: 50%; top: 50%; width: 380px; height: 200px; transform: translate(-50%, -60%); pointer-events: none; z-index: 5; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,251,235,.85), rgba(253,230,138,.35) 45%, rgba(253,230,138,0) 70%); }
@media (max-width: 520px) { .fx-stage { transform: translate(-50%, -60%) scale(.75); } }
.fx-w { position: absolute; filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); }
.fx-w svg { width: 100%; height: 100%; display: block; }
.fx-stage.fx-shake { animation: fshake .3s; }
.f-vs { animation: rpspop .5s, vsfade .3s .3s forwards; }
@keyframes vsfade { to { opacity: 0; } }
.f-text { min-height: 2.2em; }
/* Fahnenträger: Stange/Fahne ragen heraus → Figur größer zeigen, damit der Körper gleich groß ist */
#mascot.wave { animation: mwave .6s; }
@keyframes mwave { 0% { transform: scale(.85) rotate(-6deg); } 60% { transform: scale(1.08) rotate(4deg); } 100% { transform: none; } }

/* ---------- Menü: Spiel-Knöpfe ---------- */
.rps-btn { position: relative; overflow: hidden; border-radius: 999px; padding: 12px 26px; font-size: 1.05rem; letter-spacing: .3px; border: 3px solid #fff7ed;
  text-shadow: 0 2px 0 rgba(0,0,0,.25); background: linear-gradient(180deg, #fb923c 0%, #f97316 45%, #c2410c 100%); box-shadow: 0 5px 0 #7c2d12, 0 10px 18px rgba(124,45,18,.35); }
.rps-btn::before { content: ""; position: absolute; left: 8%; right: 8%; top: 3px; height: 42%; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none; }
.rps-btn:hover:not([disabled]) { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 7px 0 #7c2d12, 0 14px 22px rgba(124,45,18,.4); }
.rps-btn.alt { border-color: #eff6ff; background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 45%, #1d4ed8 100%); box-shadow: 0 5px 0 #1e3a8a, 0 10px 18px rgba(30,58,138,.35); }
.rps-btn.alt:hover:not([disabled]) { box-shadow: 0 7px 0 #1e3a8a, 0 14px 22px rgba(30,58,138,.4); }
.rps-btn.go { border-color: #f0fdf4; background: linear-gradient(180deg, #4ade80 0%, #22c55e 45%, #15803d 100%); box-shadow: 0 5px 0 #14532d, 0 10px 18px rgba(20,83,45,.35); }
.rps-btn.small { padding: 7px 14px; font-size: .88rem; border-width: 2px; }
.rps-tile { display: grid; grid-template-columns: 130px 1fr; grid-template-rows: auto; padding: 16px; gap: 10px 14px; align-items: center; min-height: 0; background: linear-gradient(180deg, #f7fee7, #ecfccb); box-shadow: inset 0 2px 0 #fff, 0 6px 14px rgba(54,83,20,.25); }
.rps-tile > img { position: static; grid-row: 1 / span 6; height: 170px; max-width: 130px; align-self: end; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
.rps-tile > img[src*="fahne"] { height: 200px; max-width: 130px; }
.rps-tile h2 { font-size: 1.35rem; }
.rps-tile > *:not(img) { grid-column: 2; }
.rps-tile .rps-btn, #onPlay .rps-btn { width: 100%; max-width: 280px; text-align: center; margin: 4px 0; }
.rps-tile label { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.rps-tile select { font-weight: 700; padding: 8px 12px; border-radius: 999px; border: 3px solid #4d7c0f; background: #fff; cursor: pointer; }
.lv-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.lv-pick button { border: 3px solid #4d7c0f; background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 800; cursor: pointer; color: #365314; }
.lv-pick button.on { background: #4d7c0f; color: #fff; }
@media (max-width: 520px) { .rps-tile { grid-template-columns: 90px 1fr; } .rps-tile > img { height: 120px; max-width: 90px; } }

.rps-setup { font-size: .95rem; line-height: 1.45; text-align: center; }
#btnReady { margin-top: 10px; width: 100%; animation: readypulse 1.6s ease-in-out infinite; }
@keyframes readypulse { 50% { box-shadow: 0 5px 0 #14532d, 0 0 22px rgba(74,222,128,.9); } }

.rps-back { display: inline-block; margin: -4px 0 4px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.75); color: #365314; font-weight: 800; text-decoration: none; border: 2px solid #4d7c0f; }
.rps-back:hover { background: #fff; }

/* Einzelaktionen (zufällig, siehe idleAct in app.js) – ersetzen kurz das Wippen */
.pc.act-look img { animation: rpslook 1.3s ease-in-out; }
.pc.act-hop img { animation: rpshop .6s ease-out; }
.pc.act-wiggle img { animation: rpswig .9s ease-in-out; }
.pc.act-stretch img { animation: rpsstretch .8s ease-in-out; }
@keyframes rpslook { 0%, 100% { transform: translateX(-50%) scaleX(1); } 20%, 75% { transform: translateX(-50%) scaleX(-1); } }
@keyframes rpshop { 0%, 100% { transform: translateX(-50%) translateY(0) scale(1, 1); } 15% { transform: translateX(-50%) translateY(0) scale(1.05, .92); } 45% { transform: translateX(-50%) translateY(-14%) scale(.96, 1.05); } 80% { transform: translateX(-50%) translateY(0) scale(1.04, .95); } }
@keyframes rpswig { 0%, 100% { transform: translateX(-50%) rotate(0); } 25% { transform: translateX(-50%) rotate(-6deg); } 50% { transform: translateX(-50%) rotate(5deg); } 75% { transform: translateX(-50%) rotate(-3deg); } }
@keyframes rpsstretch { 0%, 100% { transform: translateX(-50%) scale(1, 1); } 40% { transform: translateX(-50%) scale(.95, 1.08); } 60% { transform: translateX(-50%) scale(.96, 1.06); } }

/* ---------- Zu dritt: Auswahl im Menü + Sechseck-Brett ---------- */
.rps-modes { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 0 4px; }
.rps-seg { display: inline-flex; background: #fff; border: 3px solid #4d7c0f; border-radius: 99px; padding: 3px; gap: 3px; flex-wrap: wrap; justify-content: center; }
.rps-seg button { border: 0; background: none; font: inherit; font-weight: 800; padding: 8px 16px; border-radius: 99px; cursor: pointer; color: #365314; }
.rps-seg button.on { background: #65a30d; color: #fff; }
.rps-seg .new-tag { font-size: .65rem; background: #db2777; color: #fff; border-radius: 99px; padding: 1px 6px; vertical-align: middle; }
.rps-board.hex { aspect-ratio: var(--ar, 1.1); border: 0; box-shadow: none; background: none; }
.rps-board.hex .hl { border-radius: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--cell1); }
.rps-board.hex .hl.z1 { background: var(--cell2); } .rps-board.hex .hl.z2 { background: #a3d977; }
.rps-board.hex .hl.home0 { background: #fecaca; } .rps-board.hex .hl.home1 { background: #bfdbfe; } .rps-board.hex .hl.home2 { background: #bbf7d0; }
.rps-board.hex .hl.go { background: #fde047; box-shadow: none; } .rps-board.hex .hl.atk { background: #f87171; box-shadow: none; } .rps-board.hex .hl.sel { background: #fff; box-shadow: none; }
.rps-name.green { color: #15803d; }
.rps-name .opp { margin: 0 6px; white-space: nowrap; } .rps-name .opp.red { color: #dc2626; } .rps-name .opp.blue { color: #1d4ed8; } .rps-name .opp.green { color: #15803d; }
.rps-name .opp.out { opacity: .4; text-decoration: line-through; } .rps-name .opp.turn::after { content: " ◀"; animation: rpsblink 1s infinite; }
.rps-name .opp small { font-size: .6em; opacity: .8; }
.rps-chatlog .m b.g { color: #15803d; }

/* grünes Team schaut nach rechts */
.pc.o2 img { scale: -1 1; translate: -100% 0; }   /* Spiegeln wirkt nach dem translateX(-50%) → Versatz ausgleichen */
.rps-body .site-header .lang-switch a { color: #d9f99d; }
.rps-body .site-header .lang-switch a[aria-current] { background: #fff; color: #3f6212; }
