/* ═══════════════════════════════════════════════════════════════════════════
   WELLE 9 — SLIDERS + UI-FIXES
   - Featured-Sponsors-Slider (Touch-Swipe)
   - Kategorien-Slider (Touch-Swipe)
   - Chat-Button + Badge (Welle 7 fehlte CSS)
   - Leaderboard-Modal (fehlte komplett)
   - Goal-Tile Active-State (Toggle-Visuals)
   ═══════════════════════════════════════════════════════════════════════════ */


/* ───────────────────────────────────────────────────────────────────────────
   FEATURED SPONSORS SLIDER (#featured-sponsors-card)
   ─────────────────────────────────────────────────────────────────────────── */

#featured-sponsors-card {
    margin-top: 30px;
    padding: 24px 24px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

#featured-sponsors-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 60%);
    pointer-events: none;
}

.fs-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px; flex-wrap: wrap; gap: 10px;
    position: relative; z-index: 1;
}

.fs-header h2 {
    font-family: 'Bebas Neue', sans-serif; font-size: 22px;
    color: #ff9f43; margin: 0; letter-spacing: 0.04em;
    display: flex; align-items: center; gap: 10px;
}

.fs-icon { font-size: 20px; }

.fs-count {
    background: rgba(255, 159, 67, 0.15);
    border: 1px solid rgba(255, 159, 67, 0.3);
    color: #ff9f43; padding: 2px 10px; border-radius: 50px;
    font-size: 12px; font-family: 'DM Sans', sans-serif; letter-spacing: 0;
}

.fs-nav-buttons { display: none !important; }

.fs-subtitle {
    color: #888; font-size: 13px; margin: 0 0 16px;
    line-height: 1.5; position: relative; z-index: 1;
}

.fs-slider-wrap {
    width: 100%;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none; -ms-overflow-style: none;
    margin: 0 -8px; padding: 0 8px 4px;
    position: relative; z-index: 1;
}

.fs-slider-wrap::-webkit-scrollbar { display: none; }

.fs-slider { display: flex; gap: 14px; padding: 4px 0 8px; }

.fs-card {
    flex: 0 0 280px; min-width: 280px; max-width: 280px;
    scroll-snap-align: start;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px; padding: 16px 18px;
    display: flex; flex-direction: column; gap: 10px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.fs-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 159, 67, 0.30);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.fs-card-header { display: flex; align-items: center; gap: 12px; }

.fs-card-logo {
    width: 50px; height: 50px; border-radius: 12px;
    object-fit: cover; flex-shrink: 0;
    background: white; border: 1px solid rgba(255,255,255,0.1);
}

.fs-card-logo-fallback {
    width: 50px; height: 50px; border-radius: 12px;
    background: rgba(255, 159, 67, 0.15);
    border: 1px solid rgba(255, 159, 67, 0.30);
    color: #ff9f43;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; flex-shrink: 0;
}

.fs-card-info { flex: 1; min-width: 0; }

.fs-card-name {
    font-size: 15px; font-weight: 600; color: #fff;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.fs-verified-icon {
    background: #2ecc71; color: white;
    width: 16px; height: 16px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; flex-shrink: 0;
}

.fs-card-type {
    font-size: 11px; color: #888; margin-top: 2px;
    text-transform: uppercase; letter-spacing: 0.05em;
}

.fs-card-desc {
    font-size: 12px; color: #aaa; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}

.fs-card-active {
    background: rgba(46, 204, 113, 0.06);
    border: 1px solid rgba(46, 204, 113, 0.20);
    border-radius: 8px; padding: 8px 10px;
}

.fs-card-active-title {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
    color: #2ecc71; margin-bottom: 6px; font-weight: 500;
}

.fs-card-active-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 4px;
}

.fs-card-active-list li {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; font-size: 11px; color: #c0c8d0;
}

.fs-card-active-name {
    flex: 1; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; min-width: 0;
}

.fs-card-active-prize-type {
    flex-shrink: 0; color: #ff9f43; font-weight: 500;
    background: rgba(255, 159, 67, 0.08);
    padding: 2px 6px; border-radius: 4px; font-size: 10px;
}

.fs-card-no-active {
    font-size: 11px; color: #555; text-align: center; padding: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.05); border-radius: 6px;
}

.fs-card-socials {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: auto; padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.fs-social-link {
    font-size: 11px; color: #ff9f43; text-decoration: none;
    padding: 3px 8px; background: rgba(255, 159, 67, 0.08);
    border: 1px solid rgba(255, 159, 67, 0.20);
    border-radius: 6px; transition: background 0.15s;
}

.fs-social-link:hover { background: rgba(255, 159, 67, 0.18); }

.fs-dots {
    display: flex; justify-content: center; gap: 6px;
    margin-top: 12px; position: relative; z-index: 1;
}

.fs-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer; transition: background 0.2s, transform 0.2s;
}

.fs-dot.active { background: #ff9f43; transform: scale(1.3); }

@media (max-width: 480px) {
    #featured-sponsors-card { padding: 18px 16px 14px; }
    .fs-header h2 { font-size: 18px; }
    .fs-card { flex: 0 0 240px; min-width: 240px; max-width: 240px; padding: 14px 14px; }
    .fs-card-logo, .fs-card-logo-fallback { width: 44px; height: 44px; }
    .fs-card-name { font-size: 14px; }
}


/* ───────────────────────────────────────────────────────────────────────────
   KATEGORIEN-SLIDER (cat-slider-* — eingeloggt)
   ─────────────────────────────────────────────────────────────────────────── */

.cat-slider-outer { width: 100%; margin-bottom: 10px; }

.cat-slider-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; flex-wrap: wrap; gap: 10px;
}

.cat-slider-title {
    font-family: 'Bebas Neue', sans-serif; font-size: 18px;
    color: #c0c8d0; margin: 0; letter-spacing: 0.04em;
}

.cat-slider-nav { display: none !important; }

.cat-slider-wrap {
    width: 100%;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none; -ms-overflow-style: none;
    margin: 0 -4px; padding: 4px;
}

.cat-slider-wrap::-webkit-scrollbar { display: none; }

.cat-slider { display: flex; gap: 14px; padding: 0; }

.cat-slide-tile {
    flex: 0 0 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    scroll-snap-align: start;
}

@media (max-width: 480px) {
    .cat-slide-tile {
        flex: 0 0 240px !important;
        min-width: 240px !important;
        max-width: 240px !important;
    }
}

@media (max-width: 360px) {
    .cat-slide-tile {
        flex: 0 0 220px !important;
        min-width: 220px !important;
        max-width: 220px !important;
    }
}

.cat-slider-dots {
    display: flex; justify-content: center; gap: 6px; margin-top: 10px;
}

.cat-slider-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer; transition: background 0.2s, transform 0.2s;
}

.cat-slider-dot.active { background: #ff9f43; transform: scale(1.3); }


/* ───────────────────────────────────────────────────────────────────────────
   CHALLENGE-KATEGORIEN-FILTER (chcat-tile)
   ─────────────────────────────────────────────────────────────────────────── */

.chcat-tile { cursor: pointer; transition: all 0.2s; }

.chcat-tile:hover {
    border-color: rgba(255, 159, 67, 0.35);
    background: rgba(255, 159, 67, 0.04);
}

.chcat-tile.is-active {
    border-color: #ff9f43 !important;
    background: rgba(255, 159, 67, 0.10) !important;
    box-shadow: 0 0 0 2px rgba(255, 159, 67, 0.15);
}

.chcat-tile.is-active .cat-tile-name { color: #ff9f43 !important; }


/* ───────────────────────────────────────────────────────────────────────────
   🆕 WELLE 7 CHAT-BUTTON + BADGE (CSS hat gefehlt!)
   ─────────────────────────────────────────────────────────────────────────── */

.btn-ch-chat {
    position: relative;
    padding: 8px 16px;
    background: rgba(102, 153, 255, 0.10);
    border: 1px solid rgba(102, 153, 255, 0.30);
    border-radius: 10px;
    color: #6699ff;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-ch-chat:hover {
    background: rgba(102, 153, 255, 0.20);
    border-color: rgba(102, 153, 255, 0.50);
    transform: translateY(-1px);
}

.btn-ch-chat:disabled {
    opacity: 0.5; cursor: not-allowed; transform: none;
}

.btn-ch-chat .chat-unread-badge,
.chat-unread-badge {
    position: absolute;
    top: -7px; right: -7px;
    background: #e74c3c; color: #fff;
    font-size: 10px; font-weight: 700; line-height: 1;
    padding: 3px 6px; border-radius: 50px;
    min-width: 18px; text-align: center;
    border: 2px solid #1a1a1a;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
    pointer-events: none; z-index: 2;
}


/* ───────────────────────────────────────────────────────────────────────────
   🏆 LEADERBOARD-MODAL (komplett gefehlt — deshalb unsichtbar!)
   ─────────────────────────────────────────────────────────────────────────── */

.leaderboard-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.80);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9990;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.leaderboard-modal-overlay.show { opacity: 1; }
.leaderboard-modal-overlay.closing { opacity: 0; }

.leaderboard-modal-content {
    background: #1c1c1e;
    border: 1px solid rgba(255, 159, 67, 0.30);
    border-radius: 16px;
    width: 100%; max-width: 540px; max-height: 88vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leaderboard-modal-overlay.show .leaderboard-modal-content {
    transform: translateY(0) scale(1);
}

.leaderboard-modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.leaderboard-modal-header h2 {
    font-family: 'Bebas Neue', sans-serif; font-size: 24px;
    color: #ff9f43; margin: 0; letter-spacing: 0.04em; line-height: 1.1;
}

.lb-modal-subtitle {
    font-size: 13px; color: #888; margin: 4px 0 0; font-weight: 400;
}

.leaderboard-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #c0c8d0;
    width: 34px; height: 34px; border-radius: 10px;
    cursor: pointer; font-size: 20px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.leaderboard-modal-close:hover {
    background: rgba(231, 76, 60, 0.15); color: #e74c3c;
    transform: rotate(90deg);
}

.leaderboard-modal-body {
    padding: 16px 22px 22px;
    overflow-y: auto; flex: 1;
}

.lb-target-info {
    background: rgba(255, 159, 67, 0.06);
    border: 1px solid rgba(255, 159, 67, 0.20);
    border-radius: 10px; padding: 10px 14px;
    font-size: 13px; color: #c0c8d0;
    margin-bottom: 14px; text-align: center;
}

.lb-target-info strong { color: #ff9f43; font-weight: 600; }

@media (max-width: 480px) {
    .leaderboard-modal-overlay { padding: 12px; }
    .leaderboard-modal-header { padding: 16px 16px 12px; }
    .leaderboard-modal-header h2 { font-size: 20px; }
    .leaderboard-modal-body { padding: 14px 16px 18px; }
    .leaderboard-modal-content { max-height: 92vh; }
}


/* ───────────────────────────────────────────────────────────────────────────
   🆕 WELLE 9: GOAL-TILE ACTIVE STATE (Toggle-Visualisierung)
   Wenn ein Top-Tile aktiv ist (Card aufgeklappt), zeigen wir das visuell
   ─────────────────────────────────────────────────────────────────────────── */

.goal-tile.is-active {
    border-color: rgba(255, 159, 67, 0.55) !important;
    background: rgba(255, 159, 67, 0.08) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        0 0 0 2px rgba(255, 159, 67, 0.20),
        0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.goal-tile.is-active .goal-icon {
    color: #ff9f43;
    transform: scale(1.08);
}

.goal-tile.is-active .goal-label {
    opacity: 1;
    transform: translateY(0);
    color: #ff9f43;
}

.goal-tile.is-active .goal-count {
    color: #ff9f43;
}

/* Kleine Markierung oben rechts: aktive Pfote */
.goal-tile.is-active::after {
    content: '▼';
    position: absolute;
    top: 8px; right: 10px;
    font-size: 10px;
    color: #ff9f43;
    opacity: 0.7;
    pointer-events: none;
    animation: tile-pulse 1.5s ease-in-out infinite;
}

@keyframes tile-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}


/* ───────────────────────────────────────────────────────────────────────────
   Scroll-Hint
   ─────────────────────────────────────────────────────────────────────────── */

.fs-slider-wrap::after,
.cat-slider-wrap::after {
    content: '';
    flex: 0 0 8px;
}


/* ───────────────────────────────────────────────────────────────────────────
   🆕 WELLE 9: CHALLENGE-CONDITIONS-BLOCK
   (renderChallengeConditions in main.js — CSS hat gefehlt!)
   ─────────────────────────────────────────────────────────────────────────── */

.challenge-conditions {
    background: rgba(102, 153, 255, 0.04);
    border: 1px solid rgba(102, 153, 255, 0.20);
    border-radius: 10px;
    margin: 8px 0 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.challenge-conditions[open] {
    background: rgba(102, 153, 255, 0.06);
    border-color: rgba(102, 153, 255, 0.30);
}

.challenge-conditions-summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 13px;
    color: #6699ff;
    font-weight: 500;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    user-select: none;
}

.challenge-conditions-summary::-webkit-details-marker {
    display: none;
}

.challenge-conditions-summary::before {
    content: '▶';
    font-size: 9px;
    color: #6699ff;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.challenge-conditions[open] .challenge-conditions-summary::before {
    transform: rotate(90deg);
}

.challenge-conditions-summary:hover {
    background: rgba(102, 153, 255, 0.08);
}

.challenge-conditions-body {
    padding: 4px 14px 14px;
    border-top: 1px solid rgba(102, 153, 255, 0.10);
    background: rgba(0, 0, 0, 0.15);
}

.cc-section {
    margin-top: 12px;
}

.cc-section:first-child {
    margin-top: 8px;
}

.cc-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6699ff;
    font-weight: 600;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(102, 153, 255, 0.15);
}

.cc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cc-list li {
    font-size: 12px;
    color: #c0c8d0;
    line-height: 1.5;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid rgba(102, 153, 255, 0.25);
    border-radius: 0 6px 6px 0;
}

.cc-list li strong {
    color: #fff;
    font-weight: 600;
}

@media (max-width: 480px) {
    .challenge-conditions-summary { padding: 9px 12px; font-size: 12px; }
    .challenge-conditions-body { padding: 4px 12px 12px; }
    .cc-list li { font-size: 11px; padding: 5px 8px; }
}
