/* ============ Reset ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
    background:
        radial-gradient(circle at 15% 0%,  #14523d 0%, transparent 55%),
        radial-gradient(circle at 90% 100%, #7a1420 0%, transparent 55%),
        linear-gradient(160deg, #062b1f 0%, #0b3d2e 45%, #08252b 100%);
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    padding: 28px 16px;
    position: relative;
}

/* ============ Schnee ============ */
.snow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.flake {
    position: absolute;
    top: -8vh;
    color: #ffffff;
    user-select: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    opacity: .75;
}

@keyframes fall {
    0%   { transform: translate3d(0, -12vh, 0) rotate(0deg); }
    100% { transform: translate3d(var(--drift, 0px), 112vh, 0) rotate(360deg); }
}

/* ============ Kartenstapel ============ */
.stack {
    position: relative;
    width: min(880px, 100%);      /* ← breiter als vorher */
    z-index: 2;
}

.ghost {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
}
.ghost.g1 { transform: translateY(14px) scale(.985) rotate(-1deg); }
.ghost.g2 { transform: translateY(28px) scale(.97)  rotate(1deg); opacity: .6; }

.card {
    position: relative;
    background: #ffffff;
    border-radius: 28px;
    padding: 34px 32px 32px;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, .5),
        0 0 0 1px rgba(255, 255, 255, .6) inset;
    overflow: hidden;
    animation: fadeIn .35s ease both;
}

/* Girlande oben */
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        #e63946 0 14px,
        #ffffff 14px 28px,
        #1f7a52 28px 42px
    );
}

/* ============ Zwei-Spalten-Layout ============ */
.card-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    align-items: start;
}

.col-left  { min-width: 0; }
.col-right {
    min-width: 0;
    border-left: 2px solid #f1f1f5;
    padding-left: 32px;
}

@media (max-width: 720px) {
    .card-inner { grid-template-columns: 1fr; gap: 28px; }
    .col-right {
        border-left: none;
        border-top: 2px solid #f1f1f5;
        padding-left: 0;
        padding-top: 24px;
    }
}

/* ============ Ansichten ============ */
.view { display: flex; flex-direction: column; }

@keyframes fadeIn {
    from { opacity: 0; transform: scale(.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* ============ Login / Formular ============ */
.logo {
    width: 68px; height: 68px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 34px;
    background: linear-gradient(135deg, #fff7f7, #ffe0e0);
    border: 3px solid #fff;
    box-shadow:
        0 10px 26px rgba(230, 57, 70, .28),
        0 0 0 7px rgba(230, 57, 70, .08);
    animation: floaty 3.5s ease-in-out infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0)    rotate(-3deg); }
    50%      { transform: translateY(-7px) rotate(3deg); }
}

h1 {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.6px;
    color: #1b1b1b;
}
h1 span {
    background: linear-gradient(135deg, #ff5864, #e63946);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sub {
    text-align: center;
    font-size: 14px;
    color: #8b8b93;
    margin: 8px 0 22px;
    line-height: 1.45;
}

label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #9a9aa2;
    margin: 0 0 7px 4px;
}

input {
    width: 100%;
    padding: 15px 16px;
    margin-bottom: 18px;
    border-radius: 15px;
    border: 2px solid #ececf0;
    background: #f7f7fa;
    font-size: 16px;
    font-family: inherit;
    color: #1b1b1b;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
input::placeholder { color: #b6b6be; }
input:focus {
    border-color: #e63946;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(230, 57, 70, .13);
}

button,
.ghost-btn {
    margin-top: 10px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5864, #e63946);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    box-shadow: 0 12px 26px rgba(230, 57, 70, .38);
    transition: transform .18s, box-shadow .18s, background .2s;
}
button:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(230, 57, 70, .5);
}
button:active,
.ghost-btn:active { transform: translateY(0) scale(.985); }

.error {
    background: #fff0f0;
    border: 1px solid #ffc9c9;
    color: #b02525;
    font-size: 13px;
    text-align: center;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.footer-note {
    text-align: center;
    font-size: 11.5px;
    color: #a5a5ad;
    margin-top: 18px;
}

/* ============ Teilnehmer-Liste (rechte Spalte) ============ */
.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.list-header h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: #1b1b1b;
}

.count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5864, #e63946);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(230, 57, 70, .3);
}

.user-list {
    list-style: none;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.user-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    margin-bottom: 8px;
    background: #f7f7fa;
    border: 2px solid #ececf0;
    border-radius: 14px;
    transition: background .18s, border-color .18s, transform .18s;
}

.user-list li:hover {
    background: #fff5f5;
    border-color: #ffd4d4;
    transform: translateX(2px);
}

.avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1f7a52, #14523d);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.name {
    font-size: 15px;
    font-weight: 600;
    color: #1b1b1b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty {
    font-size: 13.5px;
    color: #a5a5ad;
    text-align: center;
    padding: 24px 12px;
    border: 2px dashed #ececf0;
    border-radius: 14px;
}

/* ============ User-Bar (oben rechts, außerhalb der Karte) ============ */
.user-bar {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 10;

    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* --- Name links --- */
.user-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;
    border-radius: 999px;

    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
    backdrop-filter: blur(8px);

    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-icon {
    font-size: 14px;
    line-height: 1;
    opacity: .85;
}

/* --- Logout-Button rechts --- */
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 10px 16px;
    border-radius: 999px;

    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #ffffff;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    text-decoration: none;

    box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
    backdrop-filter: blur(8px);

    transition: transform .18s, box-shadow .18s,
                background .18s, border-color .18s;
}

.logout-btn span {
    font-size: 14px;
    line-height: 1;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #ff5864, #e63946);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(230, 57, 70, .45);
}

.logout-btn:active {
    transform: translateY(0) scale(.97);
}

   /* ============ Freischalten-Button: Zustände ============ */
.ghost-btn.btn-on {
    background: #2e7d32;            /* shorthand → überschreibt Gradient */
    color: #fff;
    border: 1px solid #1b5e20;
    box-shadow: 0 12px 26px rgba(46, 125, 50, .38);
}

.ghost-btn.btn-off {
    background: #c62828;
    color: #fff;
    border: 1px solid #8e0000;
    box-shadow: 0 12px 26px rgba(198, 40, 40, .38);
}

.ghost-btn.btn-on:hover {
    background: #1b5e20;
    box-shadow: 0 16px 32px rgba(46, 125, 50, .5);
}

.ghost-btn.btn-off:hover {
    background: #8e0000;
    box-shadow: 0 16px 32px rgba(198, 40, 40, .5);
}

.partner-card {
    text-align: center;
    padding: 28px 22px;
    border-radius: 22px;
    background: linear-gradient(160deg, #fff7f7 0%, #ffeaea 100%);
    border: 2px solid #ffd9d9;
    box-shadow: 0 14px 34px rgba(230, 57, 70, .12);
    animation: fadeIn .35s ease both;
}

.partner-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #b02525;
    margin-bottom: 6px;
}

.partner-name {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.6px;
    color: #1b1b1b;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ff5864, #e63946);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.divider {
    font-size: 14px;
    color: #e63946;
    letter-spacing: 8px;
    margin: 8px 0 20px;
    opacity: .7;
}

.wishlist-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #9a9aa2;
    margin-bottom: 12px;
}

.wishlist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
    margin-inline: auto;
}

.wishlist li {
    padding: 12px 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 2px solid #ececf0;
    font-size: 15px;
    font-weight: 600;
    color: #1b1b1b;
    text-align: left;
    position: relative;
    padding-left: 42px;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}

/* Nummer oder Geschenk-Icon vor jedem Wunsch */
.wishlist li::before {
    content: "🎁";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.wishlist li:hover {
    transform: translateX(3px);
    border-color: #ffd4d4;
    box-shadow: 0 6px 16px rgba(230, 57, 70, .1);
}

.user-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.user-list li .name {
    flex: 1;
}

.delete-form {
    margin: 0;
    display: inline;
}

.delete-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffd6d6;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    line-height: 1;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}

.delete-btn:hover {
    background: #c0392b;
    color: #fff;
    transform: scale(1.1);
}

/* --- Auf schmalen Screens kompakter --- */
@media (max-width: 480px) {
    .user-bar {
        top: 14px;
        right: 14px;
        gap: 6px;
    }
    .user-name {
        padding: 8px 12px;
        font-size: 11.5px;
        max-width: 130px;
    }
    .logout-btn {
        padding: 8px 12px;
        font-size: 11.5px;
    }

    
}