/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #264850;
    --bg-dark: #1e3a40;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(255, 255, 255, 0.18);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-soft: rgba(255, 255, 255, 0.45);
    --accent: #FFFF00;
    --accent-bg: rgba(255, 255, 0, 0.06);
    --accent-border: rgba(255, 255, 0, 0.5);
    --chip-bg: rgba(255, 255, 255, 0.08);
    --chip-border: rgba(255, 255, 255, 0.15);
    --chip-hover-border: rgba(255, 255, 255, 0.3);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-pill: 100px;
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.25);
    --shadow-lightbox: 0 24px 80px rgba(0, 0, 0, 0.5);
    --transition: 0.2s ease;
    --max-width: 1200px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* ===== Header ===== */
.header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 32px;
    text-align: center;
}

.header__logo {
    height: auto;
    width: 180px;
    margin-bottom: 24px;
    opacity: 0.95;
}

.header__title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.header__subtitle {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== Filter Bar ===== */
.filterbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    padding: 20px 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.filterbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.filterbar__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filterbar__row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.filter-group__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
    white-space: nowrap;
}

.filter-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.chips {
    display: flex;
    gap: 8px;
}

.chip {
    background: var(--chip-bg);
    color: var(--text-muted);
    border: 1px solid var(--chip-border);
    border-radius: var(--radius-pill);
    padding: 7px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
}

.chip:hover {
    color: var(--text);
    border-color: var(--chip-hover-border);
    background: rgba(255, 255, 255, 0.12);
}

.chip--active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-border);
}

.chip--active:hover {
    background: rgba(255, 255, 0, 0.1);
    border-color: var(--accent);
}

.filter-select {
    background: var(--chip-bg);
    color: var(--text-muted);
    border: 1px solid var(--chip-border);
    border-radius: var(--radius-pill);
    padding: 7px 32px 7px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    line-height: 1;
}

.filter-select:hover {
    border-color: var(--chip-hover-border);
    color: var(--text);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-border);
    color: var(--accent);
}

.filter-select option {
    background: var(--bg-dark);
    color: var(--text);
}

/* ===== Video Count ===== */
.video-count {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-soft);
}

/* ===== Grid (CSS Columns Masonry) ===== */
.grid {
    max-width: var(--max-width);
    margin: 0 auto;
    column-count: 3;
    column-gap: 20px;
    padding: 20px 24px 64px;
}

/* ===== Video Card ===== */
.card {
    break-inside: avoid;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--card-hover-border);
}

.card__thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card__thumb {
    transform: scale(1.03);
}

.card__thumb--gradient {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card__thumb-impressionen {
    font-size: 1.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: -0.02em;
    pointer-events: none;
}

.card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.card:hover .card__play {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%) scale(1.08);
}

.card__play svg {
    width: 22px;
    height: 22px;
    fill: white;
    margin-left: 3px;
}

.card__body {
    padding: 16px;
}

.card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.badge {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    line-height: 1;
}

/* Kategorie-Badges — semi-transparent passend zum dunklen Theme */
.badge--friseur {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge--kosmetik {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge--humor {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge--employer_branding {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge--architektur {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Level-Badges */
.badge--einfach {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge--mittel {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge--schwierig {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.card__desc {
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--text-muted);
    white-space: pre-line;
    word-break: break-word;
}

.desc-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
    display: inline-block;
}

.desc-toggle:hover {
    text-decoration: underline;
}

.card__engagement {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.7rem;
    color: var(--text-soft);
}

.engagement__item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.engagement__link {
    display: inline-flex;
    align-items: center;
    color: var(--text-soft);
    transition: color 0.2s ease;
    margin-left: auto;
}

.engagement__link:hover {
    color: var(--accent);
}

/* ===== Platform Icon on Card ===== */
.card__platform {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.card__platform--instagram {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
}

.card__platform--tiktok {
    background: #000;
    color: #fff;
}

/* ===== Save/Bookmark Button on Card ===== */
.card__save {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
    opacity: 0.7;
    z-index: 2;
}

.card:hover .card__save,
.card__save--active {
    opacity: 1;
}

.card__save--active {
    color: var(--accent);
    background: rgba(0,0,0,0.7);
}

.card__save:hover {
    transform: scale(1.15);
}

/* Save filter button */
.chip--save-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.chip--save-filter svg {
    flex-shrink: 0;
}

.chip--save-filter.chip--active svg {
    fill: currentColor;
}

.copy-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-family: 'Montserrat', sans-serif;
    z-index: 10000;
    animation: toastFade 1.5s ease forwards;
}

@keyframes toastFade {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}

.card__anleitung {
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-muted);
    white-space: pre-line;
    word-break: break-word;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.card__anleitung-label {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 4px;
    margin-right: 6px;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-soft);
    font-size: 1rem;
    font-weight: 500;
}

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox--open {
    display: flex;
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.lightbox__content {
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.lightbox__content::-webkit-scrollbar {
    display: none;
}

.lightbox__video {
    width: 100%;
    border-radius: var(--radius);
    background: #000;
    display: block;
    box-shadow: var(--shadow-lightbox);
}

.lightbox__desc {
    margin-top: 20px;
    padding: 16px 20px;
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-muted);
    white-space: pre-line;
    word-break: break-word;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .grid {
        column-count: 2;
    }

    .header__title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .grid {
        column-count: 1;
        max-width: 480px;
        padding: 16px 16px 48px;
    }

    .filterbar {
        padding: 16px;
    }

    .filterbar__inner {
        gap: 10px;
    }

    .filterbar__row {
        gap: 10px;
    }

    .filter-divider {
        display: none;
    }

    .header {
        padding: 32px 16px 24px;
    }

    .header__title {
        font-size: 1.5rem;
    }

    .header__subtitle {
        font-size: 0.9rem;
    }

    .video-count {
        padding: 8px 16px 0;
    }

    .lightbox {
        padding: 16px;
    }

    .lightbox__content {
        max-width: 100%;
    }

    .lightbox__close {
        top: 12px;
        right: 12px;
    }
}
