:root {
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-strong: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.45);
    --text-main: #1d1d1f;
    --text-muted: #6e6e73;
    --accent: #0a84ff;
    --accent-2: #5e5ce6;
    --accent-green: #30d158;
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.15), inset 0 1px 0 rgba(255,255,255,0.6);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
                 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background: linear-gradient(135deg, #e9ecfb 0%, #fdeef5 45%, #e8f6fb 100%);
    background-attachment: fixed;
}

/* Blurred floating color blobs behind the glass */
.bg-blobs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
}
.blob1 {
    width: 520px; height: 520px;
    background: radial-gradient(circle at 30% 30%, #7db9ff, #5e5ce6);
    top: -160px; left: -120px;
    animation: float1 18s ease-in-out infinite;
}
.blob2 {
    width: 460px; height: 460px;
    background: radial-gradient(circle at 60% 40%, #ff9ecb, #ff6ad5);
    bottom: -180px; right: -140px;
    animation: float2 22s ease-in-out infinite;
}
.blob3 {
    width: 360px; height: 360px;
    background: radial-gradient(circle at 50% 50%, #8bf0d1, #34d1c4);
    top: 40%; right: 15%;
    animation: float3 20s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(40px, 60px); } }
@keyframes float2 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(-50px, -30px); } }
@keyframes float3 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(-30px, 50px); } }

.page {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

.page-header { text-align: center; margin-bottom: 32px; }
.page-header h1 { font-size: 2.1rem; margin: 0 0 6px; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-muted); margin: 0; font-size: 1.02rem; }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    padding: 28px 28px;
    margin-bottom: 22px;
}

.glass-card.compact { padding: 18px 22px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field > span { font-weight: 600; font-size: 0.92rem; color: var(--text-main); }

input[type="text"],
input[type="date"],
input[type="time"],
textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(8px);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    color: var(--text-main);
}
input:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(10,132,255,0.15);
    background: rgba(255,255,255,0.85);
}
textarea { resize: vertical; }

.option-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.option-row input[type="date"] { flex: 1.4; }
.option-row input[type="time"] { flex: 1; min-width: 0; }

.btn-primary, .btn-secondary, .btn-danger, .btn-icon {
    font-family: inherit;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    font-size: 1.02rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(94, 92, 230, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(94, 92, 230, 0.42); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.08);
    color: var(--text-main);
    font-size: 0.92rem;
}
.btn-secondary:hover { background: rgba(255,255,255,0.85); }

.btn-danger {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 59, 48, 0.12);
    color: #d70015;
    border: 1px solid rgba(255,59,48,0.25);
    font-size: 0.9rem;
}
.btn-danger:hover { background: rgba(255, 59, 48, 0.2); }

.btn-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.btn-icon:hover { background: rgba(255,59,48,0.15); color: #d70015; }

.alert-error, .alert-success {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}
.alert-error { background: rgba(255,59,48,0.12); border: 1px solid rgba(255,59,48,0.25); color: #b40017; }
.alert-success { background: rgba(48,209,88,0.14); border: 1px solid rgba(48,209,88,0.3); color: #12752f; }

/* Share link box */
.share-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.55);
    border: 1px dashed rgba(0,0,0,0.15);
}
.share-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.92rem;
    color: var(--text-muted);
    padding: 6px;
}
.share-box input:focus { box-shadow: none; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(10,132,255,0.12);
    color: var(--accent);
    margin-left: 8px;
    vertical-align: middle;
}
.badge.admin { background: rgba(94,92,230,0.15); color: var(--accent-2); }

/* Results grid */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.results {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 480px;
}
table.results th, table.results td {
    padding: 10px 12px;
    text-align: center;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Kopfzeile deutlich vom Rest abgehoben */
table.results thead th {
    color: var(--text-main);
    white-space: nowrap;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(0,0,0,0.14);
    box-shadow: 0 4px 10px rgba(31,38,135,0.08);
    padding: 12px 14px;
}
table.results thead th.th-name { background: rgba(255,255,255,0.78); }

.th-date {
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}
.th-date.weekend { color: #ff3b30; }
.th-time {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}

table.results td:first-child, table.results th:first-child {
    text-align: left;
    font-weight: 600;
    position: sticky;
    left: 0;
    background: var(--glass-bg-strong);
    z-index: 1;
}
table.results thead th:first-child {
    background: rgba(255,255,255,0.85);
    z-index: 2;
}
table.results tfoot td {
    font-weight: 700;
    border-bottom: none;
    border-top: 2px solid rgba(0,0,0,0.08);
}
table.results tfoot td:first-child { background: var(--glass-bg-strong); }

.vote-yes   { color: var(--accent-green); font-size: 1.05rem; }
.vote-maybe { color: #ffcc00; font-size: 1rem; text-shadow: 0 0 0 #ffcc00; }
.vote-no    { color: #ff3b30; font-size: 1rem; }

.sum-yes   { color: var(--accent-green); font-weight: 700; }
.sum-maybe { color: #b98a00; font-weight: 700; margin-left: 6px; font-size: 0.85rem; }

td.best-col, th.best-col { background: rgba(48,209,88,0.10) !important; }
th.best-col { box-shadow: 0 4px 10px rgba(31,38,135,0.08), inset 0 -2px 0 var(--accent-green); }

.checkbox-list { display: flex; flex-direction: column; gap: 10px; }
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: background .15s;
}
.checkbox-option:hover { background: rgba(255,255,255,0.75); }
.checkbox-option input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Termin-Zeile mit Ja/Vielleicht-Auswahl */
.vote-options-list { display: flex; flex-direction: column; gap: 10px; }
.option-vote-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.06);
}
.ovr-info { min-width: 160px; }
.ovr-date { font-weight: 700; font-size: 0.95rem; }
.ovr-date.weekend { color: #ff3b30; }
.ovr-time { font-weight: 400; font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

.choice-group { display: flex; gap: 8px; }
.choice-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.choice-pill input { display: none; }
.choice-pill:hover { background: rgba(255,255,255,0.9); }
.choice-pill.yes:has(input:checked) {
    background: rgba(48,209,88,0.18);
    border-color: var(--accent-green);
    color: #12752f;
}
.choice-pill.maybe:has(input:checked) {
    background: rgba(255,204,0,0.22);
    border-color: #ffcc00;
    color: #8a6d00;
}
.choice-pill.no:has(input:checked) {
    background: rgba(255,59,48,0.14);
    border-color: #ff3b30;
    color: #b40017;
}

.actions-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.small-name { font-size: 0.8rem; color: var(--text-muted); }
.remove-participant-form { display: inline; }

footer.hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 30px;
}
a { color: var(--accent); }

@media (max-width: 600px) {
    .page { padding: 28px 12px 60px; }
    .page-header h1 { font-size: 1.6rem; }
    .glass-card { padding: 20px 18px; border-radius: var(--radius-md); }
}
