@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=IM+Fell+English:ital@0;1&family=Montserrat:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:           #dff0d4;
    --card:         #f7f4e8;
    --yellow:       #e8c84a;
    --green:        #4a7c3f;
    --lightgreen:   #8db87a;
    --sky:          #7ec8d8;
    --linen:        #f0e8d0;
    --dark:         #2a2a1a;
    --muted:        #5a6a4a;
    --cream:        #faf7ec;
    --rust:         #c47a2a;
    --radius:       14px;
}

/* ── Hintergrund: Midsommar-Himmel ── */
body.bg-soft {
    min-height: 100vh;
    margin: 0;
    background:
        /* Sonne oben mittig */
        radial-gradient(ellipse 60% 30% at 50% -5%, rgba(255, 240, 180, 0.55) 0%, transparent 70%),
        /* Horizont-Glühen */
        radial-gradient(ellipse 100% 25% at 50% 100%, rgba(141, 200, 100, 0.45) 0%, transparent 60%),
        /* Himmel-Verlauf wie im Poster: tiefes Türkis oben → zartes Grün unten */
        linear-gradient(180deg,
            #3db8c8 0%,
            #5ecbda 15%,
            #7ed8e0 28%,
            #a8e4d8 42%,
            #c2ecc0 56%,
            #d8f0b8 72%,
            #e8f4c8 85%,
            #f0e8d0 100%
        );
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

body {
    color: var(--dark);
    font-family: 'Cormorant Garamond', serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    margin: 0;
    background-color: var(--bg);
    overflow-x: hidden;
    position: relative;
    animation: pageFadeIn 0.6s ease;
}

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

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Container ── */
.container {
    position: relative;
    z-index: 1;
    bottom: 15px;
    background: rgba(247, 244, 232, 0.92);
    padding: 2rem;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 8px 32px rgba(74, 124, 63, 0.15),
        0 2px 8px rgba(0,0,0,0.06),
        inset 0 0 0 1px rgba(232, 200, 74, 0.3);
    text-align: center;
    border: 1.5px solid rgba(232, 200, 74, 0.4);
}

/* ── Typografie ── */
h1 {
    font-family: 'IM Fell English', serif;
    font-size: 2.8rem;
    letter-spacing: 1px;
    color: var(--green);
    margin-bottom: 0.3rem;
    text-shadow: 0 1px 3px rgba(74,124,63,0.15);
}

h2 {
    font-family: 'IM Fell English', serif;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
    color: var(--rust);
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--dark);
}

p {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    font-family: 'Cormorant Garamond', serif;
}

/* ── Inputs ── */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    margin: 0.4rem 0;
    border-radius: 12px;
    border: 2px solid rgba(141, 184, 122, 0.5);
    font-size: 1.05rem;
    font-family: 'Cormorant Garamond', serif;
    background: rgba(240, 232, 208, 0.6);
    color: var(--dark);
    transition: border 0.2s, background 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--green);
    background: var(--linen);
}

input::placeholder {
    color: var(--muted);
    font-style: italic;
}

/* ── Buttons ── */
button {
    width: 100%;
    padding: 0.75rem 1rem;
    margin: 0.4rem 0;
    border-radius: 12px;
    border: none;
    background: var(--green);
    color: var(--cream);
    font-size: 1.2rem;
    font-family: 'IM Fell English', serif;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

button:hover {
    background: #3a6030;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74,124,63,0.25);
}

button.yellow {
    background: var(--yellow);
    color: var(--dark);
}

button.yellow:hover {
    background: #d4b230;
}

hr {
    margin: 1.2rem 0;
    border: none;
    border-top: 1.5px solid rgba(141, 184, 122, 0.4);
}

/* ── Poster ── */
.poster {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 1.5rem auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(74,124,63,0.20);
    transition: transform 0.3s ease;
}

.poster:hover {
    transform: scale(1.02) rotate(0.5deg);
}

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1rem 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-style: italic;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    border-top: 1.5px solid rgba(141, 184, 122, 0.5);
}

/* ── Nickname-Anzeige ── */
.nickname-big {
    font-family: 'IM Fell English', serif;
    font-size: 3rem;
    color: var(--green);
    letter-spacing: 2px;
    margin: 1rem 0;
}

/* ── Nav ── */
.nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.nav button {
    width: auto;
    padding: 0.45rem 1rem;
    background: rgba(141, 184, 122, 0.25);
    color: var(--dark);
    font-size: 0.95rem;
    border-radius: 30px;
    margin: 0;
    border: 1.5px solid rgba(141, 184, 122, 0.4);
    font-family: 'Cormorant Garamond', serif;
}

.nav button.active {
    background: var(--yellow);
    color: var(--dark);
    border-color: var(--yellow);
}

.nav button:hover {
    background: var(--green);
    color: var(--cream);
    border-color: var(--green);
    transform: none;
    box-shadow: none;
}

/* ── Avatar ── */
.avatar-small {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 0.8rem auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--yellow);
    background: var(--linen);
    box-shadow: 0 2px 8px rgba(74,124,63,0.2);
}

.avatar-small img {
    position: absolute;
    top: 0; left: 0;
    width: 90px; height: 90px;
}

.avatar-preview {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 1rem auto;
    border-radius: 16px;
    border: 4px solid var(--green);
    background: var(--linen);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(74,124,63,0.2);
}

.avatar-preview img {
    position: absolute;
    top: 0; left: 0;
    width: 200px; height: 200px;
}

/* ── Token-Anzeige ── */
.token-display {
    font-family: 'IM Fell English', serif;
    font-size: 1.4rem;
    color: var(--rust);
    margin-bottom: 1rem;
    font-style: italic;
}

/* ── Chat ── */
#chat-box {
    background: rgba(240, 232, 208, 0.5);
    border: 1.5px solid rgba(141, 184, 122, 0.4);
    border-radius: 12px;
    padding: 1rem;
    height: 280px;
    overflow-y: auto;
    margin-bottom: 1rem;
    text-align: left;
}

.chat-msg {
    animation: msgSlideIn 0.25s ease;
    margin-bottom: 0.8rem;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 85%;
}

.chat-msg.me {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg strong {
    color: var(--green);
    font-weight: 700;
    font-size: 0.85rem;
}

.chat-msg span {
    font-size: 0.88rem;
    color: var(--dark);
}

.chat-bubble {
    background: var(--cream);
    border-radius: 14px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: 220px;
    word-break: break-word;
    border: 1px solid rgba(141,184,122,0.2);
}

.chat-msg.me .chat-bubble {
    background: rgba(232, 200, 74, 0.35);
    border-color: rgba(232, 200, 74, 0.5);
}

.chat-time {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 3px;
    font-style: italic;
}

.chat-input-row {
    display: flex;
    gap: 8px;
}

.chat-input-row input {
    flex: 1;
    margin: 0;
}

.chat-input-row button {
    width: auto;
    padding: 0.5rem 1rem;
    margin: 0;
}

/* ── Bestellkarten ── */
.item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1rem;
}

.item-card {
    background: rgba(240, 232, 208, 0.6);
    border-radius: 14px;
    padding: 1rem 0.8rem;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid rgba(141, 184, 122, 0.35);
    transition: border-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.item-card:hover {
    border-color: var(--green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74,124,63,0.15);
}

.item-card .item-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--dark);
    font-family: 'Cormorant Garamond', serif;
}

.item-card .item-cost {
    color: var(--rust);
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    font-style: italic;
}

/* ── Bestellhistorie ── */
.order-history {
    background: rgba(232, 200, 74, 0.2);
    border-radius: 14px;
    padding: 1rem;
    text-align: left;
    font-size: 0.95rem;
    border: 1.5px solid rgba(232, 200, 74, 0.4);
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.status-offen    { color: var(--rust); font-weight: 600; font-style: italic; }
.status-erledigt { color: var(--green); font-weight: 600; }

/* ── Sektionslabels ── */
.section-label {
    font-family: 'IM Fell English', serif;
    font-size: 1.1rem;
    color: var(--green);
    margin-bottom: 0.3rem;
    text-align: left;
    font-style: italic;
}

.option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.option-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    border: 1.5px solid rgba(141, 184, 122, 0.4);
    background: rgba(240, 232, 208, 0.6);
    color: var(--dark);
    cursor: pointer;
    font-size: 0.88rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    width: auto;
    margin: 0;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: var(--green);
    background: var(--green);
    color: var(--cream);
    transform: none;
}

.option-btn.active {
    border-color: var(--yellow);
    background: var(--yellow);
    color: var(--dark);
}

/* ── Info-Box ── */
.info-box {
    background: rgba(240, 232, 208, 0.6);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: left;
    margin-bottom: 1rem;
    border: 1.5px solid rgba(141, 184, 122, 0.3);
}

.info-box h3 {
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    gap: 10px;
    margin-bottom: 0.8rem;
    align-items: flex-start;
}

.info-time {
    font-family: 'IM Fell English', serif;
    font-size: 1.1rem;
    color: var(--rust);
    min-width: 65px;
    letter-spacing: 0.5px;
    font-style: italic;
}

.info-text {
    font-size: 0.95rem;
    color: var(--dark);
    line-height: 1.5;
}

.info-note {
    background: var(--cream);
    border-radius: 10px;
    padding: 0.8rem;
    font-size: 0.9rem;
    color: var(--dark);
    margin-top: 0.5rem;
    border-left: 4px solid var(--green);
}

/* ── Generator ── */
.generator-card {
    background: rgba(240, 232, 208, 0.65);
    border-radius: 18px;
    padding: 1.8rem 1.4rem;
    margin-bottom: 1.2rem;
    text-align: center;
    animation: fadeSlideIn 0.4s ease;
    border: 1.5px solid rgba(141, 184, 122, 0.35);
}

.generator-category {
    font-family: 'IM Fell English', serif;
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: var(--rust);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    font-style: italic;
}

.generator-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.5;
}

.generator-hint {
    margin-top: 0.8rem;
    text-align: center;
}

/* ── Blüten-Hintergrundanimation (statt Bubbles) ── */
body {
    position: relative;
    overflow-x: hidden;
}

.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Blütenblätter – werden per JS/Canvas ersetzt, span bleibt leer */
.bubbles span { display: none; }

@keyframes petalFloat {
    0%   { opacity: 0.8; }
    100% { opacity: 0; }
}

@media (max-width: 768px) {
    .bubbles {
        display: none;
    }
}

.container {
    position: relative;
    z-index: 1;
}

/* ── Gästeliste ── */
.guest-card {
    background: rgba(240, 232, 208, 0.6);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid rgba(141, 184, 122, 0.3);
}

.guest-avatar {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--yellow);
    background: var(--linen);
    box-shadow: 0 2px 6px rgba(74,124,63,0.15);
}

.guest-avatar img {
    position: absolute;
    top: 0; left: 0;
    width: 56px; height: 56px;
}

.guest-info {
    flex: 1;
    text-align: left;
}

.guest-name {
    font-family: 'IM Fell English', serif;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    color: var(--dark);
}

.guest-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.reaction-badge {
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.reaction-tooltip {
    display: none;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: var(--cream);
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
    font-family: 'Cormorant Garamond', serif;
}

.reaction-badge:hover .reaction-tooltip {
    display: block;
}

.guest-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guest-actions button {
    width: auto;
    padding: 0.4rem 0.7rem;
    margin: 0;
    font-size: 1.1rem;
    border-radius: 10px;
    line-height: 1;
}

.btn-hug  { background: #d4847a; }
.btn-poop { background: #8B6914; }

/* ── Admin / Tabellen ── */
.logout {
    float: right;
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-family: 'Cormorant Garamond', serif;
}

th, td {
    padding: 0.7rem 0.5rem;
    border-bottom: 1.5px solid rgba(141, 184, 122, 0.3);
    text-align: left;
}

th {
    color: var(--green);
    font-family: 'IM Fell English', serif;
    font-size: 1rem;
    letter-spacing: 1px;
    font-style: italic;
}

.btn-small {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    width: auto;
    margin: 0;
    cursor: pointer;
    border-radius: 20px;
    border: none;
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
}

.btn-done   { background: var(--green); }
.btn-delete { background: var(--rust); }

/* ── Animationen ── */
.tab {
    display: none;
    animation: fadeSlideIn 0.3s ease;
}

.tab.active {
    display: block;
    animation: fadeSlideIn 0.25s ease forwards;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

button {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    animation: ripple-effect 0.5s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to { transform: scale(4); opacity: 0; }
}

@keyframes avatarPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.08) rotate(-2deg); }
    70%  { transform: scale(0.96) rotate(1deg); }
    100% { transform: scale(1); }
}

.avatar-pop {
    animation: avatarPop 0.35s ease;
}

@keyframes cardBounce {
    0%   { transform: scale(1); }
    40%  { transform: scale(0.93); }
    70%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.card-bounce {
    animation: cardBounce 0.3s ease;
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.chat-msg {
    animation: msgSlideIn 0.25s ease;
}

/* ── RSVP ── */
#tab-rsvp button {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ── Spotify ── */
#search-results .item-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    text-align: left;
    padding: 0.7rem;
    background: rgba(240, 232, 208, 0.6);
}

#search-results .item-card button {
    width: auto;
    padding: 0.4rem 0.8rem;
    margin: 0;
    background: var(--green);
    border-radius: 8px;
    font-size: 0.85rem;
}
