:root {
    --filz-dunkel: #0a2c22;
    --gold: #f2c14e;
    --gold-hell: #ffe9a8;
    --gold-dunkel: #b8860b;
    --text: #f4efe0;
    --rot: #d6382c;
    --gruen: #2fae6d;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% -10%, #1a5c45 0%, transparent 55%),
        radial-gradient(ellipse at 50% 110%, #0d3a2d 0%, transparent 60%),
        linear-gradient(180deg, var(--filz-dunkel) 0%, #061d15 100%);
    min-height: 100vh;
    background-attachment: fixed;
}

[hidden] {
    display: none !important;
}

.casino {
    max-width: 430px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Kopf --------------------------------------------------------------- */

.kopf {
    text-align: center;
}

.titel {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.1rem;
    letter-spacing: 0.08em;
    margin: 0;
    background: linear-gradient(180deg, var(--gold-hell), var(--gold) 60%, var(--gold-dunkel));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.titel-schraeg {
    color: var(--rot);
    -webkit-text-fill-color: var(--rot);
}

.untertitel {
    letter-spacing: 0.38em;
    font-size: 0.7rem;
    color: var(--gold);
    margin: 0.25rem 0 0;
    opacity: 0.85;
}

.etikett {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.95;
}

/* Start -------------------------------------------------------------- */

.startbereich {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(242, 193, 78, 0.28);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.einsatz {
    background: #0b241c;
    border: 1px solid #2a5a47;
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 700;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    width: 100%;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Buttons ------------------------------------------------------------ */

.knopf {
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 800;
    font-size: 1rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    color: #0b1a14;
    transition: transform 0.08s ease, filter 0.15s ease;
}

.knopf:active {
    transform: scale(0.97);
}

.knopf:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.knopf--gold {
    background: linear-gradient(180deg, #ffe9a8, var(--gold) 55%, #d99a2b);
    box-shadow: 0 3px 0 #8a5a12, 0 6px 14px rgba(0, 0, 0, 0.35);
}

.knopf--gold:hover:not(:disabled) {
    filter: brightness(1.07);
}

.knopf--hoeher {
    background: linear-gradient(180deg, #5ee0a0, var(--gruen) 55%, #1e7f4c);
    color: #eafff3;
    box-shadow: 0 3px 0 #135f38, 0 6px 14px rgba(0, 0, 0, 0.35);
}

.knopf--niedriger {
    background: linear-gradient(180deg, #ff8a7a, var(--rot) 55%, #9e2013);
    color: #fff;
    box-shadow: 0 3px 0 #6e140b, 0 6px 14px rgba(0, 0, 0, 0.35);
}

/* Kopfzeile: Gewinn + Multiplikator ----------------------------------- */

.kopfzeile {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.gewinn-betrag {
    display: flex;
    flex-direction: column;
}

.gewinn-wert {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold-hell);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    font-variant-numeric: tabular-nums;
}

.multiplikator-badge {
    background: linear-gradient(180deg, #ffe9a8, var(--gold));
    color: #3a2400;
    font-weight: 800;
    font-size: 1.2rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    box-shadow: 0 3px 0 #8a5a12, 0 5px 12px rgba(0, 0, 0, 0.35);
    font-variant-numeric: tabular-nums;
}

/* Zahl in Flammen ------------------------------------------------------ */

.feuer {
    text-align: center;
    line-height: 1;
}

.feuer-zahl {
    font-size: 4.4rem;
    font-weight: 900;
    color: #fff3c4;
    text-shadow:
        0 0 8px #ffd700,
        0 0 18px #ff8c00,
        0 0 30px #ff4500,
        0 0 52px #c0392b;
    animation: feuer-flackern 1.4s ease-in-out infinite alternate;
    font-variant-numeric: tabular-nums;
}

@keyframes feuer-flackern {
    0% {
        text-shadow:
            0 0 6px #ffe066,
            0 0 14px #ffa500,
            0 0 26px #ff4500,
            0 0 40px #a93226;
        transform: scale(1);
    }

    100% {
        text-shadow:
            0 0 12px #fff6cc,
            0 0 24px #ff8c00,
            0 0 46px #ff3d00,
            0 0 72px #d32f2f;
        transform: scale(1.05);
    }
}

/* Aktuelle Karte ------------------------------------------------------- */

.aktuelle-karte {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 232px;
}

/* Karten --------------------------------------------------------------- */

.karte {
    position: relative;
    background: linear-gradient(180deg, #fffdf6, #f2eddd);
    border: 1px solid #d8d0bb;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
}

.karte--gross {
    width: 158px;
    height: 222px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(242, 193, 78, 0.35);
}

.karte--klein {
    width: 62px;
    height: 88px;
    border-radius: 7px;
}

.karte--rot {
    color: var(--rot);
}

.karte--schwarz {
    color: #1c1c1c;
}

.karte-ecke {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-weight: 700;
}

.karte--gross .karte-ecke {
    font-size: 1.15rem;
    gap: 0.15rem;
}

.karte--klein .karte-ecke {
    font-size: 0.68rem;
    gap: 0.1rem;
}

.karte-ecke--oben {
    top: 0.45rem;
    left: 0.55rem;
}

.karte-ecke--unten {
    bottom: 0.45rem;
    right: 0.55rem;
    transform: rotate(180deg);
}

.karte-mitte {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}

.karte--gross .karte-mitte {
    font-size: 4.6rem;
}

.karte--klein .karte-mitte {
    font-size: 1.9rem;
}

/* Entscheidungen ------------------------------------------------------- */

.entscheidungen {
    display: flex;
    gap: 0.6rem;
}

.entscheidungen .knopf {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0.5rem;
}

.richtungs-etikett {
    font-size: 0.95rem;
    letter-spacing: 0.12em;
}

.multi {
    font-size: 1.4rem;
}

/* Ergebnis & Neustart -------------------------------------------------- */

.ergebnis {
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    padding: 0.8rem;
    border-radius: 12px;
    min-height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ergebnis--gewonnen {
    background: rgba(47, 174, 109, 0.16);
    color: #7ce8a8;
    border: 1px solid rgba(47, 174, 109, 0.5);
}

.ergebnis--verloren {
    background: rgba(214, 56, 44, 0.18);
    color: #ff9a8c;
    border: 1px solid rgba(214, 56, 44, 0.55);
}

#auszahlungKnopf {
    width: 100%;
}

#neuKnopf {
    width: 100%;
}

/* Stapel der gezogenen Karten ------------------------------------------ */

.stapel-rahmen {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.karten-stapel {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 0.2rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(255, 255, 255, 0.15);
}

.karten-stapel .karte--klein {
    margin-left: -40px;
}

.karten-stapel .karte--klein:first-child {
    margin-left: 0;
}

.karten-stapel .karte--aktuell {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--gold);
    transform: translateY(-4px);
}