/* ============== BASE ============== */
*,
*::before,
*::after {
    box-sizing: border-box
}

:root {
    --blue: #5bb4ff;
    --blue-dark: #3a8fe1;
    --bg: #f4f6f9;
    --card: #fff;
    --border: #e6e8ee;
    --text: #1f2937;
    --muted: #6b7280;
    --shadow: 0 8px 28px rgba(0, 0, 0, .08);
    --radius: 12px;
    --ok: #2ecc71;
    --bad: #ff6b6b;
    --tie: #7dc4ff;
    --nav-h: 60px;
}


html,
body {
    height: 100%;
}

html {
    -webkit-text-size-adjust: 100%
}

/* iOS: verhindert Auto-Zoom/Bump */
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Noto Sans", sans-serif;
    padding-top: var(--nav-h)
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px
}

/* Form Controls: mindestens 16px → kein iOS-Autozoom */
input,
textarea,
select {
    font-size: 16px
}

/* Brand / Beschreibung index.html */
/* Login Seite Layout */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 80px;
    padding: 0 16px;
}

/* Card mittig */
.auth-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 24px 28px;
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.auth-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 800;
}

/* Link */
.auth-link {
    display: block;
    margin: 10px 0;
    font-size: 14px;
    color: var(--blue-dark);
}

/* Brand */
.auth-brand {
    text-align: center;
    margin-bottom: 16px;
}

.auth-brand h1 {
    font-size: 36px;
    font-weight: 900;
    color: var(--blue-dark);
}

/* Beschreibung */
.auth-desc {
    max-width: 700px;
    margin: 24px auto 0;
    text-align: center;
}

.auth-desc p {
    color: #111;
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
}

/* Responsiv */
@media (max-width: 820px) {
    .auth-brand h1 {
        font-size: 28px;
    }

    .auth-desc {
        max-width: 92%;
    }

    .auth-desc p {
        font-size: 15px;
    }
}


/* ============== NAVBAR (fixiert) ============== */
.nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.nav .container {
    width: 100%
}

.nav__inner {
    display: grid;
    grid-template-columns: 140px 1fr 220px;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
}

.nav__logo img {
    height: 40px
}

.nav__search {
    display: flex;
    justify-content: center
}

.nav__search input {
    width: min(720px, 90%);
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f9fafb
}

.nav__right {
    justify-self: end;
    display: flex;
    gap: 10px;
    align-items: center
}

.nav.stuck {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    border-bottom-color: transparent
}

/* Drawer (optional) */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: none;
    z-index: 70
}

.drawer {
    position: fixed;
    inset: 0;
    background: #fff;
    transform: translateY(-100%);
    transition: .25s ease;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px
}

.drawer.open {
    transform: translateY(0)
}

.overlay.open {
    display: block
}

.drawer__head {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.drawer__menu {
    display: grid;
    gap: 12px
}

.drawer__menu a,
.drawer__menu button {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f7f7fb;
    text-align: center;
    font-weight: 600
}

/* ============== NAVBAR DROPDOWN ============== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown__toggle {
    position: relative;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    background: #f7f7fb;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
}

.dropdown__avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block
}

/* Caret links/unten, sichtbar außerhalb */
.dropdown__caret {
    position: absolute;
    bottom: 0;
    /* bündig mit der unteren Kante */
    left: 0;
    /* bündig mit der linken Kante */
    transform: translate(-30%, 30%);
    /* leicht nach außen verschoben */
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #111;
    box-shadow: var(--shadow);
    pointer-events: none;
    transition: transform .2s ease;
}

.dropdown.open .dropdown__caret {
    transform: translate(-30%, 30%) rotate(180deg);
}

/* Menü unter Button, leicht nach links, damit nie abgeschnitten */
.dropdown__menu {
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    transform: translateX(-90%);
    min-width: 180px;
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    z-index: 100;
}

.dropdown.open .dropdown__menu {
    display: block
}

.dropdown__menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px
}

.dropdown__menu a:hover {
    background: #f7f7fb
}


/* ICONS DROPDOWN */
.dropdown__menu a {
  display: flex;
  align-items: center;
  gap: 8px;                /* Abstand Icon ↔ Text */
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 20px;
}

.dropdown__menu a .icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: var(--blue-dark); /* deine CI-Farbe */
}

.dropdown__menu a:hover {
  background: #f7f7fb;
}


/* ============== PROFILE HEADER ============== */
.profile-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 12px
}

.profile-cover {
    position: relative;
    height: 260px;
    background: url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?q=80&w=2160&auto=format&fit=crop') center/cover no-repeat;
}

.profile-avatar {
    position: absolute;
    left: 50%;
    bottom: -64px;
    transform: translateX(-50%);
    width: 136px;
    height: 136px;
    border-radius: 50%;
    border: 6px solid #fff;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.profile-meta {
    padding: 80px 16px 16px;
    text-align: center
}

.profile-name {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800
}



.stats {
    display: flex;
    gap: 32px;
    justify-content: center;
    list-style: none;
    margin: 0 0 8px;
    padding: 0
}

.stats li h6 {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase
}

.stats li p {
    margin: 4px 0 0;
    font-weight: 800
}

/* ============== TABS ============== */
.tabs {
    list-style: none;
    margin: 0;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center
}

.tabs .item {
    flex: 1 1 240px;
    max-width: 260px
}

.tab-btn {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f7f7fb;
    cursor: pointer;
    font-size: 15px
}

.tab-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff
}

/* ============== CARDS / COMPARES ============== */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 16px 0
}

.card-body {
    padding: 16px
}

.c-head {
    display: flex;
    align-items: center;
    gap: 10px
}

.avatar-40 {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd
}

.meta {
    margin: 0;
    font-size: 13px;
    color: var(--muted)
}

.card-title {
    margin: 10px 0 14px
}

/* IMMER NEBENEINANDER: zwei Spalten */
.pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.frame {
    display: block;
    border: 1px solid var(--border);
    background: #f6f7fb;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 16/10;
    margin: 0 auto;
}

.comparepics {
    width: 100%;
    height: 100%;
    object-fit: cover
}

/* Votes */
.score {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: .5rem 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f7f7fb;
    font-weight: 700
}

.score .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1
}

.score.green {
    border-color: #bdebd0;
    background: #eafff1
}

.score.green .dot {
    background: var(--ok)
}

.score.red {
    border-color: #ffc9c9;
    background: #fff0f0
}

.score.red .dot {
    background: var(--bad)
}

.score.blue {
    border-color: var(--blue);
    background: #e9f5ff
}

.score.blue .dot {
    background: var(--tie)
}

.cta {
    display: flex;
    justify-content: center;
    margin-top: 10px
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer
}

.btn-info {
    background: linear-gradient(180deg, #7dc4ff, var(--blue-dark));
    color: #06121f
}

.btn-danger {
    background: #ff6b6b;
    color: #fff;
    border: 1px solid #ff7070;
}

.btn-danger:hover {
    filter: brightness(.98);
}


/* Kommentare */
.comments {
    margin-top: 12px;
    text-align: left
}

.comments h4 {
    font-size: 15px;
    margin: 0 0 8px
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.comment {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    align-items: center
}

.comment .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd
}

.comment .name {
    font-weight: 700
}

.comment small {
    color: var(--muted)
}

.comment-form {
    display: flex;
    gap: 8px;
    margin-top: 8px
}

.comment-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    /* wichtig: >=16px verhindert iOS-Zoom */
}

/* ============== Viewer (Lightbox) ============== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.open {
    display: flex
}

.viewer {
    position: relative;
    border-radius: 12px;
    background: #000;
    box-shadow: var(--shadow);
    width: min(96vw, 1200px);
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain
}

.m-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 34px;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 44px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    line-height: 1;
    background: rgba(0, 0, 0, .25);
    border-radius: 10px;
}

.arrow.left {
    left: 16px
}

.arrow.right {
    right: 16px
}

@media (hover:hover) {
    .arrow:hover {
        background: rgba(255, 255, 255, .18)
    }
}

/* ============== Vote-Popup ============== */
.pop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 120
}

.pop.open {
    display: flex
}

.pop-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 16px;
    max-width: 820px;
    width: min(96vw, 820px)
}

.pop-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px
}

.pop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}

.thumb {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f6f7fb
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.vote-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.vote-actions .btn {
    width: 100%;
}

/* ============== Footer ============== */
.footer {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0
}

.list-inline {
    list-style: none;
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 0
}

/* ============== Responsive Feinschliff ============== */
@media (max-width:1100px) {
    .nav__inner {
        grid-template-columns: 110px 1fr 140px
    }
}

@media (max-width:920px) {
    .nav__inner {
        grid-template-columns: 100px 1fr 56px
    }

    .nav__search input {
        width: 100%
    }
}

@media (max-width:820px) {
    .profile-cover {
        height: 220px
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
        bottom: -56px
    }

    .profile-meta {
        padding-top: 72px
    }
}





/* #### Create COMPARE */

/* === Create Compare Page === */
.page-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 800
}

.create-card .card-body {
    display: grid;
    gap: 12px
}

/* Form Controls (nutzen deine CI-Variablen) */
.f-label {
    font-weight: 700;
    margin-top: 6px
}

.f-input,
.f-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-size: 16px
}

.f-textarea {
    resize: vertical
}

/* Standard Info-Note (blau) */
.note {
    border: 1px solid #facc15;
    background: #fef9c3;
    color: #854d0e;
    padding: 10px 12px;
    margin: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}


/* Upload / Vorschau-Layout */
.upload-row {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 820px) {
    .upload-row {
        grid-template-columns: 1fr
    }
}

/* Dropzone */
.dropzone {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px dashed var(--blue);
    border-radius: 12px;
    background: #f9fcff;
    cursor: pointer;
}

.dropzone:focus {
    outline: 2px solid var(--blue)
}

.dz-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dz-icon {
    font-size: 22px
}

.dz-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2
}

.dz-text strong {
    font-weight: 800
}

.muted {
    color: var(--muted)
}

/* Vorschau immer NEBENEINANDER – auch auf Handy */
.preview-col {
    width: 100%
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}

.p-slot {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #f6f7fb
}

.p-inner {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.placeholder {
    color: var(--muted)
}

/* Remove-X oben rechts im Bild */
.p-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow)
}

.p-remove:hover {
    background: #f4f6f9
}

/* Aktionen */
.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

.btn-ghost {
    background: #f7f7fb;
    color: #111;
    border: 1px solid var(--border);
}

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    background: #0ea5e9;
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    z-index: 1200
}

/* Datum und Uhrzeit auswahl für Ablauf */
.f-label {
    font-weight: 700;
    margin: 18px 0 6px;
    /* mehr Abstand oben */
    display: block;
}

/* Eingaben & Textareas */
.f-input,
.f-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    margin-bottom: 6px;
    /* kleiner Abstand nach unten */
}

/* Gruppe Date + Time harmonisch */
.f-datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    /* etwas mehr Luft zwischen den beiden */
    align-items: center;
    margin-bottom: 6px;
    /* Abstand nach unten */
}

/* Responsiv: untereinander */
@media (max-width:640px) {
    .f-datetime {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Textarea mit mehr Abstand zum nächsten Feld */
.f-textarea {
    resize: vertical;
    min-height: 120px;
    margin-bottom: 12px;
}

/* Readonly-Optik (Inputs disabled) */
.f-input:disabled {
    background: #f6f7fb;
    color: #6b7280;
    border-color: var(--border);
    cursor: not-allowed;
}



/* ### Settings-Layout ### */
.settings-wrap {
    margin-top: 16px;
}

.settings-grid {
    display: grid;
    gap: 12px;
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width:720px) {
    .settings-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons-Reihen */
.settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 8px;
}

.settings-danger {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}


/* ### editcompare ### */

.edit-wrap {
    margin-top: 16px;
}

.edit-grid {
    display: grid;
    gap: 12px;
}

.edit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width:720px) {
    .edit-row {
        grid-template-columns: 1fr;
    }
}

.actions-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 8px;
}

.actions-danger {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.btn-danger {
    background: #ff6b6b;
    color: #fff;
    border: 1px solid #ff7070;
}

.btn-danger:hover {
    filter: brightness(.98);
}

/* Readonly-Optik */
.f-input:disabled,
.f-textarea:disabled {
    background: #f6f7fb;
    color: #6b7280;
    border-color: var(--border);
    cursor: not-allowed;
}

/* Dropzone zunächst ausblenden (nur im Editmodus sichtbar) */
.dropzone[hidden] {
    display: none !important;
}

/* In der Readonly-Ansicht keine Remove-Buttons auf Bildern */
.p-slot.readonly .p-remove {
    display: none !important;
}
