:root {
    --grey-100: #f7f7f7;
    --grey-200: #e1e1e1;
    --grey-300: #cccccc;
    --grey-400: #b3b3b3;
    --grey-500: #999999;
    --grey-600: #7f7f7f;
    --grey-700: #333;
    --grey-750: #202020;
    --grey-800: #161616;
    --grey-900: #111;

    --black: #000000;
    --white: #ffffff;

    /* Hauptfarben */
    /* --primary-color: #48a8e9;
    --primary-color-hover: #246a99; */
    --primary-color: #5578eb;
    --primary-color-hover: #4666cf;
    --secondary-color: #161616;
    --secondary-color-hover: #000;
    --tertiary-color: #111;
    --tertiary-color-hover: #000;
    --accent-color: #313441;
    --accent-red: #fe2d52;
    --accent-blue: #48a8e9;
    --accent-green: #5AC458;

    /* Validierungsfarben */
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --error-color-hover: #bf2c3b;
    --info-color: #17a2b8;
    --success-color: #5AC458;

    --spacing-4: 4px;
    --spacing-8: 8px;
    --spacing-12: 12px;
    --spacing-16: 16px;
    --spacing-20: 20px;
    --spacing-24: 24px;
    --spacing-32: 32px;
    --spacing-40: 40px;
    --spacing-48: 48px;
    --spacing-56: 56px;
    --spacing-64: 64px;

    /* Validierungsfarben */
    --deep-blue: #212131;
    --deeper-blue: #161620;
    --deepest-blue: #09090f;
    /* --champagne: #DEC59D; */
    --champagne: #FFEFC7;
    --aster: #9B9BEB;
    --sky-blue: #7998d8;

    --text: var(--white);
    --text-sub: var(--grey-300);
    --text-dark: var(--deep-blue);
    --text-darker:var(--deeper-blue);
    --text-link: var(--white);
    --text-link-on-dark: var(--champagne);
    --text-inactive: var(--grey-600);
    --headline: var(--white);
    --headline-sub: var(--white);
    --background-light: var(--deep-blue);
    --background: var(--deeper-blue);
    --background-dark: var(--deepest-blue);
    --background-hover: var(--deepest-blue);
    --background-active: var(--deepest-blue);
    --navigation-tab: var(--grey-200);
    --active: var(--secondary-color);

    --slider-progress: 0%;

    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

}

.rating-user {
    color: var(--text-darker);
    background-color: var(--sky-blue);
}

.rating-friend {
    color: var(--text-darker);
    background-color: var(--champagne);
}

/* Empfohlen: reine Background-Lösung auf body */
/* Körper erhält mehrere Background-Layer inkl. dunklem Overlay */
body {
    /* Layer-Reihenfolge: Overlay (schwarz) -> Glows -> Grid -> Basisgradient */
    background:
      /* Overlay zum Abdunkeln */
      linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
      /* Radiale Glows (reduzierte Deckkraft) */
      radial-gradient(ellipse at 20% 50%, rgba(0,122,255,0.10) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 20%, rgba(48,209,88,0.08) 0%, transparent 50%),
      radial-gradient(ellipse at 40% 80%, rgba(191,90,242,0.06) 0%, transparent 50%),
      /* Feines Tech-Grid */
      repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(0,122,255,0.03) 2px,
        rgba(0,122,255,0.03) 4px
      ),
      /* Dunkler Basisgradient */
      linear-gradient(135deg, 
        #050507 0%,
        #0d0f1e 25%,
        #0e1830 50%,
        #0a2245 75%,
        #3a2a5c 100%
      );
  
    /* Fixierte Layer, damit nichts die Scrollbarkeit beeinflusst */
    background-attachment: fixed, fixed, fixed, fixed, fixed, fixed;
    background-repeat: no-repeat, no-repeat, no-repeat, repeat, no-repeat, no-repeat;
    background-size: auto, auto, auto, auto, auto, cover;
    min-height: 100dvh;
  }
  

.loved-by-the-king-regular {
    font-family: "Loved by the King", cursive;
    font-weight: 400;
    font-style: normal;
  }  

.welcome-user {
    font-family: "Outfit", -apple-system;
    margin: var(--spacing-64) 0;
}

.welcome-user h1 {
    font-size: 36px;
    /* line-height: 54px; */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.welcome-user p {
    font-size: 20px;
    text-align: center;
    color: var(--text-sub);
    margin: 0;
}

body {
    font-family: var(--font-family);
    font-weight: 300;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--background-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding-bottom: 100px;
    letter-spacing: .6px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--headline);
    text-align: left;
    margin: 0;
    word-break: break-word;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    color: var(--text-sub);
    text-decoration: none;
}

a:-webkit-any-link {
    color: var(--text);
    text-decoration: none;
}

a:visited {
    color: var(--text);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

.container {
    max-width: 1200px;
    padding: var(--spacing-24);
    margin: 0 auto;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-bottom: var(--spacing-32);
}

.auth-links{
    margin-top: var(--spacing-16);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.movie-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.movie-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.movie-title {
    margin-top: 0.5rem;
    font-weight: bold;
}

.movie-rating {
    color: #ffd700;
    font-size: 1.2rem;
}

.profile-container {
    padding: var(--spacing-20);
}


.back-button {
    font-size: var(--spacing-24);
    margin-bottom: var(--spacing-20);
}

.profile-header, .friends-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-20);
    margin-bottom: var(--spacing-32);
}

.profile-header{
    background: var(--background-light);
    border-radius: var(--spacing-12);
    padding: var(--spacing-24);
    margin-top: var(--spacing-12);
}

.profile-stats{
    display: flex;
    gap: var(--spacing-8);
    color: var(--text);
    flex-direction: row;
}

.profile-stats .stat-item::after{
    content: "|";
    padding-left: var(--spacing-8);
    color: var(--text-sub);
}

.profile-stats .stat-item:last-child::after{
    content: "";
    padding-left: 0;
}

@media screen and (max-width: 768px) {
    .profile-header, .friends-header {
        padding: var(--spacing-16);
        margin-top: 0;
        align-items: start;
    }

    .profile-stats{
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    /* .profile-stats .stat-item::after{
        content: "";
    } */
}

@media screen and (max-width: 500px) {
    .profile-header, .friends-header {
        padding: var(--spacing-16);
        margin-top: 0;
        align-items: start;
    }

    .profile-stats{
        flex-direction: column;
        flex-wrap: nowrap;
    }
    
    .profile-stats .stat-item::after{
        content: "";
    }
}

/* home */

.stream-section .section-header {
    display: flex;
    justify-content: space-between;
}

.load-other {
    font-size: 14px;
    color: var(--text);
    transition: opacity 0.3s;
}

.load-other:hover {
    opacity: 0.8;
}

.stream-section, .cinema-section, .upcoming-section, .user-lists-section, .friend-ratings-section {
    margin: 64px 0;
}

.section-title {
    color: var(--text);
    border-left: 4px solid var(--primary);
}

.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

@media screen and (max-width: 480px) {
    .stream-grid {
        grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
    }
    
}

.stream-card {
    position: relative;
    overflow: visible;
    transition: transform 0.3s ease;
}

.stream-backdrop {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--spacing-8);
}

.stream-poster {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.tile-stream-info {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: var(--spacing-16);
    color: white;
    border-bottom-right-radius: var(--spacing-8);
    border-bottom-left-radius: var(--spacing-8);
}

.tile-stream-info.provider {
    padding-right: var(--spacing-64);
}

.tile-stream-info h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.tile-stream-info p {
    margin: 0;
    font-size: 0.875em;
    color: var(--text-sub);
}

.tile-provider-logo {
    position: absolute;
    width: 40px;
    height: 40px;
    bottom: var(--spacing-16);
    right: var(--spacing-16);
    border-radius: var(--spacing-4);
}

.tile-release-date {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Listen-Sektion */

.user-lists-section .section-header, .friend-ratings-section .section-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Immer 3 Spalten */
    gap: 24px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .list-grid {
        grid-template-columns: 1fr; /* 1 Spunde unter 768px */
    }
}

.list-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-sub);
    margin-bottom: 1rem;
}

.list-stats .count {
    color: var(--accent-color);
}

.list-hover {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.list-card:hover .list-hover {
    right: 20px;
    opacity: 1;
}

.no-lists {
    display: flex;
    flex-direction: column;
    vertical-align: center;
    align-items: center;
    text-align: center;
    background-color: var(--background-light) !important;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 12px;
}

.create-list-btn {
    margin-top: 20px;
    padding: 12px 25px;
}
  
  @media screen and (min-width: 1194px) {
    .friend-ratings-section .media-grid .media-item:nth-child(n+8) {
      display: none !important;
    }
  }
  @media screen and (max-width: 1194px) {
    .friend-ratings-section .media-grid .media-item:nth-child(n+7) {
      display: none !important;
    }
  }
  @media screen and (max-width: 1027px) {
    .friend-ratings-section .media-grid .media-item:nth-child(n+6) {
      display: none !important;
    }
  }
  @media screen and (max-width: 861px) {
    .friend-ratings-section .media-grid .media-item:nth-child(n+6),.friend-ratings-section .media-grid .media-item:nth-child(n+7), .friend-ratings-section .media-grid .media-item:nth-child(n+8) {
      display: flex !important;
    }
}
    @media screen and (max-width: 768px) {
        .friend-ratings-section .media-grid .media-item:nth-child(n+6),.friend-ratings-section .media-grid .media-item:nth-child(n+7), .friend-ratings-section .media-grid .media-item:nth-child(n+8) {
          display: none !important;
        }
  }
  @media screen and (max-width: 711px) {
    .friend-ratings-section .media-grid .media-item:nth-child(n+6),.friend-ratings-section .media-grid .media-item:nth-child(n+7), .friend-ratings-section .media-grid .media-item:nth-child(n+8) {
      display: flex !important;
    }
}
@media screen and (max-width: 575px) {
    .friend-ratings-section .media-grid .media-item:nth-child(n+7), .friend-ratings-section .media-grid .media-item:nth-child(n+8) {
      display: none !important;
    }
}
  

  #menu-portal {
    position: fixed;
    z-index: 1000;
}

.media-menu {
    display: none;
    background: var(--background);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 200px;
}

/* @media (max-width: 768px) {
    .options-container {
      max-height: 50vh;
      overflow-y: auto;
      width: 90vw;
      left: 5vw !important;
      right: 5vw !important;
    }
  }
  
  .options-container {
    position: absolute;
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
  }
   */
/* Original-Menüs ausblenden */
.swiper-slide .media-menu,
.stream-card .media-menu {
    display: none !important;
}  


.friends-header{
    margin-top: var(--spacing-24);
}

.version {
    margin-top: var(--spacing-24);
    text-align: left;
    display: flex;
    font-size: 0.75;
    color: var(--text-sub);
}

.profile-image {
    display: flex;
}

.profile-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-info h1 {
    margin: 0;
    font-size: var(--spacing-24);
    color: var(--text);
    word-break: break-word;
}

.rated-movies {
    margin: var(--spacing-8) 0;
    color: var(--grey-800);
}

.profile-tabs {
    border-bottom: 1px solid var(--grey-800);
    margin-bottom: var(--spacing-20);
}

.profile-tabs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: var(--spacing-20);
}

.profile-tabs a {
    text-decoration: none;
    color: var(--grey-800);
    padding: var(--spacing-12) 0;
    display: block;
}

.profile-tabs a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.profil-abmelden{
    display: flex;
    justify-content: flex-end;
    /* margin-top: 32px; */
}

.profil-footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-32);
}

.profil-abmelden{
    justify-content: flex-end;
}

.profil-feedback{
    justify-content: flex-start;
}

.settings-list {
    display: flex;
    flex-direction: column;
}

.settings-list a {
    color: var(--text);
}

.settings-list a:hover {
    background: var(--background-hover);
    opacity: .8;
}

#welcome .button {
    padding: var(--spacing-12) 0;
}

#welcome .error-message{
    width: 250px;
}

.welcome {
    padding: var(--spacing-12) 0;
}

.settings-item, .privacy-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-16) var(--spacing-8);
    border-bottom: 1px solid var(--grey-700);
    text-decoration: none;
    color: var(--text);
}

.arrow {
    color: var(--text);
}

#logout-button {
    cursor: pointer;
    height: 40px !important;
}

.feedback-button{
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--white) !important;
    border: none;
    padding: 0 var(--spacing-16);
    height: 40px;
    cursor: pointer;
    font-size: 14px;
}

.settings-section h2 {
    color: var(--grey-900);
    margin-bottom: var(--spacing-16);
}

/* Provider */

.master-toggle {
    background-color: transparent;
    display: flex;
    justify-content: end;
    gap: var(--spacing-8);
    padding-right: var(--spacing-12);
    margin-top: var(--spacing-8) ;
}

@media screen and (max-width: 768px) {
    .master-toggle {
        margin-top: var(--spacing-16);
    }
    
}

.drag-handle {
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-12);
    /* cursor: grab; */
}

.drag-handle i {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--grey-400);
}

.provider-item.sortable-ghost {
    opacity: 0.5;
    background: var(--grey-100);
}

.provider-logo {
    display: flex;
    align-items: center;
    flex: 1;
    gap: var(--spacing-12);
}

.provider-list {
    margin-top: var(--spacing-24);
    margin-bottom: var(--spacing-24);
    display: flex;
    flex-direction: row;
    gap: var(--spacing-16);
    flex-wrap: wrap;
    justify-content: space-between;
}

.provider-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-16);
    padding: var(--spacing-12);
    background: var(--background-light);
    border-radius: var(--spacing-4);
    margin-bottom: var(--spacing-8);
    /* cursor: move; */
    width: 45%;
}

@media screen and (max-width: 768px) {
    .provider-list {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    
    .provider-item {
        width: unset;
    }
}

.alert.alert-warning{
    padding: var(--spacing-16);
}

.provider-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-12);
    flex: 1;
}

.provider-group{
    gap: var(--spacing-16);
    display: flex;
    align-items: center;
    justify-content: start;
    flex-wrap: wrap;
}

.provider-logo img, .provider-group img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--spacing-4);
}

.provider-name {
    color: var(--text-sub);
}

.drag-handle {
    color: var(--grey-400);
    padding: var(--spacing-8);
    cursor: grab;
    display: none;
}

.provider-item.dragging {
    opacity: 0.5;
    background: var(--grey-100);
}

.provider-item:active .drag-handle {
    cursor: grabbing;
}

/* Toggle Switch Styling */
.streamable-toggle{
    display: flex;
    align-items: center;   
    gap: var(--spacing-8);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--grey-400);
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: var(--white);
    transition: .4s;
    border-radius: 50%;
}

section#welcome {
    background-color: #00000099;
    padding: var(--spacing-32);
}
/* wtchlst */

.text-intro {
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 100;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 5px;
    border: 1px solid var(--text-sub);
    border-radius: 100px;
    padding: var(--spacing-4) var(--spacing-12);
    white-space: nowrap;
}

.text-intro::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    background: var(--accent-red, #fe2d52);
    border-radius: 50%;
    /* vertical-align: -0.1em; */
}
/* 
.text-intro {
    color: var(--text-sub);
    font-size: 20px;
    font-weight: 100;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 6px;
}

.text-intro::after {
    content: '■';
    font-size: 6px;  
    color: var(--primary-color);
}
 */

input:checked+.toggle-slider {
    background-color: var(--primary-color);
}

input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.stream-container {
    padding: var(--spacing-16);
}

.filter-section {
    /* position: sticky; */
    top: 0;
    background: var(--background);
    padding-bottom: var(--spacing-16);
    z-index: 100;
    margin-bottom: var(--spacing-24);
}

.provider-filter {
    display: flex;
    gap: var(--spacing-8);
    margin-top: var(--spacing-16);
    overflow-x: auto;
    padding-bottom: var(--spacing-8);
}

.filter-section.provider-info a{
    /* width: fit-content;
    padding: var(--spacing-4) var(--spacing-16); */
    text-decoration: underline;
}

.filter-section.provider-info i{
    margin-right: var(--spacing-8);
}

.provider-button {
    width: 40px;
    height: 40px;
    /* border-radius: 8px; */
    padding: 0;
    border: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.provider-button.active {
    opacity: 1;
}

.provider-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.date-section {
    margin-top: var(--spacing-24);
}

.provider-section {
    margin-top: var(--spacing-16);
}

.content-type-header {
    font-size: 18px;
    color: var(--grey-900);
    margin: var(--spacing-16) 0 var(--spacing-8);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-16);
    margin-top: var(--spacing-12);
    margin-bottom: var(--spacing-24);
}

.movie-grid:last-child {
    margin-bottom: 0;
}

.movie-card {
    position: relative;
}

.movie-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
}

.movie-info h4 {
    font-size: 14px;
    margin: 0;
}

.movie-info .button-secondary {
    border: 1px solid var(--text);
    color: var(--text);
    background: transparent;
}

.movie-info .button-secondary:hover {
    border: 1px solid var(--text);
    background: var(--text);
    color: var(--black);
}

.release-date {
    font-size: 12px;
    color: var(--grey-600);
    margin: var(--spacing-4) 0 0;
}

.stream-container {
    padding: var(--spacing-16);
    padding-bottom: 80px;
}

.alert-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-40);
  }  

.stream-alert {
    grid-column: 1 / -1; /* Spannt gesamte Grid-Breite */
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: var(--spacing-8);
  }
  

.date-section {
    margin-bottom: var(--spacing-24);
}

.provider-badge {
    position: absolute;
    top: var(--spacing-8);
    right: var(--spacing-8);
    width: 24px;
    height: 24px;
    background: var(--white);
    border-radius: 4px;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.provider-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stream-controls,
.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-16);
}

.sort-user-rating{
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: var(--spacing-16);
}

@media screen and (max-width: 480px) {

    .list-controls.list-details {
        flex-direction: column-reverse;
        gap: var(--spacing-24);
        justify-content: flex-start;
        align-items: flex-start;
        margin: var(--spacing-24) 0;
    }
    
    .list-details .custom-select, .list-details .sort-controls{
        width: 100%;
    }
    
}

/* .filter-button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: var(--spacing-12) var(--spacing-16);
    line-height: 1.6;
    font-size: 16px;
    min-width: 120px;
    cursor: pointer;
} */

.sort-select {
    padding: var(--spacing-8);
    border: 1px solid var(--grey-300);
    /* border-radius: 4px; */
}

.provider-warning {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--background-light);
    border-radius: 12px;
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.05); */
}

.provider-warning .button-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-12);
    background: var(--grey-100);
    cursor: pointer;
}

.provider-header h2 {
    margin: 0;
}

.collapse-icon {
    transition: transform 0.3s ease;
}

.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.provider-content {
    display: none;
}

.provider-content.show {
    display: block;
}

/* Filter Modal */

.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-12);
}

.filter-modal {
    display: none; /* Standardmäßig ausgeblendet */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Halbdurchsichtiger schwarzer Hintergrund */
    z-index: 1001; /* Hoher z-index um über anderen Elementen zu sein */
    justify-content: center;
    align-items: center;
}

.filter-modal.show {
    display: flex;
}
.filter-modal-content {
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-24) var(--spacing-24) 0 var(--spacing-24);
    background: var(--background);
    width: 90%;
    max-width: 600px;
}

.filter-modal-header h3 {
    margin: 0;
}

.filter-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap : var(--spacing-8);
    align-items: center;
    padding: var(--spacing-24);
    background: var(--background);
    width: 90%;
    max-width: 600px;
}

.filter-pill[data-active]::after {
    content: ' ✓';
    color: var(--success-color);
    margin-left: 5px;
}
/* Inaktive Filter-Pills */
.filter-pill-inactive {
    opacity: 0.5;
    background-color: #6c757d !important;
    color: #ffffff !important;
    /* pointer-events entfernt, damit Klicks wieder funktionieren */
    /* pointer-events: none; */
    position: relative;
}

/* Entferne das Verstecken des Remove-Buttons */
.filter-pill-inactive .filter-pill-remove {
    display: inline-block;
    cursor: pointer;
}

/* Tooltip beibehalten */
/* .filter-pill-inactive::after {
    content: "Nicht relevant für diesen Tab";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    margin-bottom: 5px;
} */

.filter-pill-inactive:hover::after {
    opacity: 1;
}

#filterPills a#clearAllFiltersLink {
    display: flex;
    align-items: center;
    margin-left: .5rem;
    font-size: 0.85rem;
    color: var(--text-sub);
    text-decoration: none;
    cursor: pointer;
}
#filterPills a#clearAllFiltersLink i {
    margin-right: .25rem;
}

.filter-modal-body {
    padding: var(--spacing-24);
    /* padding-bottom: calc(var(--spacing-16) + 82px); */
    overflow-y: auto;
    background: var(--background);
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    height: inherit;
}

input[name="rating_status"]:checked+label {
    font-weight: 700;
    color: var(--primary-color);
}

input[name="rating_status"]:checked+label::before {
    border-color: var(--primary-color);
    background: radial-gradient(var(--primary-color) 50%, transparent 50%);
}

.filter-pills-container {
    display: flex;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.filter-pill {
    background: var(--grey-700);
    border-radius: 1.25rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.filter-pill:hover {
    background: var(--grey-800);
}

.filter-pill .ph-x {
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.7;
}

.filter-pill .ph-x:hover {
    opacity: 1;
}

.filter-pills-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0;
}

/* .filter-pill {
    background: var(--grey-200);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
} */

.filter-pill-remove {
    cursor: pointer;
    color: var(--text);
    margin-left: 4px;
    transition: color 0.2s ease;
    background-color: transparent;
    border: none;
}

.filter-pill-remove:hover {
    color: var(--error-color);
}

/* Spezifische Farben für verschiedene Filtertypen */
.filter-pill.include {
    background: rgba(14, 225, 175, 0.1);
    border: 1px solid var(--primary-color);
}

.filter-pill.exclude {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--error-color);
}

.filter-pill.rating {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning-color);
}

.filter-section h4 {
    margin-bottom: var(--spacing-12);
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-24);
}

.provider-icons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-8);
}

.provider-icon {
    width: 48px;
    height: 48px;
    border: none;
    background: none;
    padding: var(--spacing-4);
    border-radius: 4px;
    cursor: pointer;
}

.provider-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.provider-icon.active {
    opacity: 1;
}

.provider-icon:not(.active) {
    opacity: 0.5;
}

.save-button {
    width: 100%;
    padding: var(--spacing-12);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    /* border-radius: 4px; */
    margin-top: var(--spacing-24);
    cursor: pointer;
}

.save-button:hover {
    background: var(--primary-color-hover);
}

.genre-grid,
.country-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-8);
}

.genre-item,
.country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-8);
    background: var(--background-light);
    /* border-radius: 4px; */
}

.genre-icons,
.country-icons {
    display: flex;
    gap: var(--spacing-8);
}

.genre-icon,
.country-icon {
    background: none;
    border: none;
    padding: var(--spacing-4);
    cursor: pointer;
    color: var(--text-sub);
}

.genre-icon.active,
.country-icon.active {
    opacity: 1;
    color: var(--primary-color);
}

.genre-icon.stop.active,
.country-icon.stop.active {
    color: var(--error-color);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-text {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 200px;
}

.loading-spinner i {
    font-size: 3rem;
    color: #3498db;
}

/* Personen-Details */

.biography-section,
.credits-container {
    margin-bottom: 40px;
    padding: var(--spacing-24);
    /* background-color: var(--background-light); */
}

.biography-content {
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.biography-content.collapsed {
    max-height: 150px;
}

.biography-content:not(.collapsed) {
    max-height: 1000px;
}

.toggle-biography {
    margin-top: 15px;
    display: block;
    width: 100%;
}

.toggle-biography .show-less {
    display: none;
}

.toggle-biography.active .show-more {
    display: none;
}

.toggle-biography.active .show-less {
    display: inline;
}

.credits-section {
    margin-bottom: var(--spacing-32);
}

.count-badge {
    background: var(--background-light);
    color: var(--text);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

@media screen and (max-width: 768px) {
    /* .credits-container, .biography-section{
        background-color: var(--background-dark)
    }   */
}

/* Movie-Details */

/* Movie Details Layout */
.movie-details,
.person-details {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    /* background-color: var(--background-dark); */
}

/* Hero Section mit Backdrop */
.movie-header,
.person-header {
    position: relative;
    margin-bottom: var(--spacing-24);
    display: flex;
    align-items: flex-end;
}

.movie-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 1) 100%);
}

/* Hauptinfo-Container */
.movie-info,
.person-info {
    position: relative;
    display: flex;
    gap: var(--spacing-24);
    padding: var(--spacing-24);
    width: 100%;
    color: var(--white);
}

/* Filmposter */
.movie-poster,
.person-profile {
    width: 200px;
    /* border-radius: var(--radius-md); */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Metadaten-Container */
.movie-meta,
.person-meta {
    flex: 1;
}

/* Filmtitel */
.movie-meta h1,
.person-meta h1 {
    font-size: 32px;
    line-height: 40px;
    margin-bottom: var(--spacing-24);
    color: var(--white);
}

/* Originaltitel */
.original-title {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 16px;
}

/* Meta-Informationen */
.meta-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
    font-size: .875rem;
    margin-top: var(--spacing-4);
}

.meta-info .rating-circle {
    position: unset;
}

.rating-circle .ph-prohibit{
    font-size: 24px;
}

.trailer-section {
    margin: 40px 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fsk-badge {
    color: var(--white);
    display: inline-block;
}

/* Genre-Tags */
.genres {
    display: flex;
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-32);
    flex-wrap: wrap;
}

.genre-tag {
    padding: var(--spacing-8) var(--spacing-12);
    background: var(--grey-300);
    color: var(--grey-900);
    border-radius: 32px;
    font-size: 12px;
    word-break: keep-all;
    white-space: nowrap;
}

/* Bewertungs-Bereich */
.rating-section {
    margin: 24px 0;
}

/* Tagline */
.tagline {
    color: var(--grey-300);
    margin-bottom: var(--spacing-16);
}

.action-buttons {
    display: flex;
    gap: var(--spacing-8);
    align-items: center;
    margin-bottom: var(--spacing-8);
}

.action-buttons .media-card-menu {
    position: relative;
    top: unset;
    right: unset;
}

.action-buttons .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px !important;
    gap: 8px;
    border-radius: 0;
    border: 1px solid var(--text);
    background-color: transparent;
    color: var(--text);
}

.action-buttons .menu-toggle:hover {
    border: 1px solid var(--text);
    background-color: var(--text);
    color: var(--background-dark);
}

@media screen and (max-width: 768px) {

    .action-buttons .menu-toggle {
        min-width: 40px;
        display: flex;
        justify-content: center;
    }
}

/* Hauptinhalt */
.movie-content {
    /* padding: var(--spacing-24); */
    /* background: var(--background-dark); */
    /* border-radius: var(--radius-lg); */
    margin-top: var(--spacing-24);
}

/* Sektionen */
.overview,
.cast,
.providers,
.friend-section,
.directors,
.seasons,
.available-providers,
.trailer-section {
    background: var(--background-light);
    padding: var(--spacing-24);
    /* border-radius: var(--radius-md); */
    margin-bottom: var(--spacing-24);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.available-providers {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-16);
}

.available-providers-inner {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-16);
}

.available-providers-inner p {
    min-width: 60px;
    margin: 0;    
}

@media screen and (max-width: 768px) {

    h2 {
        margin-top: 0;
    }

    .overview,
    .cast,
    .providers,
    .friend-section,
    .directors,
    .seasons,
    .available-providers,
    .trailer-section
     {
        background: transparent;
        padding: var(--spacing-16);
        margin-bottom: var(--spacing-16);
    }

    .movie-content,
    .movie-details {
        padding: 0;
    }

}

/* Streaming-Anbieter */
/* .providers {
    margin-top: 24px;
} */

.streaming-provider-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-12);
}

.streaming-provider-list img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
}

/* Cast-Sektion */
.cast-section {
    margin-top: 32px;
}

.cast-list,
.directors-list,
.friends-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-16);
    margin-top: var(--spacing-16);
}

.streaming-provider-list {
    margin-top: var(--spacing-16);
}

@media screen and (max-width: 768px) {

    .cast-list,
    .directors-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

}

.cast-member {
    overflow: hidden;
    transition: transform 0.2s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-8)
}

.load-more-button {
    display: block;
    margin: var(--spacing-24) auto;
    padding: var(--spacing-12) var(--spacing-24);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* .cast-member:hover {
    transform: translateY(-4px);
} */

.cast-member img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
}

.cast-info {
    text-align: center;
}

.cast-info h3,
.friend-item h3 {
    margin: 0;
    font-size: 1rem;
    text-align: center;
    font-weight: 300;
}

.cast-info p,
.friend-item p {
    color: var(--grey-600);
    font-size: 0.9rem;
    margin: 0;
}

.friends-list {
    display: grid;
    gap: var(--spacing-24);
}

.friend-item, .friend-item a {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: var(--spacing-8);
}

.friend-item .friend-info{
    display: flex;
    flex-direction: column;
    align-items: start;
    text-align: center;
    gap: 0;
}

.friend-item-inner{
    display: flex;
    position: relative;
}

.friend-status-line {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
}

.friend-interaction {
    display: flex;
    flex-direction: column;
    text-align: start;
}

/* .friend-item-inner .friend-rating {
    position: absolute;
    top: 40px;
    right: -2px;
} */

.friend-item .friend-info .friend-interest, .friend-item .friend-info .friend-abandoned{
    font-size: 12px;
    color: var(--text-sub);
}

.friend-info .friend-rating{
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--deeper-blue);
    background-color: var(--champagne);
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.friend-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-id {
    color: #666;
    font-size: 0.9em;
}

.friend-name {
    color: var(--text);
}

.friend-rating {
    font-size: 14px;
    color: var(--text-sub);
}

.no-friends {
    color: #999;
    text-align: center;
    padding: 20px;
}

/* 
.friend-info {
    display: flex;
    align-items: center;
} */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 1fr; /* WICHTIG: Gleichmäßige Zeilenhöhe */
    gap: 16px;
    margin-top: 16px;
}

.media-grid .media-card, .swiper-slide .media-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Erzwingt volle Containergröße */  
}

.empty-list-message {
    text-align: center;
    color: #888;
    grid-column: 1 / -1;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .movie-header {
        background-repeat: no-repeat;
        background-size: cover;
        background-position: top center;
        height: calc(100vh - 100px);
        width: 100vw;
        /* aspect-ratio: 2/3; */
    }

    /* Gradient Overlay für bessere Lesbarkeit */
    .movie-header::before {
        content: '';
        position: absolute;
        height: calc(100vh - 100px);
        width: 100vw;
        /* aspect-ratio: 2/3; */
        top: 0;
        left: 0;
        right: 0;
        /* bottom: 0; */
        background: linear-gradient(180deg,rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.7) 70%, rgba(0, 0, 0, 1) 100%);
    }

    .movie-info {
        gap: var(--spacing-12);
        padding: var(--spacing-16);
    }

    .movie-info img {
        display: none;
    }

    .person-info img {
        width: 120px;
    }

    .movie-meta h1 {
        font-size: 32px;
        margin-bottom: var(--spacing-16);
    }

    .rating-container {
        margin-bottom: var(--spacing-8)
    }

}

.load-controls {
    margin-top: var(--spacing-32);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
}

.custom-sort-controls {
    /* margin-bottom: 16px; */
    position: relative;
}

.custom-select,
.custom-list-select {
    position: relative;
    width: 180px;
    cursor: pointer;
}

.selected-option {
    padding: 10px;
    border: 1px solid var(--text-sub);
    /* border-radius: 4px; */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: white;
    /* border-radius: 4px; */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.option {
    padding: 10px;
    cursor: pointer;
}

.option:hover {
    background-color: #f5f5f5;
}

.custom-select.active .options,
.custom-list-select.active .options {
    display: block;
}

.genre-icon {
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    transition: all 0.3s ease;
}

.genre-icon.active {
    opacity: 1;
    transform: scale(1.2);
}

.genre-icon.check.active {
    color: var(--primary-color);
}

.genre-icon.stop.active {
    color: var(--error-color);
}

.genre-icons {
    display: flex;
    gap: 8px;
}

/* Staffel-Liste */
/* .seasons-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.season-card {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

.season-info h4 {
    margin: 8px 0 0 0;
    text-align: start;
}

.season-info p {
    font-size: 0.9rem;
    text-align: start;
    color: var(--text-sub);
    margin: 0;
}

.department-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    border-radius: 16px;
    margin-top: 16px;
} */

/* =========== */
/* STAFFEL-SEKTION - Überarbeitet für TV-Details */
/* =========== */

/* Grid für Staffeln - ersetzt .seasons-list */
.seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-24);
    margin-top: var(--spacing-16);
}

@media screen and (max-width: 768px) {
    .seasons-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-16);
    }
}

@media screen and (max-width: 480px) {
    .seasons-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-12);
    }
}

/* Staffel-Karte - komplett neue Struktur */
.season-card {
    background: var(--background-light);
    border-radius: var(--spacing-8);
    padding: var(--spacing-16);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* .season-card:hover {
    background: var(--background-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
} */

/* Layout: Poster links, Info rechts */
.season-layout {
    display: flex;
    gap: var(--spacing-16);
    align-items: flex-start;
    height: 100%;
}

/* Poster-Container Links */
.season-poster {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 150px; /* 2:3 Aspect Ratio */
    border-radius: var(--spacing-8);
    overflow: hidden;
    background: var(--background);
}

.season-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--spacing-8);
}

.season-poster .placeholder-poster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--background);
    color: var(--text-sub);
    border-radius: var(--spacing-8);
}

.season-poster .placeholder-poster i {
    font-size: 2rem;
}

.season-card .season-layout {
    align-items: stretch;              /* Kinder gleich hoch strecken */
  }
  
  .season-card .season-info {
    height: auto;                      /* Prozenthöhe vermeiden */
    align-self: stretch;               /* Sicherheitshalber explizit strecken */
    min-height: 0;                     /* Flex-Schrumpf-Kante */
  }
  

/* TMDB-Wertung auf dem Poster - nutzt bestehende .rating-circle.tmdb Klassen */
.season-info .rating-circle.tmdb {
    position: unset;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grey-750);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Staffel-Informationen Rechts */
.season-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Staffel-Titel */
.season-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
    line-height: 1.3;
}

/* Folgen-Anzahl */
.season-episodes {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-sub);
}

/* Ausstrahlungsdatum */
.season-air-date {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-sub);
}

/* Leerer Zustand */
.no-seasons {
    text-align: center;
    color: var(--text-sub);
    font-style: italic;
    padding: var(--spacing-24);
    margin: var(--spacing-16) 0;
}

/* Mobile Anpassungen */
@media screen and (max-width: 768px) {
    .season-layout {
        gap: var(--spacing-12);
    }
    
    .season-poster {
        width: 80px;
        height: 120px;
    }
    
    .season-poster .rating-circle.tmdb {
        width: 32px;
        height: 32px;
        bottom: var(--spacing-4);
        right: var(--spacing-4);
        font-size: 12px;
    }
    
    .season-title {
        font-size: 1.1rem;
    }
    
    .season-episodes {
        font-size: 0.85rem;
    }
    
    .season-air-date {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 480px) {
    .season-card {
        padding: var(--spacing-12);
    }
    
    .season-layout {
        gap: var(--spacing-8);
    }
    
    .season-poster {
        width: 70px;
        height: 105px;
    }
    
    .season-poster .rating-circle.tmdb {
        width: 28px;
        height: 28px;
        font-size: 11px;
        bottom: var(--spacing-4);
        right: var(--spacing-4);
    }
    
    .season-title {
        font-size: 1rem;
    }
}

/* Filmografie */
.filmography-list {
    margin-top: 24px;
}

.filmography-item {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.filmography-item:last-child {
    border-bottom: none;
}

.filmography-item .year {
    color: var(--text-secondary);
}

.filmography-item .character {
    color: var(--text-secondary);
    font-style: italic;
}

/* Galerie */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.image-grid img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 2/3;
    object-fit: cover;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .filmography-item {
        grid-template-columns: 60px 1fr;
        gap: 12px;
    }

    .filmography-item .character {
        grid-column: 1 / -1;
    }
}

.rating-container {
    display: flex;
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-8);
}

.rating-container .rating-circle {
    position: unset;
}

.vote-count {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.rating-circle {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 2;
}

.rating-circle.tmdb {
    bottom: 8px;
    right: 8px;
    background: var(--grey-750);
    color: var(--white);
}

.rating-circle.user {
    bottom: 8px;
    right: 8px;
}

.rating-circle.friend {
    bottom: 8px;
    right: 8px;
}

/* .friend-ratings .rating-circle.user {
    right: 52px!important;
} */

/* Suche */
.search-container {
    padding: 1rem;
    /* max-width: 1200px;
    width: 100%; */
    position: relative;
}

.search-input-group {
    position: relative;
    margin: 1rem 0;
    width: 100%;
}

.search-input-group input {
    width: 100%;
    padding: 1rem;
    border-radius: 2rem;
    border: 2px solid var(--primary-500);
    font-size: 1rem;
    padding-right: 3rem;
    box-sizing: border-box;
    background: var(--background-light);
    color: var(--text);
}

.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-light);
    margin-top: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 600px;
    overflow-y: auto;
}

.search-suggestion-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    align-items: flex-start;
}

.suggestion-details {
    flex: 1;
    min-width: 0;
}

.search-suggestion-item:hover {
    background: var(--background-dark);
}

.search-suggestion-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.no-results-tab{
    text-align: center;
    margin-top: 40px;
}

.person-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    display: block;
    max-width: unset;
}

.person-card {
    text-align: center;
    padding: 1rem;
    background: var(--background-light);
    /* border-radius: 8px; */
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
}

.person-search-info h4 {
    text-align: center;
}

/* Alte CSS-Regeln entfernen */
.department,
.known-for {
    display: none;
}

/* Styling für den Löschen-Button im Suchfeld */
.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.clear-search-btn {
    position: absolute;
    right: 48px !important; /* Abstand zum Such-Button anpassen */
    background: none;
    border: none;
    cursor: pointer;
    display: none; /* Standardmäßig ausgeblendet */
    color: var(--text-sub);
    padding: 5px;
    font-size: 12px !important;
}

.clear-search-btn:hover {
    color: var(--text-sub);
    opacity: .8;
}

/* X-Button nur anzeigen, wenn Text im Suchfeld steht */
#search-input:not(:placeholder-shown) ~ .clear-search-btn {
    display: block;
}

.suggestion-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--grey-600);
    flex-wrap: wrap;
}

.suggestion-meta .genres {
    color: var(--text-sub);
    margin-bottom: 0;
}

.suggestion-type {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--grey-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-history {
    padding-top: var(--spacing-16);
    /* border-radius: 0.5rem; */
    margin-top: 1rem;
}

.search-input-group button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-sub);
}

.search-type-filter {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.search-type-filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 2rem;
}


.search-result-card {
    position: relative;
    transition: transform 0.2s;
}

/* .search-result-card:hover {
    transform: translateY(-5px);
} */

.search-result-card img {
    border-radius: 0.5rem;
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.search-history ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.search-history li {
    background: var(--background-light);
    border-radius: 0.5rem;
}

.search-history li a {
    display: block;
    padding: var(--spacing-8) var(--spacing-24);
    transition: background 0.2s;
    color: var(--text);
    width: 100%;
}

.search-history li:hover {
    background: var(--background-hover);
}

.search-history ul li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.clear-history-btn {
    font-size: 16px;
    background: none;
    border: none;
    color: var(--text-sub);
    padding: var(--spacing-8) var(--spacing-24);
    margin-left: 10px;
    cursor: pointer;
}

.clear-history-btn:hover {
    color: var(--text);
}

.inline-form {
    display: inline-block;
    margin: 0;
}


/* Friends */
.friend-search {
    margin-bottom: 20px;
}

.search-results {
    margin-top: 16px;
    margin-bottom: 24px;
}

@media screen and (max-width: 768px) {
    .friends-container .friend-section{
        margin-left: -24px;
        margin-right: -24px;
    }
}
.user-result {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.friend-request {
    padding: var(--spacing-8) 0;
    margin: 5px 0;
    /* background: #fff; */
    /* border-radius: 4px; */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#pendingRequestsSection {
    display: none; /* Standardmäßig ausgeblendet */
}

.friends-list .friend {
    padding: 10px;
    margin: 5px 0;
    background: #fff;
    /* border-radius: 4px; */
}

.tab-container {
    max-width: 1200px;
}

.tab-navigation {
    display: flex;
    border-bottom: 2px solid var(--background);
    margin-bottom: 20px;
}

.tab-button {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    color: var(--text);
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.tab-button.disabled {
    color: var(--text-inactive);
    cursor: not-allowed;
}

/* .tab-button.disabled:hover {
    background-color: var(--grey-200);
} */

/* .tab-button .ph-fill ph-warning {
    color: var(--warning-color);
    margin-left: 8px;
    font-size: 0.8em;
} */

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.header-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.providers-bar {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.provider-img {
    height: 45px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.provider-img.inactive {
    opacity: 0.5;
    filter: grayscale(100%);
}

.custom-sort-controls {
    position: relative;
    /* width: 250px; */
}

.custom-select,
.custom-list-select {
    border: 1px solid var(--background-light);
    /* border-radius: 8px; */
    background: var(--background);
    cursor: pointer;
    font-size: 16px;
}

.selected-option {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.options {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--background);
    border: 1px solid var(--background-light);
    /* border-radius: 8px; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.option:hover {
    background: var(--background-dark);
}

.custom-select.active .options,
.custom-list-select.active .options {
    display: block;
}

.list-selection-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background);
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.list-selection-overlay .list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Lists.php */

.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.list-card {
    background: var(--background-light);
    border-radius: var(--spacing-8);
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.list-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
@media (max-width: 768px) {
    .list-details-topbar-desktop{
        display: none;
    }    
}

.list-icon {
    font-size: 24px;
    margin-right: 12px;
}

.list-title-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
}

.list-title {
    margin: 0;
    font-size: 1.2rem;
    color: #ffffff;
}

.list-title-link {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.list-title-link:hover {
    color: var(--text-link-on-dark);
}

.context-menu {
    position: relative;
}

.context-menu-toggle {
    background: none;
    border: none;
    color: #999;
    padding: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.context-menu-toggle:hover {
    color: #ffffff;
}

.context-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--background);
    /* border-radius: 6px; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    z-index: 100;
    overflow: hidden;
}

.context-menu-item {
    padding: 0.75rem 1rem;
    color: #ddd;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.context-menu-item:hover {
    background: var(--background-hover);
}

.context-menu-item i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}



.item-count {
    color: #999;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.collaborators-wrapper {
    margin-top: 1.5rem;
}

.collaborators-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 8px;
    display: block;
}

.avatar-stack {
    display: flex;
    gap: 8px;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    font-size: 0.8rem;
}

.avatar-circle:first-child {
    margin-left: 0;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.more-count {
    background: #444;
    font-weight: bold;
}

.text-danger {
    color: #e74c3c;
}

.empty-collaborators {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

/* .new-list-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.new-list-button:hover {
    background: #2980b9;
}

.new-list-button i {
    margin-right: 8px;
} */

/* Friends Profile */

/* Freunde-Tab Styles */
.friends-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-24);
    padding: var(--spacing-16) 0;
}

/* Suchbereich */
.search-section {
    margin-bottom: var(--spacing-24);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--background-light);
    border-radius: 2rem;
    padding: var(--spacing-8) var(--spacing-12);
    margin-bottom: var(--spacing-16);
}

.search-icon {
    color: var(--text-sub);
    margin-right: var(--spacing-8);
}

.ph-magnifying-glass{
    cursor: pointer;
}

#friendSearchInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    padding: var(--spacing-8);
}

#friendSearchInput::placeholder {
    color: var(--text-sub);
}

.search-bar .ph-magnifying-glass {
    font-size: 20px;
}

.search-button {
    background-color: var(--primary-color);
    color: var(--text);
    border: none;
    /* border-radius: 6px; */
    padding: var(--spacing-8) var(--spacing-16);
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: var(--primary-color-hover);
}

/* Suchergebnisse */
.search-user-results {
    background-color: var(--background-dark);
    /* border-radius: 8px; */
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.search-user-results:not(:empty) {
    max-height: 100%;
    margin-top: var(--spacing-16);
    overflow-y: auto;
}

.user-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-12) var(--spacing-16);
    border-bottom: 1px solid var(--grey-700);
}

.user-result:last-child {
    border-bottom: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-12);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: transparent;
}

.username {
    color: var(--text);
}

.user-result button {
    background-color: var(--primary-color);
    color: var(--text-darker);
    border: none;
    /* border-radius: 6px; */
    padding: var(--spacing-8) var(--spacing-12);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-result button:hover {
    background-color: var(--primary-color-hover);
}

.profile-stats .stat-label {
    position: relative;
}

.user-result .pending {
    color: var(--warning-color);
    font-size: 14px;
}

.user-result .friend {
    color: var(--primary-color);
    font-size: 14px;
}

/* Freundesanfragen und Freundesliste */

.section-title {
    color: var(--text);
    /* font-size: 18px; */
    margin-bottom: var(--spacing-16);
    padding-bottom: var(--spacing-8);
    border-bottom: 1px solid var(--grey-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.friend-requests-container,
.friends-list-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-12);
}

.friend-request,
.profile-friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-8) 0;
    /* background-color: var(--background-light); */
    transition: transform 0.2s;
    flex-direction: row;
}
@media screen and (max-width: 768px) {

    .friends-list-container .profile-friend-item{
        padding: var(--spacing-16);
        border-radius: var(--spacing-8);
    }
}


.friend-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-12);
    flex: 1;
}

.friend-request button {
    background-color: var(--primary-color);
    color: var(--text-darker);
    border: none;
    /* border-radius: 6px; */
    padding: var(--spacing-8) var(--spacing-12);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.friend-request button:hover {
    background-color: var(--primary-color-hover);
}

/* Freundesliste */
/* .friend-item {
    position: relative;
} */

.friend-actions {
    display: flex;
    gap: var(--spacing-8);
}

.friend-actions button {
    background: none;
    border: none;
    color: var(--text-link-on-dark);
    cursor: pointer;
    transition: color 0.2s;
    padding: var(--spacing-8);
}

.friend-actions button:hover {
    opacity: .8;
}

.loading-indicator {
    display: flex;
    justify-content: center;
    padding: var(--spacing-16);
}

.spinner-small {
    width: 24px;
    height: 24px;
    border: 3px solid var(--grey-700);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Leere Zustände */
.empty-state {
    text-align: center;
    color: var(--grey-500);
    padding: var(--spacing-16);
}
 
/* Fehler-Toast */
/* .error-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--error-color);
    color: var(--white);
    padding: var(--spacing-12) var(--spacing-16);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
} */


/* List einladungen */

/* Einladungs-Styling */
.invitations-section {
    margin-top: 40px;
    padding: 20px;
    background: var(--background-light);
    /* border-radius: 12px; */
}

.invitations-grid {
    display: grid;
    gap: 15px;
    margin-top: 15px;
}

.invitation-card {
    background: var(--background);
    padding: 15px;
    /* border-radius: 8px; */
    border: 1px solid var(--grey-700);
    transition: all 0.3s ease;
}

.invitation-header h3 {
    margin: 0 0 5px 0;
    color: var(--headline);
}

.invitation-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.accept-button,
.decline-button {
    padding: 8px 15px;
    border: none;
    /* border-radius: 6px; */
    cursor: pointer;
}

.accept-button {
    background: var(--primary-color);
    color: var(--black);
}

.decline-button {
    background: var(--error-color);
    color: white;
}

.invitation-meta {
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--grey-400);
}

.list-card.pending {
    opacity: 0.6;
    border: 2px dashed var(--grey-500);
    position: relative;
}

.list-card.pending::after {
    content: "Ausstehende Einladung";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--warning-color);
    font-weight: bold;
}

.list-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
}

.list-card.newly-added {
    animation: cardAppear 0.4s ease-out;
    transform-origin: top;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* //Import */

.container-import{
    display: flex;
    flex-direction: column;
    gap: var(--spacing-24);
    align-items: start;
}

.select-import{
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
}

.select-import label{
    font-size: .875rem;
    color: var(--text-sub);
}

/* div#loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center
}

#loading-overlay div{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
} */

.info-box{
    padding: var(--spacing-24);
    border-radius: var(--spacing-8);
    border: 1px solid var(--grey-600);
    background-color: var(--background-light);
    margin-top: var(--spacing-32);
    color: var(--text-sub);
}

.info-box p{
    margin: 0;
}

.info-box i{
    margin-right: var(--spacing-8);
}

.info-box a{
    margin-top: var(--spacing-16);
}

.file-upload {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.file-upload button {
    width: fit-content;
}

.card-title {
    padding-bottom: var(--spacing-8);
}

.card-body {
    margin-top: var(--spacing-24);
}

.list-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: rgba(0,0,0,0.5); */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.list-selection-modal .modal-content {
    background: var(--background);
    padding: var(--spacing-24);
    width: 600px;
    max-width: 90%;
}

.list-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-8);
}

.list-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-12) var(--spacing-16);
    margin: var(--spaceing-8) 0;
    background: var(--background);
    cursor: pointer;
    transition: background 0.3s;
    color: var(--text);
    border-radius: var(--spacing-4);
}

.list-option i.ph.ph-check {
    margin-right: 2px;
    font-size: 16px;
}

.list-selection-modal .list-option.active {
    background: var(--background-active);
}

.list-selection-modal .list-option:hover {
    background: var(--background-hover);
}

.modal-footer .create-new-list {
    margin-top: var(--spacing-16);
    padding-top: var(--spacing-16);
    border-top: 1px solid var(--background-hover);
    display: flex;
    justify-content: center;
    align-items: center;
}

.list-selection-modal .list-option {
    position: relative;
    background-color: var(--background-light);
    transition: all 0.2s;
}

.list-selection-modal .ph-plus{
    position: relative;
}

.list-selection-modal .ph-plus, .list-selection-modal .ph-check {
    color: var(--text-sub);
}

.list-selection-modal .has-item {
    background: #1a2a1a !important;
}

.list-selection-modal .has-item {
    opacity: 0.7;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-16);
    position: relative;
}

.close-modal {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #fff;
}

.close-modal i {
    font-size: 1.2em;
}

.modal-body {
    overflow-y: auto;
}

.modal-body img{
    max-width: 50vw;
    max-height: 50vh;
}

.list-selection-modal {
    /* Sicherstellen dass es über allem liegt */
    z-index: 9999; 
}

.new-list-button-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333;
}


/* List-Details */
.custom-select {
    position: relative;
    width: 208px;
    cursor: pointer;
    background: var(--background);
    border-radius: 4px;
    z-index: 1000;
}

.selected-option {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.options {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--background);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid #3a3a3a;
}

.custom-select.active .options {
    display: block !important;
}

.option {
    padding: 12px 15px;
    color: #fff;
    transition: background 0.2s;
}

.option:hover {
    background: #007bff;
}

.ph-caret-down {
    /* margin-left: 10px; */
    transition: transform 0.2s;
}

.custom-select.active .ph-caret-down {
    transform: rotate(180deg);
}

.sort-right-align{
    display: flex;
    justify-content: flex-end;
}


/* Settings */
/* settings.css */
/* .settings-section {
    background: var(--background-color);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
} */

.settings-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.settings-info img{
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-settings {
    display: none;
}

/* .settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
} */

.settings-modal-content {
    background: var(--background-dark);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

#message-container {
    margin: 1rem 0;
}

.settings-success-message {
    color: green;
    padding: 1rem;
    background: #e8f5e9;
}

.settings-error-message {
    color: red;
    padding: 1rem;
    background: #ffebee;
}

/* Home */

/* .week-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.pagination-button {
    padding: 8px 15px;
    background-color: var(--primary);
    color: var(--text-light);
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination-button:hover {
    background-color: var(--primary-dark);
}

.pagination-button.disabled {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.week-date-range {
    color: var(--text);
}
.page-navigation {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.nav-button {
    padding: 8px 15px;
    background: var(--primary);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-button:hover {
    background: var(--primary-dark);
}

.current-page {
    color: var(--text);
} */

.week-info {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9em;
}

.date-range {
    display: block;
    color: var(--text);
    margin-bottom: 5px;
}

.no-results {
    text-align: center;
    color: #6c757d;
    padding: 40px 0;
    font-size: 1.1em;
}


/* Profilbild */

.image-editor {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    flex-direction: column;
}

.editor-container {
    width: 100%;
    height: 40vh;
    /* background: var(--background-light); */
    margin-bottom: 1rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.editor-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

#imagePreview {
    max-width: 100%;
    max-height: 100%;
}

.cropper-view-box {
    border-radius: 50%;
}

.cropper-modal {
    background: rgba(0,0,0,0.7);
}

.danger-zone{
    display: flex;
    align-items: center;
}


.no-results-message {
    margin-top: var(--spacing-40);
    display: flex;
    justify-content: center;
}

/* footer */
html {
    height: 100%;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    /* display: flex;
    flex-direction: column; */
    /* position: relative; */
    margin: 0;
    /* padding-bottom: 60px;  */
}

.container {
    min-height: calc(100vh - 180px); /* Höhe des Footers abziehen */
}

.site-footer {
    /* position: absolute; */
    bottom: 0;
    width: 100%;
    height: 70px;
    /* background-color: #1a1a1a; */
    /* border-top: 1px solid #333333; */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    font-size: 0.875em;
    letter-spacing: .5px;
}

body.home .footer-content {
    padding: 0 24px 52px 24px;
}

@media screen and (max-width: 768px) {
    body.home .footer-content {
        padding: 0 24px 150px 24px;
    }
    
}

@media screen and (max-width: 640px) {
    body.home .footer-content {
        padding: 0 24px 230px 24px;
    }
    
}

.footer-right {
    color: var(--text-sub);
    display: flex;
    gap: 24px;
}

a.footer-link {
    color: var(--text-link-on-dark);
    border-bottom: 1px solid #DEC59D66;
    transition: color 0.3s ease;
    align-self: center;
}

a.footer-link:hover {
    opacity: 0.8;
}

/* .branding {
    letter-spacing: 0.5px;
} */

.ph-heart{
    padding: 0 var(--spacing-4) 0 2px;
}

@media (max-width: 640px) {
    body {
        padding-bottom: 208px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 4px;
        padding: 24px;
    }

    .site-footer {
        height: 130px;
    }    

    .footer-left {
        padding-bottom: 16px;
    }

    .footer-right {
        flex-direction: column;
        justify-content: center;
        gap: 16px;
        padding-bottom: 16px;
    }
}

.stream-section .section-header h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.section-header h2 {
    display: flex;
    align-items: center;
}

.refresh-icon {
    font-size: 0.75em;
    cursor: pointer;
    color: var(--text);
    transition: all 0.3s ease;
    /* padding: 8px;
    border-radius: 50%;
    background: transparent; */
}

.refresh-icon:hover {
    transform: rotate(180deg);
}

.refresh-icon.loading {
    animation: spin 1s linear infinite;
    color: var(--text);
    pointer-events: none;
}

.refresh-stream-btn, .refresh-upcoming-btn{
    white-space: nowrap;
    padding: 0 !important;
    border: none;
    background: transparent;
    color: var(--text-link-on-dark);
    font-size: 16px;
    line-height: 25.5px;
    cursor: pointer;
}

.view-all{
    color: var(--text-link-on-dark);
}

a:visited.view-all{
    color: var(--text-link-on-dark);
}

@media screen and (max-width: 413px) {
    .section-title.section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading State für das Grid */
.stream-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}


/* SUCHE HOME  */

/* Home-Suche spezifische Styles */
.home-search-section {
    margin: var(--spacing-32) 0;
    margin-bottom: 64px;
}

.home-search-section .search-container {
    max-width: 100%;
    padding: 0;
    position: relative;
}

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

.home-search-section .search-input-group input {
    width: 100%;
    padding: var(--spacing-16) var(--spacing-56) var(--spacing-16) var(--spacing-24);
    border-radius: 2rem;
    border: 2px solid var(--background-light);
    font-size: 1rem;
    box-sizing: border-box;
    background: var(--background-light);
    color: var(--text);
    transition: border-color 0.3s ease;
    /* border: 1px solid var(--primary-color); */
}

.home-search-section .search-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-input-group input::placeholder {
    color: var(--text-sub);
}

.home-search-section .search-submit-btn {
    position: absolute;
    right: var(--spacing-8);
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

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

.home-search-section .clear-search-btn:hover {
    color: var(--text);
    opacity: 0.8;
}

/* Suggestions für Home-Suche */
.home-search-section .search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + var(--spacing-8));
    left: 0;
    right: 0;
    background: var(--background-light);
    border-radius: var(--spacing-12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.home-search-section .search-suggestion-item {
    display: flex;
    gap: var(--spacing-16);
    padding: var(--spacing-16);
    align-items: flex-start;
    cursor: pointer;
    border-bottom: 1px solid var(--background);
    text-decoration: none;
    color: var(--text);
}

.home-search-section .search-suggestion-item:last-child {
    border-bottom: none;
}

.home-search-section .search-suggestion-item:hover {
    background: var(--background-hover);
}

.home-search-section .search-suggestion-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.home-search-section .suggestion-details {
    flex: 1;
    min-width: 0;
}

.home-search-section .suggestion-title {
    font-weight: 700;
    margin-bottom: var(--spacing-4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-search-section .suggestion-meta {
    display: flex;
    gap: var(--spacing-8);
    font-size: 0.875rem;
    color: var(--text-sub);
    flex-wrap: wrap;
}

.home-search-section .suggestion-meta .genres {
    color: var(--text-sub);
    margin-bottom: 0;
}

.home-search-section .suggestion-type {
    margin-top: var(--spacing-8);
    font-size: 0.75rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media screen and (max-width: 768px) {
    .home-search-section {
        margin: var(--spacing-24) 0;
        margin-bottom: var(--spacing-48);
    }
    
    .home-search-section .search-input-group input {
        font-size: 1rem;
        padding: var(--spacing-12) var(--spacing-56) var(--spacing-12) var(--spacing-16);
    }
}


/* Sharing */

/* Sharing Modal Styles */
.wtchlst-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.share-modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: shareModalSlideIn 0.3s ease-out;
}

@keyframes shareModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.share-modal-content .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--grey-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-content .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--grey-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-modal-content .modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--grey-600);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.share-modal-content .modal-close:hover {
    background: var(--grey-100);
    color: var(--grey-900);
}

.share-modal-content .modal-body {
    padding: 1.5rem;
}

.share-preview {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--grey-50);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--grey-200);
}

.share-preview-image {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.share-preview-text {
    flex: 1;
    min-width: 0;
}

.share-preview-text h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--grey-900);
    font-weight: 700;
    line-height: 1.3;
}

.share-url {
    background: var(--grey-200);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    color: var(--grey-700);
    margin: 0;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    border: 2px solid var(--grey-200);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--grey-700);
    min-height: 80px;
    gap: 0.5rem;
}

.share-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.share-option i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.share-option span {
    font-size: 0.875rem;
    text-align: center;
}

/* Plattform-spezifische Farben */
.share-option.whatsapp {
    border-color: #25D366;
    color: #25D366;
}

.share-option.whatsapp:hover {
    background: #25D366;
    color: white;
}

.share-option.telegram {
    border-color: #0088CC;
    color: #0088CC;
}

.share-option.telegram:hover {
    background: #0088CC;
    color: white;
}

.share-option.facebook {
    border-color: #1877F2;
    color: #1877F2;
}

.share-option.facebook:hover {
    background: #1877F2;
    color: white;
}

.share-option.twitter {
    border-color: #1DA1F2;
    color: #1DA1F2;
}

.share-option.twitter:hover {
    background: #1DA1F2;
    color: white;
}

.share-option.email {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.share-option.email:hover {
    background: var(--secondary-color);
    color: white;
}

.share-option.copy {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.share-option.copy:hover {
    background: var(--primary-color);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .wtchlst-share-modal {
        padding: 1rem;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .share-preview-image {
        align-self: center;
    }
}

/* Erweiterte Share Modal Styles */
.share-preview-message {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: var(--grey-50);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.share-preview-message p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

.share-preview-message strong {
    color: var(--grey-700);
    font-weight: 700;
}

.personalized-text {
    color: var(--primary-color) !important;
    font-weight: 500 !important;
    font-style: italic;
}

.share-option.copy {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.share-option.copy:hover {
    background: var(--secondary-color);
    color: white;
}


/* =========== */
/* SERIES TRACKING PANEL - FINALER FIX OHNE SPRINGEN */
/* =========== */
#seriesTrackingTab {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(calc(100% - 53px));
    transition: transform 0.35s ease-in-out;
    isolation: isolate;
    backface-visibility: hidden;
    color: var(--text);
    z-index: 50;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 28px rgba(0,0,0,0.45);
    overflow: hidden;
    pointer-events: auto;
    visibility: visible;
  }
  
/* Expanded State - Panel vollständig sichtbar */
#seriesTrackingTab.expanded {
    bottom: 0;
    max-height: calc(100vh - 70px);
    transform: translateY(0);
  }
  
/* Kollabiertes Panel - für Screen Reader verstecken */
#seriesTrackingTab:not(.expanded) {
    visibility: hidden;
}
/* Header konstante Größe */
#seriesTrackingTab .series-tracking-header {
    visibility: visible !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 var(--spacing-24);
    background: rgba(0,0,0,0.66);
    border-bottom: 1px solid var(--grey-700);
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 9999;
    min-height: 53px;
    flex-shrink: 0;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    /* -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important; */
  }  

  #seriesTrackingTab .series-tracking-content {
    display: flex;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--spacing-16);
    min-height: 200px;
    flex-wrap: wrap;
    gap: var(--spacing-16);
    background: rgba(0,0,0,0.66);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }  
  
.series-tracking-header:focus-visible {
    border: none;
    outline: none;
}
.series-tracking-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}
.series-tracking-toggle {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-sub);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.series-tracking-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.series-tracking-content,
#seriesTrackingContent {
    display: flex;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--spacing-16);
    min-height: 200px;
    flex-wrap: wrap;
    gap: var(--spacing-16);
}
/* Mobile Anpassungen - KONSTANTE bottom-Werte */
@media (max-width: 768px) {
    #seriesTrackingTab {
        /* ✅ KONSTANTER bottom-Wert für Mobile - BLEIBT UNVERÄNDERT */
        bottom: 100px;  /* Über 70px Tabbar */
        max-height: calc(100vh - 200px);

        /* ✅ ANGEPASST: Panel startet unterhalb, aber relativ zu neuer Position */
        transform: translateY(calc(100% - 50px));
    }
    #seriesTrackingTab.expanded {
        /* ✅ GLEICHER bottom-Wert - keine Sprünge! */
        bottom: 100px;

        max-height: calc(100vh - 200px);
        transform: translateY(0);
    }
    .series-tracking-header {
        padding: 0 var(--spacing-16);
        min-height: 50px;  /* Mobile etwas kleiner */
    }
}
/* =========== */
/* ✅ NEUE SERIES CARD LAYOUT STRUKTUR */
/* =========== */
.series-tracking-card {
    background: var(--background);
    border-radius: var(--spacing-8);
    padding: var(--spacing-16);
    margin-bottom: var(--spacing-16);
    transition: all 0.3s ease;
    width: calc(50% - 40px);
}
.series-tracking-card:hover {
    background: var(--background-hover);
}
.series-tracking-card:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 768px) {
    .series-tracking-card {
        width: 100%;
    }
}

/* ✅ NEUES LAYOUT: Flexbox für Bild links, Info rechts */
.series-card-layout {
    display: flex;
    gap: var(--spacing-16);
    align-items: flex-start;
}
/* ✅ POSTER LINKS - größer, ohne abgerundete Ecken */
.series-poster {
    flex-shrink: 0;
    width: 80px;  /* Größer als vorher */
    height: 120px; /* 2:3 Verhältnis */
}
.series-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* ✅ OHNE abgerundete Ecken wie gewünscht */
    border-radius: 0;
    display: block;
}
.series-poster a {
    display: block;
    width: 100%;
    height: 100%;
}
.series-poster .placeholder-poster {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    color: var(--text-sub);
    width: 100%;
    height: 100%;
}
.series-poster .placeholder-poster i {
    font-size: 2rem;
}
/* ✅ INFO RECHTS - flexible Breite */
.series-info {
    flex: 1;
    min-width: 0; /* Wichtig für Overflow-Handling */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-8);
}
/* ✅ TITEL - kann umbrechen */
.series-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}
.series-title a {
    color: var(--text);
    text-decoration: none;
    word-wrap: break-word;
    hyphens: auto;
}
.series-title a:hover {
    color: var(--primary-color);
}
/* ✅ PROGRESS BAR - unter dem Titel */
.series-progress {
    width: 100%;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.5s ease;
}
/* ✅ EPISODE INFO - unter der Progress Bar */
.episode-info {
    font-size: 0.875rem;
    color: var(--text-sub);
}

.episode-wait-info {
    font-size: 0.75rem;
    color: #ffc107;
    font-weight: bold;
    margin-top: var(--spacing-4);

}
/* ✅ BUTTONS - horizontal aufgereiht unter Episode Info */
.series-actions {
    display: flex;
    gap: var(--spacing-8);
    flex-direction: row;
    margin-top: var(--spacing-4);
}
.btn-action {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--text);
    height: 38px;
    padding: var(--spacing-8) var(--spacing-12);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    min-width: 38px;
}
.btn-action:hover {
    background-color: var(--white);
    color: var(--black);
    border: 1px solid var(--white);
}

/* Loading States für besseres UX */
.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.ph-circle-notch {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* Smooth Transitions für alle Änderungen */
.series-tracking-card {
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.2s ease;
}
.progress-fill {
    transition: width 0.5s ease;
}
.series-actions {
    transition: all 0.3s ease;
}

.btn-action.btn-season-watched.btn-unavailable {
    display: none;
}

.btn-action.btn-season-watched.btn-unavailable:hover {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Tooltip für nicht verfügbare Staffeln */
.btn-action.btn-season-watched[data-season-status="unavailable"]::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    margin-bottom: 5px;
}

.btn-action.btn-season-watched[data-season-status="unavailable"]:hover::after {
    opacity: 1;
}

.series-tracking-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
}

.series-actions .media-card-menu {
    position: relative;
    top: 0;
    right: 0;
  }
  
  /* Drei-Punkte-Button übernimmt .btn-action-Stil, aber kompakt */
  .series-actions .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px !important;
    gap: var(--spacing-8);
    border-radius: 0;
    border: 1px solid var(--text);
    background-color: transparent;
    color: var(--text);
  }
  .series-actions .menu-toggle:hover {
    border: 1px solid var(--text);
    background-color: var(--text);
    color: var(--background-dark);
  }
  
  /* Dropdown selbst */
  .series-actions .media-card-menu .media-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: none;           /* wird via JS ein-/ausgeblendet */
    background: var(--background);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 220px;
    border: 1px solid var(--background-light);
    z-index: 1000;
    padding: 6px 0;
  }
  
  /* Menüeinträge */
  .series-actions .media-card-menu .menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
    padding: 10px 12px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
  }
  .series-actions .media-card-menu .menu-item i { width: 16px; text-align: center; }
  .series-actions .media-card-menu .menu-item:hover {
    background: var(--background-hover);
  }
  
  /* Sichtbarkeit wird per JS getoggelt */
  .media-menu.show { display: block; }
  
  /* Vorsorglich: Original-Globale Ausblendung im Kontext (Swiper/Stream) umgehen */
  .series-tracking-card .media-menu { display: none; }
  .series-tracking-card .media-menu.show { display: block; }