:root {
    --background: #f7f9fc;
    --surface: rgba(255, 255, 255, 0.72);
    --text: #172033;
    --muted: #667085;
    --accent: #49aaa2;
    --border: rgba(23, 32, 51, 0.09);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 75% 20%,
            rgba(73, 170, 162, 0.10),
            transparent 28%),
        radial-gradient(circle at 20% 80%,
            rgba(88, 110, 170, 0.08),
            transparent 32%),
        var(--background);
}

main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 48px 24px;
    position: relative;
    overflow: hidden;
}

.hero {
    width: min(760px, 100%);
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo-wrap {
    width: min(420px, 80vw);
    margin: 0 auto 32px;
}

.logo-wrap img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(73, 170, 162, 0.08);
    border: 1px solid rgba(73, 170, 162, 0.15);
    color: #347d78;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(73, 170, 162, 0.10);
}

h1 {
    margin: 0;
    font-size: clamp(46px, 9vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.055em;
    font-weight: 650;
}

.mining {
    font-weight: 350;
}

.subtitle {
    max-width: 580px;
    margin: 26px auto 0;
    color: var(--muted);
    font-size: clamp(17px, 2.5vw, 20px);
    line-height: 1.65;
}

.subtitle strong {
    color: var(--text);
    font-weight: 550;
}

.tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.tag {
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: #586174;
    font-size: 13px;
    backdrop-filter: blur(12px);
}

.decoration {
    position: absolute;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(23, 32, 51, 0.045);
    border-radius: 50%;
    pointer-events: none;
}

.decoration.one {
    top: -220px;
    right: -150px;
}

.decoration.two {
    width: 300px;
    height: 300px;
    left: -170px;
    bottom: -150px;
}

/*
 * Auffälliger Hai
 */

.patrick-teaser {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 20;

    display: flex;
    align-items: center;
    gap: 13px;

    padding: 14px 20px;

    border: 2px solid rgba(73, 170, 162, 0.60);
    border-radius: 18px;

    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.98),
            rgba(232, 249, 247, 0.97));

    color: var(--text);

    font-family: inherit;
    font-size: 14px;
    font-weight: 650;

    cursor: pointer;

    backdrop-filter: blur(14px);

    box-shadow:
        0 12px 35px rgba(23, 32, 51, 0.16),
        0 0 22px rgba(73, 170, 162, 0.25);

    animation:
        teaser-float 1.8s ease-in-out infinite,
        teaser-glow 1.5s ease-in-out infinite;

    transition:
        scale 0.2s ease,
        border-color 0.2s ease;
}

.patrick-teaser:hover {
    scale: 1.08;
    border-color: rgba(73, 170, 162, 0.95);
}

.patrick-teaser .shark {
    display: inline-block;
    font-size: 38px;
    line-height: 1;

    transform-origin: 50% 65%;

    animation:
        shark-wiggle 2.5s ease-in-out infinite,
        shark-bounce 1.25s ease-in-out infinite;
}

.patrick-teaser .teaser-text {
    display: inline-block;

    animation: teaser-text-pulse 1.5s ease-in-out infinite;
}

/*
 * Sanftes Hoch- und Runterschweben
 */

@keyframes teaser-float {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -8px;
    }
}

/*
 * Stärkerer Glow
 */

@keyframes teaser-glow {

    0%,
    100% {
        box-shadow:
            0 12px 35px rgba(23, 32, 51, 0.14),
            0 0 8px rgba(73, 170, 162, 0.18),
            0 0 0 0 rgba(73, 170, 162, 0.32);
    }

    50% {
        box-shadow:
            0 16px 45px rgba(23, 32, 51, 0.18),
            0 0 30px rgba(73, 170, 162, 0.50),
            0 0 0 11px rgba(73, 170, 162, 0.04);
    }
}

/*
 * Der Hai macht alle paar Sekunden
 * eine deutlich sichtbare Wackelbewegung.
 */

@keyframes shark-wiggle {

    0%,
    52%,
    100% {
        transform: rotate(0deg);
    }

    58% {
        transform: rotate(-16deg);
    }

    64% {
        transform: rotate(17deg);
    }

    70% {
        transform: rotate(-13deg);
    }

    76% {
        transform: rotate(12deg);
    }

    82% {
        transform: rotate(-7deg);
    }

    88% {
        transform: rotate(5deg);
    }

    94% {
        transform: rotate(0deg);
    }
}

@keyframes shark-bounce {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -3px;
    }
}

@keyframes teaser-text-pulse {

    0%,
    100% {
        opacity: 0.80;
        scale: 1;
    }

    50% {
        opacity: 1;
        scale: 1.035;
    }
}

/*
 * Patrick-Slab: eine gegradete Karte im Slab, ganz aus CSS.
 * --rx/--ry kippen den Slab, --mx/--my setzen den Holo-Glanz;
 * beides schreibt das Skript aus Maus, Finger oder Geräteneigung.
 */

.patrick-modal {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: none;

    padding: 20px;
    overflow-y: auto;

    background: rgba(14, 30, 48, 0.42);
    backdrop-filter: blur(8px);
}

.patrick-modal.open {
    display: grid;
}

.patrick-stage {
    /* Auto-Ränder zentrieren und lassen einen zu hohen Dialog scrollen. */
    margin: auto;
    width: min(430px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;

    animation: message-in 0.28s ease-out;
}

@keyframes message-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.slab-scene {
    perspective: 900px;
    width: min(300px, 74vw, max(200px, calc((100vh - 420px) * 0.62)));
}

.slab {
    --rx: 0deg;
    --ry: 0deg;
    --mx: 50%;
    --my: 50%;

    position: relative;
    padding: 10px 10px 14px;

    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.85);

    background:
        linear-gradient(160deg,
            rgba(255, 255, 255, 0.92),
            rgba(226, 236, 244, 0.86) 45%,
            rgba(246, 250, 252, 0.94));

    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, 0.55),
        inset 0 0 0 4px rgba(120, 140, 160, 0.18),
        0 26px 60px rgba(10, 25, 40, 0.38),
        0 0 40px rgba(73, 170, 162, 0.25);

    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: transform 0.12s ease-out;
    touch-action: none;
}

.slab.auto {
    animation: slab-sway 6s ease-in-out infinite;
}

@keyframes slab-sway {

    0%,
    100% {
        transform: rotateX(4deg) rotateY(-7deg);
    }

    50% {
        transform: rotateX(-3deg) rotateY(7deg);
    }
}

.slab-label {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;

    padding: 8px 10px;
    margin-bottom: 10px;

    border-radius: 6px;
    border: 2px solid #c8102e;
    background: #fff;

    color: #1a1a1a;
    font-size: 10px;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.slab-label .label-name {
    font-weight: 800;
}

.slab-label .label-grade {
    text-align: right;
    font-weight: 800;
}

.slab-label .label-grade b {
    display: block;
    font-size: 26px;
    line-height: 1;
    color: #c8102e;
}

.slab-label .label-cert {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px dashed rgba(0, 0, 0, 0.18);
    color: #555;
    font-size: 9px;
}

.card {
    position: relative;
    aspect-ratio: 63 / 88;
    padding: 9px;

    border-radius: 10px;
    background: linear-gradient(145deg, #f6d44c, #e7b622 60%, #f8dd6a);

    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(120, 90, 0, 0.35);
}

.card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 6px;
    border-radius: 6px;
    background: linear-gradient(180deg, #d9eef7, #b9dbe9);
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;

    color: #13283d;
    font-size: 13px;
    font-weight: 800;
}

.card-head small {
    color: #c8102e;
    font-size: 11px;
}

.card-art {
    position: relative;
    flex: 1;
    display: grid;
    place-items: center;

    border: 3px solid #c9a227;
    border-radius: 4px;

    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.55), transparent 30%),
        linear-gradient(180deg, #4fc3e0 0%, #1d7fb3 55%, #0e4f80 100%);

    overflow: hidden;
}

.card-art::after {
    content: "";
    position: absolute;
    inset: auto -10% 0 -10%;
    height: 22%;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.28), transparent 70%);
}

.card-art .art-shark {
    font-size: clamp(64px, 20vw, 92px);
    line-height: 1;
    filter: drop-shadow(0 6px 8px rgba(0, 30, 60, 0.35));
    animation: art-shark 3.2s ease-in-out infinite;
}

@keyframes art-shark {

    0%,
    100% {
        transform: translate(-6px, 2px) rotate(-4deg);
    }

    50% {
        transform: translate(6px, -4px) rotate(4deg);
    }
}

.card-text {
    padding: 4px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.65);

    color: #13283d;
    font-size: 10px;
    line-height: 1.4;
    text-align: left;
}

.card-text b {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.holo {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;

    background:
        radial-gradient(circle at var(--mx) var(--my),
            rgba(255, 255, 255, 0.75),
            rgba(255, 255, 255, 0) 38%),
        linear-gradient(115deg,
            transparent 20%,
            rgba(255, 0, 140, 0.30) 32%,
            rgba(255, 220, 0, 0.30) 42%,
            rgba(0, 255, 160, 0.30) 52%,
            rgba(0, 170, 255, 0.30) 62%,
            rgba(170, 0, 255, 0.30) 72%,
            transparent 84%);
    background-size: 100% 100%, 260% 260%;
    background-position: 0 0, var(--mx) var(--my);

    mix-blend-mode: color-dodge;
    opacity: 0.85;
}

.slab.auto .holo {
    animation: holo-drift 6s ease-in-out infinite;
}

@keyframes holo-drift {

    0%,
    100% {
        background-position: 0 0, 15% 20%;
    }

    50% {
        background-position: 0 0, 85% 80%;
    }
}

.patrick-message {
    width: 100%;
    padding: 22px 24px 24px;

    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.97);

    box-shadow: 0 20px 60px rgba(23, 32, 51, 0.20);
    text-align: center;
}

.patrick-message h2 {
    margin: 0 0 10px;

    font-size: 24px;
    letter-spacing: -0.03em;
}

.patrick-message p {
    margin: 0;

    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.patrick-message strong {
    color: var(--text);
    font-weight: 600;
}

.patrick-message .hint {
    margin-top: 12px;
    font-size: 12px;
    color: #8a93a3;
}

.patrick-close {
    margin-top: 18px;
    padding: 11px 18px;

    border: 1px solid rgba(73, 170, 162, 0.25);
    border-radius: 11px;

    background: rgba(73, 170, 162, 0.11);
    color: #347d78;

    font: inherit;
    font-size: 13px;
    font-weight: 650;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.patrick-close:hover,
.patrick-close:focus-visible {
    background: rgba(73, 170, 162, 0.20);
    transform: translateY(-2px);
}

/*
 * BINGO BONGO: dreimal auf das Logo tippen. Heads-up gegen den Hai, reines Glück.
 */

.logo-wrap {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.poker-modal {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: none;
    padding: 16px;
    overflow-y: auto;

    background: rgba(14, 30, 48, 0.42);
    backdrop-filter: blur(8px);
}

.poker-modal.open {
    display: grid;
}

.poker-table {
    margin: auto;
    width: min(560px, 100%);
    padding: 20px 18px 22px;

    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.10), transparent 60%),
        linear-gradient(160deg, #2f8f88, #1d6560);

    color: #f4fbfa;
    text-align: center;
    box-shadow: 0 28px 80px rgba(10, 25, 40, 0.35);

    animation: message-in 0.28s ease-out;
    position: relative;
    overflow: hidden;
}

.poker-table h2.bingo-title {
    margin: 0 0 6px;
    font-size: clamp(34px, 11vw, 54px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    color: #ffe14d;
    text-shadow:
        0 3px 0 #e8590c,
        0 6px 0 #9c3d0b,
        0 10px 18px rgba(0, 0, 0, 0.35);
    transform: rotate(-3deg);
    animation: bingo-bounce 1.6s ease-in-out infinite;
}

@keyframes bingo-bounce {

    0%,
    100% {
        transform: rotate(-3deg) scale(1);
    }

    50% {
        transform: rotate(2deg) scale(1.06);
    }
}

.poker-sub {
    margin: 0 0 14px;
    font-size: 13px;
    opacity: 0.85;
}

.poker-seat {
    margin: 10px 0;
}

.poker-seat-label {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.poker-hand-name {
    min-height: 18px;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
}

.poker-cards {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.poker-board {
    margin: 14px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.pcard {
    position: relative;
    width: clamp(48px, 14vw, 68px);
    aspect-ratio: 5 / 7;

    display: grid;
    place-items: center;

    border-radius: 7px;
    background: #fff;
    color: #172033;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);

    font-weight: 700;
    line-height: 1;
}

.pcard.red {
    color: #c8102e;
}

.pcard .corner {
    position: absolute;
    top: 4px;
    left: 5px;
    font-size: clamp(14px, 4.2vw, 19px);
    text-align: center;
}

.pcard .pip {
    font-size: clamp(28px, 8.5vw, 40px);
    margin-top: 10px;
}

.pcard.back {
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.18) 0 4px, transparent 4px 9px),
        linear-gradient(160deg, #49aaa2, #2b6f8f);
    border: 3px solid #fff;
}

.pcard.back::after {
    content: "🦈";
    font-size: clamp(16px, 5vw, 22px);
}

.pcard.slot {
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    box-shadow: none;
}

.pcard.dealt {
    animation: card-in 0.55s ease-out;
}

/* Showdown: die besten fünf Karten leuchten, die übrigen treten zurück. */
.pcard.best {
    transform: translateY(-6px);
    box-shadow: 0 0 0 3px #ffe14d, 0 8px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.pcard.dim {
    opacity: 0.38;
    filter: grayscale(0.6);
    transition: opacity 0.5s ease, filter 0.5s ease;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(-10px) rotateY(80deg);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.poker-result {
    min-height: 26px;
    margin: 10px 0 4px;
    font-size: 18px;
    font-weight: 700;
}

.poker-score[hidden] {
    display: none;
}

.poker-score.reveal {
    animation: score-reveal 1.1s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes score-reveal {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-8deg);
    }

    60% {
        opacity: 1;
        transform: scale(1.35) rotate(3deg);
    }

    100% {
        transform: none;
    }
}

.poker-score.bump {
    animation: score-bump 0.6s ease-out;
}

@keyframes score-bump {
    50% {
        transform: scale(1.18);
    }
}

.swab-fall {
    position: absolute;
    top: -20px;
    pointer-events: none;
    animation: swab-fall 1.8s ease-in forwards;
}

@keyframes swab-fall {
    from {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    to {
        transform: translateY(620px) rotate(540deg);
        opacity: 0.2;
    }
}

.credit-fly {
    position: absolute;
    left: 50%;
    z-index: 2;
    pointer-events: none;
    color: #ffe14d;
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 2px 0 #9c3d0b;
    animation: credit-fly 1.2s ease-in forwards;
}

@keyframes credit-fly {
    from {
        opacity: 1;
        transform: translate(-50%, 0) scale(1.2);
    }

    to {
        opacity: 0;
        transform: translate(-50%, 46px) scale(0.7);
    }
}

.poker-score {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 16px;
    font-weight: 700;
}

.poker-score .swab {
    width: 44px;
    height: 13px;
}

.poker-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.poker-actions button {
    padding: 11px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 11px;
    background: #fff;
    color: #1d6560;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.poker-actions button.secondary {
    background: transparent;
    color: #fff;
}

.poker-actions button:disabled {
    opacity: 0.5;
    cursor: default;
}

footer {
    padding: 22px 24px 30px;
    text-align: center;
    font-size: 14px;
    color: #586174;
}

footer a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

footer .sep {
    margin: 0 10px;
    color: #8a93a3;
}

footer a:hover {
    color: var(--text);
}

@media (max-width: 600px) {
    main {
        padding-top: 32px;
    }

    /* Platz unter den Links, damit der feste Hai-Teaser sie nicht verdeckt. */
    footer {
        padding-bottom: 110px;
    }

    .logo-wrap {
        width: 125px;
        height: 125px;
        border-radius: 24px;
    }

    .tags {
        margin-top: 24px;
    }

    .patrick-teaser {
        right: 14px;
        bottom: 14px;

        padding: 12px 15px;

        font-size: 12px;
    }

    .patrick-teaser .shark {
        font-size: 32px;
    }

    .patrick-modal {
        padding: 12px;
    }

    .patrick-stage {
        gap: 12px;
    }

    /* Der Slab weicht der Höhe, damit der Zurück-Knopf ohne Scrollen sichtbar bleibt. */
    .slab-scene {
        width: min(74vw, max(170px, calc((100vh - 430px) * 0.6)));
        width: min(74vw, max(170px, calc((100svh - 430px) * 0.6)));
    }

    .patrick-message {
        padding: 16px 16px 18px;
    }

    .patrick-message h2 {
        font-size: 21px;
        margin-bottom: 8px;
    }

    .patrick-message p {
        font-size: 14px;
        line-height: 1.5;
    }

    .patrick-message .hint {
        margin-top: 8px;
    }

    .patrick-close {
        margin-top: 12px;
    }
}

/*
 * Accessibility:
 * Animation abschalten, wenn der Browser
 * reduzierte Bewegung verlangt.
 */

@media (prefers-reduced-motion: reduce) {

    .patrick-teaser,
    .patrick-teaser .shark,
    .patrick-teaser .teaser-text,
    .patrick-stage,
    .slab.auto,
    .slab.auto .holo,
    .card-art .art-shark {
        animation: none;
    }

    .slab {
        transform: none;
        transition: none;
    }

    /* Die Karten liegen sofort, ohne Flug. */
    .poker-table,
    .pcard.dealt,
    .poker-table h2.bingo-title,
    .poker-score.reveal,
    .poker-score.bump {
        animation: none;
    }

    .pcard.best,
    .pcard.dim {
        transition: none;
    }
}
