/* ============================================
   HOME V2 — Cinematic Redesign
   Scoped under .home-v2
   ============================================ */

/* --- SECTION TITLES --- */
.home-v2 .section-title {
    border-left: none;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding-left: 0;
    color: var(--text);
    width: 100%;
}

.home-v2 .section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.home-v2 .section-head .view-all-link {
    color: var(--text-link);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: opacity 0.25s ease;
    white-space: nowrap;
}

.home-v2 .section-head .view-all-link:hover {
    opacity: 0.7;
}

/* Section spacing */
.home-v2 .stream-spotlight,
.home-v2 .cinema-showcase,
.home-v2 .coming-soon-section,
.home-v2 .special-section {
    margin-bottom: 72px;
}


/* ===========================
   1. WELCOME + SEARCH
   =========================== */
.home-v2 .home-welcome-search {
    text-align: center;
    padding: 40px 0 28px;
    margin: 0 0 32px;
    position: relative;
    z-index: 10;
    overflow: visible;
}

.home-v2 .home-welcome-search h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    color: var(--headline);
    line-height: 1.15;
    margin-bottom: 2px;
    text-align: center;
}

.home-v2 .home-welcome-search .welcome-sub {
    font-size: 1.05rem;
    color: var(--text-sub);
    margin: 0 0 28px;
    font-weight: 300;
}

/* Glass Search Bar */
.home-v2 .search-glass-wrap {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    z-index: var(--z-dropdown);
    overflow: visible;
}

.home-v2 .search-glass-wrap form {
    position: relative;
    overflow: visible;
}

.home-v2 .search-glass-wrap .search-input-group {
    position: relative;
    margin: 0;
    width: 100%;
}

.home-v2 .search-glass-wrap input[type="text"] {
    width: 100%;
    padding: 16px 60px 16px 22px;
    border-radius: var(--radius-full);
    border: var(--border-light);
    background: var(--background-light);
    /* backdrop-filter raus (war vorher blur(24px)): --background-light
       ist in beiden Themes opak, der Filter hatte keinen sichtbaren
       Effekt. Auf iOS 26 ("Liquid Glass") positionierte er aber den
       Text-Cursor falsch (oben links ausserhalb des Felds). */
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 400;
    box-sizing: border-box;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-sm);
}

.home-v2 .search-glass-wrap input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow:
        0 0 0 3px rgba(85,120,235,0.12),
        var(--shadow-md);
}

.home-v2 .search-glass-wrap input::placeholder {
    color: var(--text-sub);
}

.home-v2 .search-glass-wrap .search-submit-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--text-sub);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 8px;
    transition: color 0.25s ease;
}

.home-v2 .search-glass-wrap .search-submit-btn:hover {
    color: var(--text);
}

.home-v2 .search-glass-wrap .clear-search-btn {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sub);
    padding: 8px;
    font-size: 14px;
    display: none;
}

.home-v2 .search-glass-wrap .clear-search-btn:hover {
    color: var(--text);
}

/* Search Suggestions */
.home-v2 .search-glass-wrap .search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--background-light);
    border-radius: var(--radius-xl);
    border: var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-overlay);
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.home-v2 .search-glass-wrap .search-suggestion-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    align-items: flex-start;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    color: var(--text);
}

.home-v2 .search-glass-wrap .search-suggestion-item:last-child {
    border-bottom: none;
}

.home-v2 .search-glass-wrap .search-suggestion-item:hover {
    background: var(--background-hover);
}

.home-v2 .search-glass-wrap .search-suggestion-item .suggestion-poster-container {
    flex-shrink: 0;
}

.home-v2 .search-glass-wrap .search-suggestion-item .suggestion-poster {
    width: 67px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.home-v2 .search-glass-wrap .search-suggestion-item .suggestion-poster-placeholder {
    width: 67px;
    height: 100px;
    background: var(--grey-800);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    font-size: 24px;
}

.home-v2 .search-glass-wrap .suggestion-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.home-v2 .search-glass-wrap .suggestion-title {
    font-weight: 600;
    font-size: 16px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.home-v2 .search-glass-wrap .suggestion-subtitle {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
}

.home-v2 .search-glass-wrap .suggestion-type {
    margin-top: 0;
    font-size: 0.75rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.home-v2 .search-glass-wrap .suggestion-meta-status {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home-v2 .search-glass-wrap .suggestion-meta-rating {
    margin-top: 6px;
    display: flex;
    align-items: center;
}

.home-v2 .search-glass-wrap .suggestion-meta-rating .row-pill-user-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.home-v2 .search-glass-wrap .suggestion-meta-rating .row-pill-label {
    font-size: 12px;
    color: var(--text-sub);
}

.home-v2 .search-glass-wrap .suggestion-meta-rating .user-rating-span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 12px;
    font-weight: 600;
}


/* ===========================
   2. STREAM SPOTLIGHT
   =========================== */
.home-v2 .stream-spotlight {
    margin-top: 0;
    position: relative;
    z-index: 1;
}

/* --- HERO: Split-Layout ---
   Wichtig: nur EIN border-radius + overflow:hidden in der Hierarchie.
   Vorher hatten .spotlight-hero und .spotlight-hero-wrapper beide
   ihren eigenen radius-xl, dazu ein weisser Card-Background auf
   .spotlight-hero. Bei minimal differenter Anti-Alias-Berechnung
   schimmerten an allen vier Ecken hellweisse Boegen vom Outer
   durch — sah aus wie nicht ganz deckungsgleiche Radien. */
.home-v2 .spotlight-hero {
    position: relative;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-xl);
}

.home-v2 .spotlight-hero-wrapper {
    display: flex;
    min-height: 400px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: var(--border-subtle);
}

/* Linke Seite: Backdrop-Bild */
.home-v2 .spotlight-hero-backdrop {
    flex: 3;
    position: relative;
    overflow: hidden;
    background: var(--background-dark);
    display: block;
    text-decoration: none;
    color: inherit;
}

.home-v2 .spotlight-hero-backdrop .backdrop-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: heroKenBurns 25s ease-in-out infinite alternate;
}

.home-v2 .spotlight-hero-backdrop .backdrop-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    font-size: 0.95rem;
    background: linear-gradient(135deg, rgba(33,33,49,0.6) 0%, rgba(22,22,32,0.8) 100%);
}

@keyframes heroKenBurns {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.06) translate(-0.5%, -0.5%); }
}

/* Rechte Seite: Infos — sanfter Gradient für mehr Tiefe.
   Der Gradient wird über --spotlight-hero-info-gradient theme-aware gesteuert. */
.home-v2 .spotlight-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 32px;
    overflow: hidden;
    box-sizing: border-box;
    background: var(--spotlight-hero-info-gradient);
    border-left: var(--border-subtle);
    position: relative;
}

/* Menu-Button im Hero — positioniert relativ zum gesamten Wrapper */
.home-v2 .spotlight-hero-wrapper {
    position: relative;
}

.home-v2 .spotlight-hero-wrapper > .hero-menu-toggle-wrapper {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
}

.home-v2 .spotlight-hero-wrapper > .hero-menu-toggle-wrapper .media-card-menu {
    position: static;
}

/* Spotlight-Hero-Trigger: erbt jetzt das Glas-Styling von .menu-toggle,
   nur Größenanpassung lokal. */
.home-v2 .spotlight-hero-wrapper > .hero-menu-toggle-wrapper .menu-toggle {
    width: 40px;
    height: 40px;
}

/* Titel */
.home-v2 .spotlight-hero-info .hero-title-link {
    text-decoration: none;
    color: inherit;
    margin-top: 8px;
}

.home-v2 .spotlight-hero-info .hero-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--headline);
    line-height: 1.2;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta: Im Stream Datum */
.home-v2 .spotlight-hero-info .hero-meta {
    margin: 12px 0 0 0;
    font-size: 0.95rem;
    color: var(--text-sub);
    font-weight: 400;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Provider */
.home-v2 .spotlight-hero-info .hero-provider {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-v2 .spotlight-hero-info .hero-provider-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Cast */
.home-v2 .spotlight-hero-info .hero-cast {
    margin-top: auto;
    padding-top: 20px;
    border-top: var(--border-light);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    overflow: hidden;
}

.home-v2 .spotlight-hero-info .hero-cast-member {
    display: block;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
}

.home-v2 .spotlight-hero-info .hero-cast-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: var(--border-light);
    flex-shrink: 0;
    position: relative;
}

.home-v2 .spotlight-hero-info .hero-cast-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-v2 .spotlight-hero-info .hero-cast-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(85,120,235,0.2) 0%, rgba(155,155,235,0.1) 100%);
    color: var(--text-sub);
    font-size: 1.4rem;
}

/* Mobile Breakpoint */
@media (max-width: 1024px) {
    .home-v2 .spotlight-hero-wrapper {
        flex-direction: column;
        min-height: auto;
    }
    
    .home-v2 .spotlight-hero-backdrop {
        flex: none;
        width: 100%;
        height: 280px;
    }

    .home-v2 .spotlight-hero-info {
        flex: none;
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.05);
        padding: 24px;
        /* iOS Safari rendert overflow:hidden + border-radius am
           Outer-Wrapper bei der untersten Card unzuverlaessig — die
           unteren Ecken wirken eckiger als die oberen. Explizit
           border-radius am Kind-Element zwingt Safari zum eigenen
           Clip, sodass der Radius unten korrekt sichtbar ist. */
        border-bottom-left-radius: var(--radius-xl);
        border-bottom-right-radius: var(--radius-xl);
    }
}

@media (max-width: 768px) {
    .home-v2 .spotlight-hero-wrapper {
        min-height: auto;
    }
    
    .home-v2 .spotlight-hero-backdrop {
        height: 220px;
    }
    
    .home-v2 .spotlight-hero-info {
        padding: 20px;
    }
    
    .home-v2 .spotlight-hero-info .hero-title {
        font-size: 1.3rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .home-v2 .spotlight-hero-info .hero-meta {
        font-size: 0.85rem;
    }
    
    .home-v2 .spotlight-hero-info .hero-provider {
        margin-top: 12px;
    }
    
    .home-v2 .spotlight-hero-info .hero-cast {
        margin-top: 12px;
        padding-top: 12px;
        gap: 12px;
    }
    
    .home-v2 .spotlight-hero-info .hero-cast-avatar {
        width: 40px;
        height: 40px;
        border-width: 1px;
    }
    

}

/* --- STREAM CAROUSEL --- */
.home-v2 .stream-carousel-wrap .stream-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--background);
    border: var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-v2 .stream-carousel-wrap .stream-card:hover {
    box-shadow: var(--shadow-md);
}

.home-v2 .stream-carousel-wrap .stream-backdrop {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
    display: block;
}

.home-v2 .stream-carousel-wrap .tile-stream-info {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    background: transparent;
    padding: 12px 14px;
    border-radius: 0 0 14px 14px;
}

.home-v2 .stream-carousel-wrap .tile-stream-info.provider {
    padding-right: 56px;
}

.home-v2 .stream-carousel-wrap .tile-stream-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.home-v2 .stream-carousel-wrap .tile-release-date {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-top: 2px;
}

.home-v2 .stream-carousel-wrap .tile-provider-logo {
    position: absolute;
    width: 32px;
    height: 32px;
    bottom: 12px;
    right: 12px;
    border-radius: var(--radius-md);
}

.home-v2 .stream-carousel-wrap .media-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.home-v2 .stream-carousel-wrap .menu-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.home-v2 .empty-state {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-sub);
    font-style: italic;
}


/* ===========================
   3. LISTS — uses original global styles
   =========================== */
.home-v2 .user-lists-section .section-header {
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
}

.home-v2 .user-lists-section .section-header h2 {
    font-size: 1.3rem;
    width: auto;
}

.home-v2 .user-lists-section .section-header .view-all {
    font-size: 0.82rem;
    white-space: nowrap;
}


/* ===========================
   4. CINEMA GALLERY
   =========================== */
.home-v2 .cinema-showcase .section-head {
    padding-bottom: var(--spacing-12);
    border-bottom: var(--border-light);
}

.home-v2 .cinema-showcase .section-head .section-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.home-v2 .cinema-showcase .splide-kino .media-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-v2 .cinema-showcase .splide-kino .media-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.12);
}

.home-v2 .cinema-showcase .splide-kino .media-card img {
    border-radius: var(--radius-lg);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    width: 100%;
}

.home-v2 .cinema-showcase .splide-kino .media-card .rating-circle {
    border-radius: 50%;
}

.home-v2 .cinema-showcase .splide-kino .media-card .bookmark-indicator {
    z-index: 3;
}

.home-v2 .cinema-showcase .splide-kino .media-card .media-card-menu {
    z-index: 4;
}


/* ===========================
   5. FRIEND ACTIVITY (Feed-Style Kachel-Slider)
   =========================== */
.home-v2 .friend-activity-section {
    margin-bottom: 72px;
}

/* Kachel */
.home-v2 .fa-tile {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--background-light);
    /* token-konform (vorher off-token 10px), passend zum
       restlichen Design. */
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.home-v2 .fa-tile:hover {
    border-color: rgba(255,255,255,0.08);
}

/* Body: Poster + Content nebeneinander */
.home-v2 .fa-tile-body {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-12);
    padding: 12px;
}

/* Poster */
.home-v2 .fa-tile-poster {
    flex-shrink: 0;
    display: block;
    text-decoration: none;
}

.home-v2 .fa-tile-poster img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}

/* Content neben Poster */
.home-v2 .fa-tile-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
    padding-right: 32px;
}

.home-v2 .fa-tile-text {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-v2 .fa-tile-text strong {
    color: var(--text);
    font-weight: 600;
}

.home-v2 .fa-tile-time {
    font-size: 0.72rem;
    color: var(--grey-600);
}

/* Rating-Bereich (wie Feed) */
.home-v2 .fa-tile-ratings {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.home-v2 .fa-rating-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-v2 .fa-rating-label {
    font-size: 0.75rem;
    color: var(--text-sub);
    white-space: nowrap;
}

.home-v2 .fa-tile-ratings .rating-circle {
    position: static;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Context-Action-Button: oben rechts auf der Kachel */
.home-v2 .fa-tile > .media-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.home-v2 .fa-tile > .media-card-menu .menu-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}


/* ===========================
   6. COMING SOON
   =========================== */
.home-v2 .coming-soon-section .coming-soon-card {
    position: relative;
}

.home-v2 .coming-soon-section .countdown-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 6;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--sky-blue);
    color: var(--text-darker);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    pointer-events: none;
}

.home-v2 .coming-soon-section .stream-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--background);
    border: var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-v2 .coming-soon-section .stream-card:hover {
    box-shadow: var(--shadow-md);
}

.home-v2 .coming-soon-section .stream-backdrop {
    height: 170px;
    border-radius: 14px 14px 0 0;
}

.home-v2 .coming-soon-section .tile-stream-info {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    background: transparent;
    padding: 12px 14px;
    border-radius: 0 0 14px 14px;
}

.home-v2 .coming-soon-section .tile-stream-info.provider {
    padding-right: 56px;
}

.home-v2 .coming-soon-section .tile-stream-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.home-v2 .coming-soon-section .tile-release-date {
    font-size: 0.8rem;
    color: var(--text-sub);
}

.home-v2 .coming-soon-section .tile-provider-logo {
    position: absolute;
    width: 32px;
    height: 32px;
    bottom: 12px;
    right: 12px;
    border-radius: var(--radius-md);
}

.home-v2 .coming-soon-section .media-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}


/* ===========================
   SPLIDE HOME OVERRIDES
   =========================== */
.home-v2 .splide__arrow {
    background: var(--background-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-light);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.25s ease;
}

.home-v2 .splide:hover .splide__arrow {
    opacity: 1;
}

.home-v2 .splide__arrow:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.home-v2 .splide__arrow svg {
    fill: var(--text-link);
    width: 18px;
    height: 18px;
}

.home-v2 .splide__arrow i {
    color: var(--text-link);
    font-size: 1rem;
}

.home-v2 .splide__arrow:hover svg {
    fill: var(--white);
}

.home-v2 .splide__arrow:hover i {
    color: var(--white);
}

.home-v2 .splide__pagination {
    bottom: -28px;
    top: auto;
    transform: none;
}

.home-v2 .splide__pagination__page {
    background: var(--text-inactive);
    width: 6px;
    height: 6px;
}

.home-v2 .splide__pagination__page.is-active {
    background: var(--text-link);
    transform: none;
}


/* ===========================
   ANIMATIONS
   =========================== */
@keyframes homeReveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.home-v2 .home-welcome-search {
    animation: homeReveal 0.5s ease-out both;
}

.home-v2 .stream-spotlight {
    animation: homeReveal 0.55s ease-out 0.08s both;
}

.home-v2 .cinema-showcase {
    animation: homeReveal 0.55s ease-out 0.14s both;
}

.home-v2 .friend-activity-section {
    animation: homeReveal 0.55s ease-out 0.18s both;
}

.home-v2 .coming-soon-section {
    animation: homeReveal 0.55s ease-out 0.24s both;
}


/* ===========================
   RESPONSIVE — 1024px
   =========================== */
@media screen and (max-width: 1024px) {
    .home-v2 .spotlight-hero .stream-backdrop {
        height: 340px;
    }

}


/* ===========================
   RESPONSIVE — 768px
   =========================== */
@media screen and (max-width: 768px) {
    .home-v2 .home-welcome-search {
        padding: 28px 0 20px;
    }

    .home-v2 .home-welcome-search .welcome-sub {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .home-v2 .search-glass-wrap input[type="text"] {
        padding: 14px 56px 14px 18px;
        font-size: 0.95rem;
    }

    .home-v2 .spotlight-hero {
        border-radius: var(--radius-xl);
    }

    .home-v2 .spotlight-hero .stream-card {
        border-radius: var(--radius-xl);
    }

    .home-v2 .spotlight-hero .stream-backdrop {
        height: 260px;
        border-radius: var(--radius-xl);
    }

    .home-v2 .spotlight-hero .tile-stream-info {
        padding: 60px 20px 20px;
        border-radius: 0 0 16px 16px;
    }

    .home-v2 .spotlight-hero .tile-stream-info h3 {
        font-size: 1.25rem;
    }

    .home-v2 .spotlight-hero .tile-provider-logo {
        width: 36px;
        height: 36px;
        bottom: 20px;
        right: 20px;
        border-radius: var(--radius-md);
    }

    .home-v2 .stream-spotlight,
    .home-v2 .cinema-showcase,
    .home-v2 .friend-activity-section,
    .home-v2 .coming-soon-section,
    .home-v2 .special-section {
        margin-bottom: 48px;
    }

    .home-v2 .section-title {
        font-size: 1.3rem;
    }

    .home-v2 .splide__arrow {
        opacity: 1;
        width: 36px;
        height: 36px;
    }
}


/* ===========================
   RESPONSIVE — 480px
   =========================== */
@media screen and (max-width: 480px) {
    .home-v2 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .home-v2 .home-welcome-search {
        padding: 16px 0 12px;
    }

    .home-v2 .home-welcome-search h1 {
        font-size: 22px;
    }

    .home-v2 .home-welcome-search .welcome-sub {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .home-v2 .search-glass-wrap input[type="text"] {
        padding: 12px 48px 12px 16px;
        font-size: 0.9rem;
    }

    .home-v2 .search-glass-wrap .search-submit-btn {
        width: 36px;
        height: 36px;
        right: 5px;
    }

    .home-v2 .spotlight-hero {
        border-radius: var(--radius-lg);
        margin-bottom: 16px;
    }

    .home-v2 .spotlight-hero .stream-card {
        border-radius: var(--radius-lg);
    }

    .home-v2 .spotlight-hero .stream-backdrop {
        height: 200px;
        border-radius: var(--radius-lg);
    }

    .home-v2 .spotlight-hero .tile-stream-info {
        padding: 48px 16px 16px;
        border-radius: 0 0 14px 14px;
    }

    .home-v2 .spotlight-hero .tile-stream-info h3 {
        font-size: 1.1rem;
    }

    .home-v2 .spotlight-hero .tile-release-date {
        font-size: 0.82rem;
    }

    .home-v2 .spotlight-hero .tile-provider-logo {
        width: 32px;
        height: 32px;
        bottom: 16px;
        right: 16px;
        border-radius: var(--radius-md);
    }

    .home-v2 .spotlight-hero .menu-toggle {
        width: 34px;
        height: 34px;
    }

    .home-v2 .stream-carousel-wrap .stream-backdrop {
        height: 150px;
    }

    .home-v2 .stream-carousel-wrap .tile-stream-info {
        padding: 10px 12px;
    }

    .home-v2 .stream-carousel-wrap .tile-stream-info h3 {
        font-size: 0.88rem;
    }

    .home-v2 .stream-spotlight,
    .home-v2 .cinema-showcase,
    .home-v2 .friend-activity-section,
    .home-v2 .coming-soon-section,
    .home-v2 .special-section {
        margin-bottom: 36px;
    }

    .home-v2 .section-title {
        font-size: 1.15rem;
    }

    .home-v2 .stream-carousel-wrap .stream-card,
    .home-v2 .coming-soon-section .stream-card {
        border-radius: var(--radius-lg);
    }

    .home-v2 .stream-carousel-wrap .stream-backdrop,
    .home-v2 .coming-soon-section .stream-backdrop {
        border-radius: 12px 12px 0 0;
    }

    .home-v2 .coming-soon-section .stream-backdrop {
        height: 150px;
    }

    .home-v2 .coming-soon-section .countdown-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
        top: 8px;
        left: 8px;
    }

    .home-v2 .splide__pagination {
        display: none;
    }

    .home-v2 .splide__arrow {
        width: 32px;
        height: 32px;
    }
}


/* ===========================
   INLINE STYLE OVERRIDES
   (supplement inline <style> block)
   =========================== */
.home-v2 .section-title.section-header {
    margin-top: 0;
}

/* Menu portal (these complement the inline styles) */
.media-menu.is-portaled {
    display: block !important;
    position: fixed;
    pointer-events: auto;
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    min-width: 200px;
    z-index: 4001;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Hide original menus in card contexts */
.home-v2 .stream-card .media-menu,
.home-v2 .media-card .media-menu,
.home-v2 .fa-tile .media-menu:not(.is-portaled) {
    display: none;
}

/* Portaled overrides */
.media-menu.is-portaled .menu-item {
    border-radius: 0;
}

.media-menu.is-portaled .menu-item:first-child {
    border-radius: 12px 12px 0 0;
}

.media-menu.is-portaled .menu-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* ============================================================
   COMMUNITIES-SLIDER auf home.php
   Card-Style angelehnt an .fa-tile (background-light, border, hover),
   aber vertikal: Logo oben, Name + Member-Count unten.
   ============================================================ */
.home-v2 .home-communities-section .splide-communities {
    margin-bottom: var(--spacing-8);
}

.home-v2 .home-community-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-12);
    padding: var(--spacing-16);
    background: var(--background-light);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease;
    /* height:100% war problematisch — bei nur einer Community in der
       Splide-Slide wurde die Card vom Parent gestreckt, die unteren
       Ecken wurden vom Slide-Container abgeschnitten und wirkten
       eckig. Card waechst jetzt mit dem Inhalt mit. */
}

.home-v2 .home-community-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.home-v2 .home-community-card-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-v2 .home-community-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-v2 .home-community-card-logo.is-fallback {
    background: linear-gradient(135deg, rgba(72, 168, 233, 0.15), rgba(72, 168, 233, 0.05));
}

.home-v2 .home-community-card-fallback {
    font-size: 2rem;
    color: var(--text-sub);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-v2 .home-community-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    min-width: 0;
    width: 100%;
}

.home-v2 .home-community-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    text-align: center;
    /* zwei Zeilen max, längere Namen werden gekürzt */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.home-v2 .home-community-card-meta {
    font-size: 0.72rem;
    color: var(--grey-600);
}
