/* ===========================================================================
   MalleShower – style.css
   Mobile First, Hochformat, grosse Touchflaechen.
   Palette: Poolwasser, Kachelblau, Sand, Hibiskus, Sonne.
   Keine externen Schriften, keine Icon-Bibliotheken.
   ========================================================================= */

:root {
    --deep:    #07323d;
    --sea:     #0d5f70;
    --pool:    #3fd0c9;
    --sand:    #fdf3df;
    --sandy:   #f6e3ba;
    --ink:     #05242c;
    --hibiscus:#e8437f;
    --sun:     #ffc23c;
    --warn:    #f08a3c;
    --danger:  #d64545;
    --radius:  20px;
    --tap:     58px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 0 0 40px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    color: var(--sand);
    background:
        radial-gradient(120% 60% at 50% 0%, #10768a 0%, rgba(16,118,138,0) 60%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 46px),
        linear-gradient(180deg, var(--sea) 0%, var(--deep) 70%);
    background-attachment: fixed;
    min-height: 100vh;
}

.wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
}

/* ------------------------------ Kopfzeile -------------------------------- */

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0 16px;
}

.top--login { justify-content: center; padding-top: 24px; }

.top__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.top__drop { font-size: 24px; }

.top__out { display: flex; align-items: center; gap: 10px; margin: 0; }

.top__user {
    font-size: 14px;
    color: var(--pool);
    font-weight: 700;
}

.linkbtn {
    background: none;
    border: 0;
    color: var(--sandy);
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    padding: 8px 2px;
    cursor: pointer;
}

/* ----------------------------- Textbausteine ------------------------------ */

.h1 { font-size: 20px; margin: 18px 0 10px; letter-spacing: -.01em; }
.h2 { font-size: 17px; margin: 0 0 8px; }

.lead { text-align: center; margin: 0 0 18px; color: var(--sandy); }

.hint { font-size: 13px; color: rgba(253,243,223,.65); margin: 12px 2px; }

.muted { color: rgba(5,36,44,.62); margin: 0; }
.center { text-align: center; }

.state {
    font-size: 14px;
    color: var(--sandy);
    background: rgba(0,0,0,.18);
    border-radius: 12px;
    padding: 8px 12px;
    margin: 0 0 12px;
}

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

.card {
    background: var(--sand);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 16px;
    margin: 0 0 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.card--calm  { background: var(--sandy); }
.card--muted { opacity: .82; }
.card--admin { border: 2px dashed rgba(214,69,69,.5); }

/* --------------------- Signaturelement: Duschkarte ------------------------ */

.now {
    position: relative;
    overflow: hidden;
    display: block;
    border-radius: var(--radius);
    padding: 22px 18px 24px;
    margin: 0 0 14px;
    text-align: center;
    color: #052027;
    background:
        linear-gradient(180deg, var(--sun) 0%, var(--pool) 55%, #17b7c4 100%);
    box-shadow: 0 12px 26px rgba(0,0,0,.28);
}

.now__label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .18em;
    opacity: .8;
}

.now__name {
    display: block;
    margin-top: 6px;
    font-size: clamp(38px, 13vw, 60px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.03em;
    text-transform: uppercase;
}

.now--paused {
    background: linear-gradient(180deg, #cfd8d6 0%, #9fb3b4 100%);
    color: #23383c;
}

/* Fallende Wassertropfen als ruhige Hintergrundbewegung */
.now__rain { position: absolute; inset: 0; pointer-events: none; }
.now__rain i {
    position: absolute;
    top: -30%;
    width: 2px;
    height: 26%;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.7));
    border-radius: 2px;
    animation: msfall 2.4s linear infinite;
}
.now__rain i:nth-child(1) { left: 10%; animation-delay: .0s;  }
.now__rain i:nth-child(2) { left: 26%; animation-delay: .7s;  }
.now__rain i:nth-child(3) { left: 43%; animation-delay: 1.3s; }
.now__rain i:nth-child(4) { left: 61%; animation-delay: .4s;  }
.now__rain i:nth-child(5) { left: 78%; animation-delay: 1.7s; }
.now__rain i:nth-child(6) { left: 91%; animation-delay: 1.0s; }

@keyframes msfall {
    from { transform: translateY(0);    opacity: 0; }
    20%  { opacity: .9; }
    to   { transform: translateY(520%); opacity: 0; }
}

.now--paused .now__rain { display: none; }

/* ------------------------- Eigene Statusmeldung --------------------------- */

.you {
    background: rgba(255,255,255,.1);
    border-left: 6px solid var(--pool);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 14px;
    font-weight: 700;
}

.you--go   { background: var(--hibiscus); border-left-color: var(--sun); color: #fff; }
.you--done { border-left-color: var(--sun); }
.you--out  { border-left-color: rgba(253,243,223,.4); font-weight: 500; }

/* ------------------------------- Listen ----------------------------------- */

.queue { list-style: none; margin: 0; padding: 0; }

.queue__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(5,36,44,.1);
    font-size: 18px;
    font-weight: 600;
}
.queue__item:last-child { border-bottom: 0; }

.queue__pos {
    flex: 0 0 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border-radius: 50%;
    background: var(--deep);
    color: var(--sand);
    font-size: 15px;
    font-weight: 800;
}

.done { list-style: none; margin: 0; padding: 0; font-size: 17px; }
.done li { padding: 6px 0; color: rgba(5,36,44,.75); }

/* ------------------------------ Formulare --------------------------------- */

.label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(5,36,44,.6);
    margin: 10px 0 6px;
}

.field {
    display: block;
    width: 100%;
    min-height: var(--tap);
    padding: 12px 14px;
    font: inherit;
    font-size: 18px;
    color: var(--ink);
    background: #fff;
    border: 2px solid rgba(5,36,44,.18);
    border-radius: 14px;
    margin-bottom: 6px;
}

.field:focus-visible,
.btn:focus-visible,
.pick__box:focus-visible + .pick {
    outline: 3px solid var(--sun);
    outline-offset: 2px;
}

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

.btn {
    display: block;
    width: 100%;
    min-height: var(--tap);
    margin: 10px 0 0;
    padding: 14px 16px;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    background: var(--sandy);
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--sun); }
.btn--ghost   { background: rgba(255,255,255,.12); color: var(--sand); border: 2px solid rgba(253,243,223,.35); }
.btn--warn    { background: var(--warn); color: #2a1405; }
.btn--danger  { background: var(--danger); color: #fff; }
.btn--big     { font-size: 20px; min-height: 66px; }

.btn--next {
    background: linear-gradient(180deg, var(--hibiscus), #c72d66);
    color: #fff;
    font-size: 26px;
    min-height: 84px;
    letter-spacing: .01em;
    box-shadow: 0 10px 22px rgba(232,67,127,.35);
}

.row { display: flex; gap: 10px; }
.row__cell { flex: 1 1 0; margin: 0; }
.row .btn { margin-top: 10px; }

.links { margin-top: 18px; }

/* --------------------------- Teilnehmerauswahl ---------------------------- */

.picks { list-style: none; margin: 14px 0 0; padding: 0; }
.picks li { margin-bottom: 10px; }

.pick__box {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.pick {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.1);
    border: 2px solid rgba(253,243,223,.3);
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
}

.pick::before {
    content: "";
    flex: 0 0 30px;
    height: 30px;
    border-radius: 9px;
    border: 3px solid rgba(253,243,223,.6);
    background: transparent;
}

.pick__box:checked + .pick {
    background: var(--pool);
    color: var(--ink);
    border-color: var(--pool);
}

.pick__box:checked + .pick::before {
    background: var(--ink);
    border-color: var(--ink);
    box-shadow: inset 0 0 0 4px var(--pool);
}

/* ------------------------------- Statistik -------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 0;
}
.stats div {
    background: rgba(5,36,44,.06);
    border-radius: 12px;
    padding: 8px 10px;
}
.stats dt {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(5,36,44,.6);
}
.stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; }

.posline { margin: 12px 0 0; }

.chip {
    display: inline-block;
    background: var(--deep);
    color: var(--sand);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    margin: 0 6px 6px 0;
}

/* ----------------------------- Meldungen ---------------------------------- */

.flash {
    border-radius: 14px;
    padding: 12px 14px;
    margin: 0 0 12px;
    font-weight: 700;
}
.flash--ok  { background: rgba(63,208,201,.2); border: 2px solid var(--pool); }
.flash--err { background: rgba(232,67,127,.2); border: 2px solid var(--hibiscus); }

/* ------------------------- Ruhigere Darstellung --------------------------- */

@media (prefers-reduced-motion: reduce) {
    .now__rain { display: none; }
    * { animation: none !important; transition: none !important; }
}

@media (min-width: 560px) {
    body { font-size: 18px; }
    .now__name { font-size: 64px; }
}
