/* ═══════════════════════════════════════════════════════
   GROSCHEN-POKER — Groschengrab / Slotmaschine Theme
   ═══════════════════════════════════════════════════════ */

:root {
    /* Machine Colors */
    --bg-dark:      #050505;
    --panel-bg:     #080808;
    --panel-border: #2a2a2a;
    --frame-bg:     linear-gradient(180deg, #141414 0%, #0e0e0e 100%);

    /* Neon Accent Colors */
    --neon-green:  #39ff14;
    --neon-red:    #ff073a;
    --neon-gold:   #ffd700;
    --neon-blue:   #00f3ff;
    --neon-purple: #bf5fff;

    /* Rarity Colors */
    --rarity-common:    #4a9eff;
    --rarity-uncommon:  #5ecc5e;
    --rarity-rare:      #ff6b6b;
    --rarity-legendary: #bf5fff;

    /* Typography */
    --font-main: 'Courier New', monospace;

    /* Card Sizing */
    --card-width:  clamp(90px, 9.5vw, 150px);
    --card-height: clamp(130px, 13.5vw, 215px);
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background: #0a0a0a;
    color: white;
    font-family: var(--font-main);
    font-size: clamp(13px, 1.05vw, 19px);
    user-select: none;
}

/* CRT Scanlines */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.12) 0px,
        rgba(0,0,0,0.12) 1px,
        transparent 1px,
        transparent 3px
    );
    z-index: 9999;
    pointer-events: none;
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════
   MACHINE FRAME
   ═══════════════════════════════════════════════════════ */

#machine-frame {
    width: 100vw;
    height: 100vh;
    background: var(--frame-bg);
    display: flex;
    flex-direction: column;
    padding: 1vh 1.5vw;
    position: relative;
    z-index: 1;
    gap: 0.8vh;
}

/* ═══════════════════════════════════════════════════════
   TOP PANEL (Header Stats)
   ═══════════════════════════════════════════════════════ */

#top-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel-bg);
    padding: 0.8vh 2vw;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    flex-shrink: 0;
}

.stat-box {
    text-align: center;
    min-width: 5vw;
    padding: 0 0.6vw;
}

.stat-box label {
    display: block;
    font-size: 0.7em;
    color: #666;
    font-weight: bold;
    margin-bottom: 0.3vh;
    letter-spacing: 1px;
}

.stat-box span {
    font-size: 1.6em;
    font-weight: bold;
    letter-spacing: 2px;
}

.stat-box.wide { flex: 1; }

.val-credits {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.interest-tag {
    font-size: 0.6em !important;
    color: #5ecc5e;
    margin-left: 4px;
    opacity: 0.8;
}

.val-ante {
    color: var(--neon-purple);
    font-size: 1.1em !important;
}

.val-hands {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

.val-discards {
    color: var(--neon-gold);
    text-shadow: 0 0 10px var(--neon-gold);
}

#ui-hand-name {
    color: #555;
    font-size: 1.4em;
    transition: color 0.3s, text-shadow 0.3s;
}

#ui-hand-name.winner {
    color: var(--neon-green);
    text-shadow: 0 0 12px var(--neon-green);
}

/* ═══════════════════════════════════════════════════════
   SCORE BAR
   ═══════════════════════════════════════════════════════ */

#score-bar {
    display: flex;
    align-items: center;
    gap: 1.2vw;
    background: var(--panel-bg);
    padding: 0.6vh 2vw;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    flex-shrink: 0;
}

#score-left, #score-right {
    text-align: center;
    min-width: 6vw;
}

.score-label {
    display: block;
    font-size: 0.65em;
    color: #666;
    font-weight: bold;
    letter-spacing: 1px;
}

.score-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--neon-blue);
    text-shadow: 0 0 8px var(--neon-blue);
}

.target-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--neon-red);
    text-shadow: 0 0 8px var(--neon-red);
}

#score-progress-wrap {
    flex: 1;
    height: 2.8vh;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 1.4vh;
    position: relative;
    overflow: hidden;
}

#score-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-green));
    border-radius: 1.4vh;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 12px var(--neon-blue);
}

#score-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75em;
    font-weight: bold;
    color: #ccc;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

/* ═══════════════════════════════════════════════════════
   MAIN STAGE
   ═══════════════════════════════════════════════════════ */

#game-stage {
    display: flex;
    flex-direction: row;
    gap: 1.2vw;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   PAYTABLE
   ═══════════════════════════════════════════════════════ */

#paytable-panel {
    width: 15vw;
    min-width: 180px;
    max-width: 260px;
    background: #0a0a0a;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 1vh 0.8vw;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.paytable-header {
    text-align: center;
    color: #555;
    font-weight: bold;
    font-size: 0.8em;
    border-bottom: 1px solid #222;
    padding-bottom: 0.8vh;
    margin-bottom: 0.5vh;
    letter-spacing: 2px;
}

#paytable-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.pay-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: #555;
    padding: 0.4vh 0.4vw;
    border-bottom: 1px dashed #1a1a1a;
    border-radius: 4px;
    transition: all 0.3s;
}

.pay-item.active {
    color: var(--neon-green);
    font-weight: bold;
    text-shadow: 0 0 6px var(--neon-green);
    background: rgba(57, 255, 20, 0.08);
}

.pay-val { color: var(--neon-gold); }

.pay-lv {
    display: inline-block;
    background: rgba(0, 243, 255, 0.15);
    color: var(--neon-blue);
    font-size: 0.8em;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: bold;
}

/* ═══════════════════════════════════════════════════════
   PLAY AREA
   ═══════════════════════════════════════════════════════ */

#play-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8vh;
    min-height: 0;
}

/* ═══════════════════════════════════════════════════════
   SLOT MACHINE CARD DISPLAY
   ═══════════════════════════════════════════════════════ */

#cards-container {
    display: flex;
    gap: 0;
    background: linear-gradient(180deg, #0a0a0a, #060606);
    border: 3px solid #444;
    border-top-color: #555;
    border-bottom-color: #222;
    border-radius: 12px;
    padding: clamp(6px, 0.8vh, 12px) clamp(8px, 0.6vw, 14px);
    box-shadow:
        inset 0 3px 12px rgba(0,0,0,0.9),
        inset 0 -2px 6px rgba(0,0,0,0.5),
        0 4px 15px rgba(0,0,0,0.7),
        0 0 1px #555;
    perspective: 800px;
}

/* Fixed slot positions — always visible */
.card-slot {
    width: var(--card-width);
    height: var(--card-height);
    margin: 0 clamp(3px, 0.35vw, 7px);
    position: relative;
    border-radius: 8px;
    background: #0e0e0e;
    border: 2px solid #1a1a1a;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
    perspective: 500px;
    overflow: hidden;
}

.card-slot.empty {
    background: repeating-linear-gradient(
        45deg,
        #080808,
        #080808 4px,
        #0c0c0c 4px,
        #0c0c0c 8px
    );
}

.card-slot .card {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #fff 0%, #f5f5f0 50%, #eee 100%);
    color: #222;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #bbb;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    animation: cardSpin 0.55s cubic-bezier(0.22, 0.68, 0.36, 1.0) backwards;
    overflow: hidden;
}

.card-slot .card:hover:not(.held) {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.15);
}

.card .card-rank { font-size: 1.9em; line-height: 1; }
.card .card-suit { font-size: 2.4em; line-height: 1; margin-top: 2px; }
.card .card-corner {
    position: absolute;
    top: 4px; left: 6px;
    font-size: 0.65em;
    line-height: 1.1;
    text-align: center;
}
.card .card-corner-br {
    position: absolute;
    bottom: 4px; right: 6px;
    font-size: 0.65em;
    line-height: 1.1;
    text-align: center;
    transform: rotate(180deg);
}

.card.red { color: #c00; }

/* HELD — card stays in place, just glows */
.card.held {
    border-color: var(--neon-gold);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.5), inset 0 0 12px rgba(255, 215, 0, 0.08);
}

.card .held-badge {
    position: absolute;
    bottom: 6px;
    font-size: 0.5em;
    background: var(--neon-gold);
    color: #000;
    padding: 2px 10px;
    border-radius: 3px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 8px var(--neon-gold);
    z-index: 3;
}

.card.scoring {
    border-color: var(--neon-green);
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.5), 0 0 50px rgba(57, 255, 20, 0.2);
    animation: cardScore 0.4s ease;
}

.card.losing {
    opacity: 0.25;
    filter: grayscale(0.5);
}

/* Slot machine spin-in effect */
@keyframes cardSpin {
    0%   { opacity: 0; transform: translateY(-110%) rotateX(80deg); filter: blur(6px); }
    35%  { opacity: 0.6; filter: blur(3px); }
    65%  { opacity: 0.9; transform: translateY(4%) rotateX(-6deg); filter: blur(0); }
    82%  { transform: translateY(-2%) rotateX(2deg); }
    100% { opacity: 1; transform: translateY(0) rotateX(0); filter: blur(0); }
}

@keyframes cardScore {
    0%   { box-shadow: 0 0 10px rgba(57,255,20,0.3); }
    50%  { box-shadow: 0 0 40px rgba(57,255,20,0.7), 0 0 80px rgba(57,255,20,0.3); }
    100% { box-shadow: 0 0 25px rgba(57,255,20,0.5); }
}

/* ── Card Enhancement Effects ── */

.enh-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.4em;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

/* FOIL — blue-silver shimmer */
.card.enhancement-foil {
    border-color: #6cb8ff;
    box-shadow: 0 0 12px rgba(108, 184, 255, 0.3);
}

.card.enhancement-foil::after {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(108, 184, 255, 0.12) 45%,
        rgba(200, 220, 255, 0.25) 50%,
        rgba(108, 184, 255, 0.12) 55%,
        transparent 70%
    );
    animation: foilShimmer 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.card.enhancement-foil .enh-badge {
    background: linear-gradient(135deg, #4a9eff, #8cc8ff);
    color: #fff;
}

@keyframes foilShimmer {
    0%   { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* HOLO — rainbow iridescence */
.card.enhancement-holo {
    border-color: #ff8866;
    box-shadow: 0 0 12px rgba(255, 136, 102, 0.3);
}

.card.enhancement-holo::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 0, 0, 0.06) 0%,
        rgba(255, 165, 0, 0.06) 16%,
        rgba(255, 255, 0, 0.06) 33%,
        rgba(0, 255, 0, 0.06) 50%,
        rgba(0, 100, 255, 0.06) 66%,
        rgba(128, 0, 255, 0.06) 83%,
        rgba(255, 0, 0, 0.06) 100%
    );
    background-size: 400% 400%;
    animation: holoRainbow 4s linear infinite;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

.card.enhancement-holo .enh-badge {
    background: linear-gradient(135deg, #ff6644, #ff88cc, #6644ff);
    color: #fff;
}

@keyframes holoRainbow {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* POLYCHROME — shifting color gradient */
.card.enhancement-poly {
    border-color: #cc66ff;
    box-shadow: 0 0 14px rgba(204, 102, 255, 0.35);
}

.card.enhancement-poly::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        -45deg,
        rgba(255, 100, 200, 0.1),
        rgba(140, 80, 255, 0.1),
        rgba(80, 160, 255, 0.1),
        rgba(255, 100, 200, 0.1)
    );
    background-size: 300% 300%;
    animation: polyShift 3s ease infinite;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

.card.enhancement-poly .enh-badge {
    background: linear-gradient(135deg, #ff66cc, #8844ff, #4488ff);
    color: #fff;
}

@keyframes polyShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════════════
   SCORING DISPLAY
   ═══════════════════════════════════════════════════════ */

#scoring-display {
    display: flex;
    align-items: center;
    gap: 1.2vw;
    padding: 1vh 2vw;
    background: rgba(0,0,0,0.6);
    border-radius: 10px;
    border: 1px solid #333;
}

.scoring-part {
    text-align: center;
    padding: 0.5vh 1vw;
    border-radius: 8px;
    min-width: 4vw;
}

.scoring-label {
    display: block;
    font-size: 0.6em;
    color: #888;
    letter-spacing: 1px;
}

#scoring-chips-val {
    font-size: 2em;
    font-weight: bold;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

.scoring-x, .scoring-eq {
    font-size: 1.5em;
    font-weight: bold;
    color: #666;
}

#scoring-mult-val {
    font-size: 2em;
    font-weight: bold;
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red);
}

#scoring-total-val {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--neon-gold);
    text-shadow: 0 0 12px var(--neon-gold);
}

.scoring-part.pop {
    animation: scorePop 0.25s ease;
}

@keyframes scorePop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════
   MESSAGE LOG
   ═══════════════════════════════════════════════════════ */

#message-log {
    font-size: 1.15em;
    color: var(--neon-gold);
    text-shadow: 0 0 6px rgba(255,215,0,0.4);
    min-height: 3vh;
    text-align: center;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   JOKER SLOTS
   ═══════════════════════════════════════════════════════ */

#joker-container {
    width: 100%;
    border-top: 1px dashed #2a2a2a;
    padding-top: 1vh;
    position: relative;
    flex-shrink: 0;
}

.joker-label {
    font-size: 0.75em;
    color: #444;
    text-align: center;
    margin-bottom: 0.5vh;
    font-weight: bold;
    letter-spacing: 2px;
}

.slots-grid {
    display: flex;
    justify-content: center;
    gap: clamp(6px, 0.8vw, 14px);
    min-height: clamp(70px, 9vh, 110px);
    perspective: 1000px;
}

/* Joker as mini-cards */
.joker-item {
    width: clamp(90px, 8vw, 130px);
    height: clamp(80px, 9vh, 110px);
    border: 2px solid #333;
    background: #080808;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5vh 0.3vw;
    border-radius: 8px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s, border-color 0.2s;
    position: relative;
    z-index: 1;
    cursor: help;
    overflow: hidden;
}

.joker-rarity-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 8px 8px 0 0;
}

.joker-item:hover {
    transform: scale(1.6) translateY(-20px);
    z-index: 1000;
    background: #000;
    box-shadow: 0 10px 40px rgba(0,0,0,1);
    border-color: white;
}

.joker-item.active { border-color: var(--neon-gold); box-shadow: 0 0 10px rgba(255,215,0,0.2); }

/* Rarity colors for joker items */
.joker-item.rarity-1 { border-color: rgba(74, 158, 255, 0.3); }
.joker-item.rarity-1 .joker-rarity-bar { background: var(--rarity-common); }
.joker-item.rarity-1 .joker-name { color: var(--rarity-common); }
.joker-item.rarity-1:hover { border-color: var(--rarity-common); }

.joker-item.rarity-2 { border-color: rgba(94, 204, 94, 0.3); }
.joker-item.rarity-2 .joker-rarity-bar { background: var(--rarity-uncommon); }
.joker-item.rarity-2 .joker-name { color: var(--rarity-uncommon); }
.joker-item.rarity-2:hover { border-color: var(--rarity-uncommon); }

.joker-item.rarity-3 { border-color: rgba(255, 107, 107, 0.3); }
.joker-item.rarity-3 .joker-rarity-bar { background: var(--rarity-rare); }
.joker-item.rarity-3 .joker-name { color: var(--rarity-rare); }
.joker-item.rarity-3:hover { border-color: var(--rarity-rare); }

.joker-item.rarity-4 {
    border-color: rgba(191, 95, 255, 0.4);
    animation: legendaryPulse 2s ease-in-out infinite;
}
.joker-item.rarity-4 .joker-rarity-bar { background: var(--rarity-legendary); box-shadow: 0 0 8px var(--rarity-legendary); }
.joker-item.rarity-4 .joker-name { color: var(--rarity-legendary); text-shadow: 0 0 8px rgba(191, 95, 255, 0.5); }
.joker-item.rarity-4:hover { border-color: var(--rarity-legendary); }

@keyframes legendaryPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(191, 95, 255, 0.2); }
    50%      { box-shadow: 0 0 22px rgba(191, 95, 255, 0.5); }
}

.joker-name {
    font-size: 0.65em;
    font-weight: bold;
    color: var(--neon-gold);
    margin-bottom: 3px;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    width: 100%;
    padding-bottom: 3px;
}

.joker-desc {
    font-size: 0.55em;
    color: #aaa;
    line-height: 1.3;
}

.joker-item.empty {
    opacity: 0.15;
    border: 1px dashed #333;
    cursor: default;
}
.joker-item.empty:hover {
    transform: none;
    z-index: 1;
    background: #080808;
    box-shadow: none;
    border-color: #333;
}

.joker-empty-text {
    font-size: 0.6em;
    color: #444;
    letter-spacing: 2px;
}

.joker-item.trigger {
    animation: jokerTrigger 0.4s ease;
}

@keyframes jokerTrigger {
    0%   { transform: scale(1); box-shadow: 0 0 8px rgba(255, 215, 0, 0.2); }
    50%  { transform: scale(1.2); box-shadow: 0 0 35px var(--neon-gold); border-color: #fff; }
    100% { transform: scale(1); box-shadow: 0 0 8px rgba(255, 215, 0, 0.2); }
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */

#control-panel {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2vw, 28px);
    align-items: center;
    padding: 0.4vh 0;
    flex-shrink: 0;
}

button {
    background: #111;
    color: white;
    border: 2px solid #555;
    padding: 1.2vh 2.5vw;
    font-family: inherit;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.1s;
    letter-spacing: 1px;
}

button:hover:not(:disabled) { background: #222; transform: scale(1.04); }
button:active:not(:disabled) { transform: scale(0.97); }
button:disabled { opacity: 0.25; cursor: not-allowed; }

.btn-primary { border-color: var(--neon-green); color: var(--neon-green); box-shadow: 0 0 10px rgba(57,255,20,0.15); }
.btn-action  { border-color: var(--neon-blue);  color: var(--neon-blue);  box-shadow: 0 0 10px rgba(0,243,255,0.15); }
.btn-gold    { border-color: var(--neon-gold);  color: var(--neon-gold);  box-shadow: 0 0 10px rgba(255,215,0,0.15); }

/* ═══════════════════════════════════════════════════════
   WIN CHOICE OVERLAY
   ═══════════════════════════════════════════════════════ */

#win-choice-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4vh;
}

.win-choice-score {
    font-size: clamp(1.8em, 3.5vw, 3em);
    font-weight: bold;
    color: var(--neon-gold);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    letter-spacing: 3px;
}

#win-choice-amount {
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.win-choice-buttons {
    display: flex;
    gap: clamp(20px, 4vw, 60px);
}

.wc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5vh;
    padding: 2.5vh 4vw;
    font-size: clamp(1.4em, 2.2vw, 2em);
    border-radius: 14px;
    font-weight: bold;
    letter-spacing: 3px;
    min-width: clamp(160px, 18vw, 260px);
    transition: all 0.15s;
}

.wc-btn .wc-sub {
    display: block;
    font-size: 0.4em;
    font-weight: normal;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-top: 0.3vh;
}

.wc-nehmen {
    background: #111;
    border: 3px solid var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.2);
}
.wc-nehmen:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.4);
    background: #1a1a1a;
}

.wc-risiko {
    background: #111;
    border: 3px solid var(--neon-red);
    color: var(--neon-red);
    box-shadow: 0 0 25px rgba(255, 7, 58, 0.2);
}
.wc-risiko:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 40px rgba(255, 7, 58, 0.4);
    background: #1a1a1a;
}

/* ═══════════════════════════════════════════════════════
   RISK OVERLAY (Blinker + Ladder)
   ═══════════════════════════════════════════════════════ */

#overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.93);
    z-index: 110;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#risk-blinker { display: flex; gap: 5vw; }

.blink-box {
    width: clamp(200px, 18vw, 350px);
    height: clamp(100px, 12vh, 180px);
    border: 5px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2em, 3vw, 3.5em);
    opacity: 0.1;
    font-weight: bold;
    border-radius: 12px;
    transition: all 0.05s;
}

.blink-box.win.active {
    opacity: 1;
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 60px rgba(57, 255, 20, 0.5), inset 0 0 30px rgba(57, 255, 20, 0.1);
    background: rgba(57, 255, 20, 0.06);
}

.blink-box.loss.active {
    opacity: 1;
    color: var(--neon-red);
    border-color: var(--neon-red);
    box-shadow: 0 0 60px rgba(255, 7, 58, 0.5), inset 0 0 30px rgba(255, 7, 58, 0.1);
    background: rgba(255, 7, 58, 0.06);
}

#risk-ladder {
    width: clamp(320px, 42vw, 600px);
    text-align: center;
}

#risk-ladder h2 {
    color: var(--neon-gold);
    margin-bottom: 1vh;
    letter-spacing: 4px;
    font-size: 1.4em;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Risk Status Bar */
#risk-status {
    display: flex;
    justify-content: center;
    gap: 2.5vw;
    margin-bottom: 1.2vh;
    padding: 0.8vh 1.5vw;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
}

.risk-stat {
    text-align: center;
    min-width: 5vw;
}

.risk-stat-label {
    display: block;
    font-size: 0.6em;
    color: #666;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 0.2vh;
}

.risk-stat-val {
    font-size: 1.5em;
    font-weight: bold;
}

.risk-stat-val.pending {
    color: var(--neon-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.risk-stat-val.score {
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.risk-stat-val.credits {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

/* Deposit flash notification */
#risk-deposit {
    font-size: clamp(1em, 1.6vw, 1.4em);
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.6);
    padding: 0.6vh 2vw;
    margin-bottom: 0.8vh;
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 6px;
    letter-spacing: 1px;
}

#risk-deposit.flash {
    animation: depositFlash 1.8s ease-out;
}

@keyframes depositFlash {
    0%   { opacity: 0; transform: scale(0.8); }
    15%  { opacity: 1; transform: scale(1.1); text-shadow: 0 0 30px rgba(57, 255, 20, 0.8); }
    30%  { transform: scale(1); }
    80%  { opacity: 1; }
    100% { opacity: 0; }
}

.ladder-step {
    padding: 0.8vh 1.2vw;
    border: 2px solid #2a2a2a;
    margin-bottom: 0.4vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0a0a;
    color: #444;
    font-size: 1.15em;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.1s;
}

.ladder-step.active {
    background: linear-gradient(90deg, var(--neon-blue), #0088aa);
    color: #000;
    border-color: white;
    transform: scale(1.04);
    box-shadow: 0 0 25px var(--neon-blue);
}

.risk-controls {
    margin-top: 2.5vh;
    display: flex;
    gap: 1.5vw;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   ANTE TRANSITION OVERLAY
   ═══════════════════════════════════════════════════════ */

#ante-transition {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transition-content {
    text-align: center;
    animation: transitionSlideIn 0.5s ease-out;
}

@keyframes transitionSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.transition-badge {
    display: inline-block;
    font-size: clamp(2.5em, 4.5vw, 4em);
    font-weight: bold;
    color: var(--neon-gold);
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.3);
    letter-spacing: 6px;
    margin-bottom: 2vh;
    animation: transitionGlow 1.5s ease-in-out infinite;
}

@keyframes transitionGlow {
    0%, 100% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 215, 0, 0.2); }
    50%      { text-shadow: 0 0 50px rgba(255, 215, 0, 0.7), 0 0 100px rgba(255, 215, 0, 0.4); }
}

.transition-ante {
    font-size: clamp(1.4em, 2.5vw, 2.2em);
    color: var(--neon-purple);
    font-weight: bold;
    letter-spacing: 4px;
    margin-bottom: 3vh;
    text-shadow: 0 0 12px rgba(191, 95, 255, 0.4);
}

.transition-details {
    display: flex;
    justify-content: center;
    gap: 3vw;
    margin-bottom: 2vh;
}

.transition-details span {
    font-size: clamp(1.1em, 1.6vw, 1.4em);
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    padding: 0.5vh 1.5vw;
    background: rgba(57, 255, 20, 0.06);
    border: 1px solid #333;
    border-radius: 8px;
}

.transition-details span:empty { display: none; }

.transition-score {
    font-size: 1em;
    color: #888;
    margin-bottom: 3vh;
}

/* ═══════════════════════════════════════════════════════
   SHOP OVERLAY
   ═══════════════════════════════════════════════════════ */

#shop-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

#shop-panel {
    text-align: center;
    max-width: 88vw;
    width: 95%;
    padding: 2vh 0;
}

.shop-title {
    font-size: clamp(2em, 3.5vw, 3em);
    color: var(--neon-gold);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    letter-spacing: 8px;
    margin-bottom: 0.3vh;
}

.shop-credits {
    color: var(--neon-green);
    font-size: 1.25em;
    font-weight: bold;
    margin-bottom: 2vh;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

#shop-sections {
    display: flex;
    justify-content: center;
    gap: 2.5vw;
    margin-bottom: 2.5vh;
    flex-wrap: wrap;
}

.shop-section {
    flex: 1;
    min-width: 180px;
    max-width: 350px;
}

.shop-section-title {
    font-size: 0.9em;
    color: var(--neon-blue);
    letter-spacing: 3px;
    margin-bottom: 1vh;
    padding-bottom: 0.5vh;
    border-bottom: 1px solid #333;
}

.shop-section-title.tarot {
    color: var(--neon-purple);
    border-color: #333;
}

.shop-section-title.planet {
    color: #ff8844;
    border-color: #333;
}

.shop-row {
    display: flex;
    gap: 1vw;
    justify-content: center;
    flex-wrap: wrap;
}

/* Shop cards (jokers, tarots, planets) */
.shop-card {
    width: clamp(150px, 14vw, 220px);
    background: #111;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 2vh 1.5vw;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.shop-card:hover {
    border-color: var(--neon-gold);
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.shop-card.sold {
    opacity: 0.15;
    pointer-events: none;
    transform: scale(0.95);
}

.shop-card-name {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 0.8vh;
    padding-bottom: 0.5vh;
    border-bottom: 1px solid #333;
}

.shop-card-desc {
    font-size: 0.85em;
    color: #aaa;
    margin-bottom: 1.2vh;
    line-height: 1.4;
}

.shop-card-cost {
    font-weight: bold;
    font-size: 1em;
    color: var(--neon-green);
    background: rgba(57,255,20,0.08);
    padding: 0.4vh 1vw;
    border-radius: 5px;
    display: inline-block;
}

/* Shop card rarity styling */
.shop-card.rarity-1 .shop-card-name { color: var(--rarity-common); }
.shop-card.rarity-2 .shop-card-name { color: var(--rarity-uncommon); }
.shop-card.rarity-3 .shop-card-name { color: var(--rarity-rare); }
.shop-card.rarity-4 .shop-card-name { color: var(--rarity-legendary); text-shadow: 0 0 6px var(--rarity-legendary); }
.shop-card.rarity-4 { animation: legendaryPulse 2s ease-in-out infinite; }

/* Tarot shop cards */
.shop-card.tarot .shop-card-name { color: var(--neon-purple); }

/* Planet shop cards */
.shop-card.planet .shop-card-name { color: #ff8844; }

/* Shop controls */
.shop-controls {
    display: flex;
    gap: 2vw;
    justify-content: center;
    margin-bottom: 2.5vh;
}

/* Owned jokers (sellable) */
#player-jokers {
    border-top: 1px solid #333;
    padding-top: 1.5vh;
    margin-top: 1vh;
}

.owned-title {
    font-size: 0.85em;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 1vh;
}

.owned-hint {
    font-size: 0.8em;
    color: #555;
    font-weight: normal;
}

#owned-jokers-list {
    display: flex;
    gap: 1vw;
    justify-content: center;
    flex-wrap: wrap;
}

.owned-joker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1vw;
    padding: 0.6vh 1.2vw;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.12s;
    font-size: 0.85em;
    min-width: 140px;
}

.owned-joker:hover {
    border-color: var(--neon-red);
    box-shadow: 0 0 12px rgba(255, 7, 58, 0.2);
}

.owned-joker.rarity-1 { border-color: rgba(74, 158, 255, 0.2); }
.owned-joker.rarity-1 span:first-child { color: var(--rarity-common); }

.owned-joker.rarity-2 { border-color: rgba(94, 204, 94, 0.2); }
.owned-joker.rarity-2 span:first-child { color: var(--rarity-uncommon); }

.owned-joker.rarity-3 { border-color: rgba(255, 107, 107, 0.2); }
.owned-joker.rarity-3 span:first-child { color: var(--rarity-rare); }

.owned-joker.rarity-4 { border-color: rgba(191, 95, 255, 0.3); }
.owned-joker.rarity-4 span:first-child { color: var(--rarity-legendary); }

.sell-price {
    font-size: 0.85em;
    color: var(--neon-red);
    font-weight: bold;
}

/* ═══════════════════════════════════════════════════════
   ENDSCREEN
   ═══════════════════════════════════════════════════════ */

#endscreen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.97);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

#endscreen-content { text-align: center; }

#end-title {
    font-size: clamp(2.8em, 5vw, 4em);
    margin-bottom: 1.5vh;
    letter-spacing: 5px;
}

#end-title.victory {
    color: var(--neon-gold);
    text-shadow: 0 0 40px var(--neon-gold);
}

#end-title.gameover {
    color: var(--neon-red);
    text-shadow: 0 0 40px var(--neon-red);
}

#end-message {
    color: #aaa;
    font-size: 1.2em;
    margin-bottom: 2vh;
}

#end-stats {
    color: #888;
    font-size: 1em;
    margin-bottom: 3vh;
    line-height: 2;
}
