/* /styles/main.css (Corrected for baseline alignment & group header year alignment & accordion arrow) */

/* --- Base Styles & Layout --- */
body {
    font-family: sans-serif;
    background-color: #d5e5f4; /* Original Hintergrund */
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: top center;
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Background Effects */
#page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    filter: blur(25px);
    transform: scale(1.1);
    /* background-image is set dynamically via inline style in header.php */
}

#page-lighten-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

#page-gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(213, 229, 244, 0.4) 0px, rgba(213, 229, 244, 0.7) 700px, #d5e5f4 800px); /* Original Gradient */
    background-repeat: no-repeat;
    background-position: top center;
    background-size: auto;
    pointer-events: none;
}

/* Centering Div (if still used from header/footer structure) */
/* Consider replacing <div align="center"> with CSS margin: auto on main containers */
/* .main-container { width: 1034px; margin: 0 auto; } */


/* --- Typography & Links --- */
h2, h3, h4, h3b, /* h3b seems custom, maybe use a class? */
.film-details-section strong, /* Keep for labels inside tables etc. */
.biography-section strong { /* Keep for labels inside tables etc. */
    font-family: 'Hammersmith One', sans-serif;
    margin: 5px 0;
    color: #105289; /* Original Blau */
}

h3b { /* Style for custom h3b tag/class */
    font-weight: normal;
}

/* Standard Links */
a {
    text-decoration: none;
    color: #105289;
}
a:hover {
    text-decoration: underline;
}

/* --- Header Elements --- */

/* Search Container & Form */
#search-container {
   width: 560px; /* Consider using max-width and padding for responsiveness */
   height: 130px;
   margin-left: auto;
   margin-right: 0;
   padding: 20px;
   background-color: rgba(255, 255, 255, 0.6); /* Standard Transparenz */
   border-radius: 4px;
   box-sizing: border-box;
   display: flex;
   flex-direction: column;
   justify-content: center;
}

#frmSearch {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#main-search-input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #a9c2d9;
    border-radius: 4px;
    font-size: 1.1em;
    box-sizing: border-box;
}

#frmSearch input[type="reset"],
#frmSearch input[type="submit"] {
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #a9c2d9;
    background-color: #e0eaf3;
    cursor: pointer;
    font-size: 1em;
    font-family: sans-serif;
    color: #105289;
}

 #frmSearch input[type="reset"]:hover,
 #frmSearch input[type="submit"]:hover {
    background-color: #d5e5f4;
    border-color: #7486a6;
 }

 #search-options-link {
    text-align: right;
    margin-top: 8px;
    font-size: 0.9em;
 }
 #search-options-link a { /* Inherits general link color */
    font-size: 0.9em; /* Already set on parent, maybe redundant */
 }


/* Autocomplete Dropdown (jQuery UI overrides) */
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000; /* Ensure it's above other elements */
}
.ui-autocomplete .ui-menu-item {
    padding: 0;
}
/* Use item.label directly in _renderItem now */
.ui-autocomplete .ui-menu-item a {
    display: block;
    padding: 5px 8px;
    text-decoration: none;
    cursor: pointer;
    color: #333 !important; /* Override default UI styles if needed */
}
.ui-autocomplete .ui-menu-item a:hover,
.ui-autocomplete .ui-menu-item.ui-state-focus a { /* Hover/focus state */
    background-color: #eaf2fa;
    color: #105289 !important;
    text-decoration: none;
}
.ui-autocomplete strong { /* Highlighted term */
    font-weight: bold;
    color: #105289;
}
/* Removed small and span rules as highlighting is now done on the full label */


/* A-Z Navigation Container */
#az-nav-login-container {
    background-color: rgba(255, 255, 255, 0.6); /* Standard Transparenz */
    border-radius: 4px;
    padding: 15px;
    box-sizing: border-box;
    /* Assuming width=1034 and align=center are handled by the table element itself */
    /* If replacing table, add: width: 1034px; margin: 0 auto; */
}

/* A-Z Navigation Links */
.az-nav h3 {
    margin-bottom: 5px;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.az-nav span { /* Label like "Actress:" */
    display: inline-block;
    font-weight: bold;
    color: #105289;
    margin-right: 3px;
    flex-shrink: 0;
}
.az-nav a { /* Individual letter links */
    display: inline-block;
    margin-right: 1px;
    padding: 1px;
    text-decoration: none;
    color: #105289;
    min-width: 1em;
    text-align: center;
    border-radius: 2px;
}
.az-nav a:hover {
    background-color: #d5e5f4;
    text-decoration: none;
}

/* Login/Logout/Signup Links (within header table) */
/* Styles are mostly handled by h2/h3 tags, consider using classes */
#az-nav-login-container h2 a,
#az-nav-login-container h3 a {
    /* Inherit color from general 'a' */
}
#az-nav-login-container h2 a[style*="color:#ff0000"], /* Target signup link */
#az-nav-login-container h3 a[style*="color:#ff0000"] {
    color: #ff0000 !important; /* Override if needed */
}

/* Header Links Row (inside h4/table) */
/* REMOVED incorrect generic h4 a rule */
/* If specific styling is needed for these links, target them more precisely */
/* e.g., #az-nav-login-container h4 a { font-size: 0.9em; font-weight: normal; } */


/* --- Content Area Styles --- */

/* Biography & Film Details Sections */
.film-details-section,
.biography-section {
    border: 1px solid #cddcec; /* Original Rand */
    margin-bottom: 15px;
    padding: 15px;
    width: 1034px; /* Consider max-width */
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    overflow: auto; /* Contains floats */
    text-align: left;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: rgba(255, 255, 255, 0.6); /* Standard Transparenz */
    border-radius: 4px;
    position: relative;
    z-index: 1; /* Above background overlays */
    font-family: sans-serif;
    font-size: inherit;
    line-height: inherit;
}

.film-details-section img.poster,
.biography-section img.portrait {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
    width: 300px;
    height: auto;
    border: 1px solid #ccc;
    background-color: #fff; /* Background for image area */
}

.film-details-section h2,
.biography-section h2 {
    margin-top: 0;
    margin-bottom: 10px;
    /* Font/color inherited from general h2 */
}

#film-content-right,
#bio-content-right {
    overflow: hidden; /* Contains content next to floated image */
}

#film-visible-info,
#bio-visible-info {
    padding-bottom: 5px;
}

/* --- NEUE REGELN für Label-Wert-Paare (Baseline Alignment) --- */
.label-value-pair {
    display: flex;
    align-items: baseline; /* Wichtig: An Text-Grundlinie ausrichten */
    margin-bottom: 6px; /* Etwas Abstand nach unten */
    line-height: 1.4; /* Verbessert Lesbarkeit bei Umbruch */
}

.label-value-pair strong { /* Das Label (z.B. Birth Name:) */
    width: 150px; /* Behalte feste Breite bei */
    margin-right: 8px; /* Abstand zwischen Label und Wert */
    flex-shrink: 0; /* Verhindert, dass das Label schrumpft */
    font-family: 'Hammersmith One', sans-serif; /* Sicherstellen, dass Label die richtige Schriftart hat */
    color: #105289;
    font-weight: normal; /* Hammersmith ist oft schon fett */
    padding-top: 0; /* Verhindert vertikalen Abstand für Baseline */
    padding-bottom: 0;
}

/* Der Wert (Text, Links, Liste) */
.label-value-pair > span.value,
.label-value-pair > ul { /* Bezieht sich auf die umschließenden Spans/Listen für Werte */
    flex-grow: 1; /* Nimmt restlichen Platz ein */
    word-break: break-word; /* Erlaubt Umbruch langer Wörter/URLs */
    font-family: sans-serif; /* Standard-Schriftart für Werte */
    font-size: 0.9em;
    line-height: 1.4;
    font-weight: 600; /* Behalte dies bei, wenn gewünscht */
    color: #333; /* Standard-Textfarbe */
    /* Reset potential default margins/paddings for lists */
    margin: 0;
    padding: 0;
    list-style-position: outside; /* Ensure list bullets don't interfere as much */
    padding-left: 1.2em; /* Add space for list bullets if using disc */
}
/* Specific styling for list items if needed */
.label-value-pair > ul li {
     margin-bottom: 2px; /* Small space between list items */
     /* Ensure font styles match span.value if needed */
     font-family: sans-serif;
     font-size: 1em; /* Relative to parent ul's 0.9em */
     line-height: 1.4;
     font-weight: 600;
}
/* --- ENDE NEUE REGELN --- */


.film-details-section p span.value.na, /* "N/A" styles */
.biography-section p span.value.na,
#film-details-accordion div p span.value.na,
#bio-accordion div p span.value.na,
#film-details-accordion div ul.na, /* Assuming .na class is added to ul if empty */
#bio-accordion div ul.na {
    color: #777;
    font-style: italic;
}

/* Lists within Bio/Film sections (e.g., for multiple directors) */
/* Styles for ul are now part of .label-value-pair > ul */
 #film-details-accordion li, #bio-accordion li,
 .biography-section #bio-visible-info li {
     margin-bottom: 3px;
     font-family: sans-serif;
     font-size: 0.9em;
     line-height: 1.4;
     font-weight: 600;
 }

/* Accordion Styles (jQuery UI Overrides/Styling) */
#film-details-accordion,
#bio-accordion {
    margin-top: 10px;
    border: none; /* Remove default UI border if needed */
}

#film-details-accordion h3.ui-accordion-header,
#bio-accordion h3.ui-accordion-header {
    font-family: 'Hammersmith One', sans-serif; /* Match other headers */
    font-size: 1.1em;
    font-weight: normal;
    /* Erhöhe padding-left, um Platz für das Icon zu schaffen (z.B. 2.2em) */
    padding: 8px 10px 8px 2.2em; /* Top 8px, Right 10px, Bottom 8px, Left 2.2em */
    margin: 5px 0 0 0;
    cursor: pointer;
    background: #eaf2fa; /* Original Farben */
    border: 1px solid #cddcec;
    border-radius: 3px;
    color: #105289; /* Match other headers */
    position: relative; /* Sicherstellen, dass 'left' für das Icon relativ hierzu ist */
}

#film-details-accordion h3.ui-accordion-header .ui-icon, /* Accordion icon */
#bio-accordion h3.ui-accordion-header .ui-icon {
    position: absolute; /* jQuery UI Standard */
    top: 50%;           /* Vertikal zentrieren */
    margin-top: -8px;   /* Hälfte der Icon-Höhe (Annahme: 16px) */
    left: 0.7em;        /* Angepasster Abstand vom linken Rand */
}

#film-details-accordion h3.ui-accordion-header.ui-state-active, /* Active header */
#bio-accordion h3.ui-accordion-header.ui-state-active {
    background: #d5e5f4; /* Original Farben */
    border-bottom: 1px solid #cddcec; /* Keep border consistent */
}

#film-details-accordion div.ui-accordion-content, /* Accordion content panel */
#bio-accordion div.ui-accordion-content {
    padding: 10px;
    border: 1px solid #cddcec;
    border-top: none; /* Original Rand */
    background-color: rgba(255, 255, 255, 0.6); /* Standard Transparenz */
    color: #333;
    font-family: sans-serif;
    font-size: inherit;
    line-height: inherit;
    font-weight: normal;
}

/* Labels inside accordion need the .label-value-pair class on the parent <p> */
/* Values inside accordion need the .label-value-pair class on the parent <p> */
/* Lists inside accordion need the .label-value-pair class on the parent <p> */


/* Story / Full Bio Text Sections */
#film-story-text, #film-text-text, #bio-full-text {
    clear: both; /* Clear floats from image */
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #cddcec; /* Original Rand */
}

#film-story-text h3, #film-text-text h3, #bio-full-text h3 {
    /* Font/color inherited from general h3 */
}

#film-story-text p, #film-text-text p, #bio-full-text p {
    margin: 0;
    font-family: sans-serif;
    font-size: 0.9em;
    line-height: 1.4;
    font-weight: 600; /* Slightly bolder text? Verify if intended */
}


/* Sort Options Bar */
.sort-options {
    text-align: right;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.6); /* Standard Transparenz */
    border: 1px solid #cddcec; /* Original Rand */
    border-radius: 4px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 1034px; /* Consider max-width */
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.sort-options span { /* "Sort by:" label */
    font-weight: bold;
    margin-right: 10px;
    color: #105289;
}

.sort-options a { /* Sort links */
    margin-left: 10px;
    padding: 3px 6px;
    border-radius: 3px;
    text-decoration: none;
    /* Color inherited from general 'a' */
}

.sort-options a:hover {
    background-color: #d5e5f4; /* Behalte Hover-Effekt */
    text-decoration: none;
}

.sort-options a.active { /* Active sort link */
    font-weight: bold;
    background-color: #7486a6; /* Behalte Aktiv-Effekt */
    color: #ffffff;
}

.sort-options button#collapse-all-button { /* Collapse button */
    margin-left: 15px;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid #7486a6;
    background-color: #eaf2fa; /* Behalte Button-Farbe */
    color: #105289;
    cursor: pointer;
    font-size: 0.9em;
}

.sort-options button#collapse-all-button:hover {
    background-color: #d5e5f4; /* Behalte Button-Hover */
}


/* Main Content Container (for clip lists) */
#content-container {
    width: 1034px; /* Consider max-width */
    margin: 0 auto 10px auto;
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* Above background overlays */
}


/* --- Korrektur für Filmgruppen-Header-Layout --- */
.movie-group-header {
    display: flex;
    justify-content: space-between; /* Datum links, Pfeil rechts */
    align-items: center;
    background-color: #7486a6;
    color: #ffffff;
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: none;
}
.movie-group-header.collapsed { /* Styles for collapsed header */ }

.movie-group-header .movie-title {
    font-family: 'Hammersmith One', sans-serif;
    font-size: 1.3em;
    color: #ffffff;
    font-weight: normal;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-right: 10px; /* Abstand zum Jahr */
    flex-shrink: 1; /* Allow shrinking */
    flex-grow: 0; /* Don't grow excessively */
}
.movie-group-header .movie-title a {
    color: #ffffff !important;
    text-decoration: none;
}
.movie-group-header .movie-title a:hover {
    text-decoration: underline;
}

.movie-group-header .movie-year {
    font-weight: normal;
    color: #e0eaf3;
    font-size: 1em;
    font-family: sans-serif;
    margin-right: auto; /* Schiebt Jahr und Pfeil nach rechts */
    padding-left: 0;
    flex-shrink: 0; /* Verhindert Schrumpfen */
}

/* Special rule for date-only headers (like in latest.php) where no movie-year exists */
.movie-group-header.date-header .movie-title {
    /* justify-content: space-between bereits im Parent sorgt für korrekte Positionierung */
}

.movie-group-header .scene-count {
     margin-right: 15px; /* Abstand zum Pfeil */
     font-weight: normal;
     color: #e0eaf3;
     font-size: 0.9em;
     font-family: sans-serif;
     text-transform: uppercase;
     flex-shrink: 0;
}

.movie-group-header .toggle-arrow {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.4em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #ffffff;
    transition: transform 0.2s ease-in-out;
}
.movie-group-header.collapsed .toggle-arrow {
    transform: rotate(-180deg);
}
/* --- Ende Korrektur --- */

.movie-group {
    border: 1px solid #cddcec;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden; /* Contain background and borders */
    clear: both;
    background-color: rgba(255, 255, 255, 0.6); /* Standard Transparenz */
}
.movie-group:last-child {
    margin-bottom: 0;
}

.movie-group-clips { /* Container for clips within a movie group */
    padding: 10px;
    box-sizing: border-box;
    clear: both;
    /* Background inherited from .movie-group */
    display: block; /* Default state, JS will hide/show */
}


/* Actor Group Styles (movie.php) */
.actor-group {
    border: 1px solid #cddcec; /* Gleicher Rand wie Film-Gruppe */
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    clear: both;
    background-color: rgba(255, 255, 255, 0.6); /* Gleiche Transparenz */
}
.actor-group:last-child {
    margin-bottom: 0;
}

.actor-group-header {
    background-color: #7486a6; /* Gleiches Header-Blau */
    color: #ffffff;
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between; /* Name links, Pfeil rechts */
    align-items: center;
    border-bottom: none; /* Kein Rand unter dem Header */
}
.actor-group-header.collapsed {
    /* Optional: Style für eingeklappten Header */
}

.actor-group-header .actor-name {
    font-family: 'Hammersmith One', sans-serif;
    font-size: 1.3em; /* Gleiche Größe wie Filmtitel */
    font-weight: normal;
}
.actor-group-header .actor-name a { /* Styling für den Link im Header */
    color: #ffffff !important; /* Wichtig, um Standard-Linkfarbe zu überschreiben */
    text-decoration: none;
}
 .actor-group-header .actor-name a:hover {
    text-decoration: underline;
 }

.actor-group-header .toggle-arrow { /* Gleiches Pfeil-Styling */
    background: none;
    border: none;
    font-size: 1.4em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #ffffff;
    transition: transform 0.2s ease-in-out;
}
.actor-group-header.collapsed .toggle-arrow {
    transform: rotate(-180deg); /* Pfeil drehen */
}

.actor-group-clips {
    padding: 10px; /* Gleicher Innenabstand */
    box-sizing: border-box;
    clear: both;
    /* Hintergrund wird von .actor-group geerbt */
    display: block; /* Standardmäßig sichtbar, wird durch JS gesteuert */
}


/* Individual Clip Item Styles */
.clip-item-wrapper {
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cddcec;
    border-radius: 4px;
    overflow: hidden; /* Contain background/borders */
    background-color: rgba(255, 255, 255, 0.6); /* Standard Transparenz */
}
/* Remove bottom margin from last clip in a group */
.movie-group-clips .clip-item-wrapper:last-child,
.actor-group-clips .clip-item-wrapper:last-child {
     margin-bottom: 0;
}

/* Main row of the clip item (image, info, actions) */
.clip-item-main {
    display: flex;
    align-items: center; /* Vertikal zentrieren */
    padding: 5px 10px;
    gap: 10px; /* Space between elements */
}

.clip-item-main .clip-image {
    flex-shrink: 0; /* Prevent image from shrinking */
}
.clip-item-main .clip-image img {
    display: block; /* Remove extra space below image */
    width: 125px;
    height: 100px;
    border-radius: 3px;
    object-fit: cover; /* Ensure image covers the area */
}

.clip-item-main .clip-info {
    flex-grow: 1; /* Allow info section to take up remaining space */
    padding: 0 10px; /* Space around text */
    min-width: 150px; /* Ensure minimum width */
    text-align: left;
}
.clip-item-main .clip-info h3 { /* Actor names */
    margin: 0;
    font-size: 1.1em;
    line-height: 1.3;
    color: #105289;
    font-weight: normal; /* Use Hammersmith font weight */
    text-align: left;
    /* Font inherited */
}
.clip-item-main .clip-info h3 a { /* Links within actor names */
    color: #105289; /* Match h3 color */
}
.clip-item-main .clip-info h3 a:hover {
    text-decoration: underline;
}

/* Episode info style */
.clip-item-main .clip-info .episode-info {
    font-size: 0.9em;
    color: #555;
    margin: 2px 0 0 0;
    padding: 0;
    line-height: 1.2;
    text-align: left;
}


/* Clip Actions Area (Badges and Buttons) */
.clip-item-main .clip-actions {
    flex-shrink: 0; /* Prevent shrinking */
    display: flex;
    align-items: stretch; /* Make badge wrapper and button wrapper same height */
    gap: 8px; /* Space between badge and buttons */
}

/* Resolution Badge */
.clip-actions .resolution-badge-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 1px solid #a9c2d9;
    background-color: #e0eaf3;
    border-radius: 3px;
    box-sizing: border-box;
    cursor: default;
}
.clip-actions .resolution-badge-wrapper img {
    display: block;
    max-height: 40px; /* Adjust as needed */
    width: auto;
}

/* Wrapper for the two button columns */
.clip-actions .button-columns-wrapper {
    display: flex;
    gap: 5px; /* Space between columns */
}

/* Individual button column */
.clip-actions .button-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute space */
    gap: 4px; /* Space between buttons/badges in a column */
}

/* General style for buttons and rating badge within columns */
.clip-actions .button-column .clip-button,
.clip-actions .button-column .rating-stat { /* Changed .rating-badge to .rating-stat */
    padding: 4px 8px;
    border: 1px solid #a9c2d9;
    background-color: #e0eaf3;
    border-radius: 3px;
    font-size: 0.9em;
    text-decoration: none;
    color: #105289;
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap; /* Prevent button text wrapping */
    font-family: sans-serif;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    flex-grow: 1; /* Allow elements to fill column height */
    min-height: 28px; /* Ensure consistent minimum height */
    display: flex; /* Use flex to center content vertically */
    align-items: center;
    justify-content: center;
}
.clip-actions .button-column .clip-button {
    cursor: pointer; /* Make it clear it's clickable */
}
.clip-actions .button-column .clip-button:hover {
    background-color: #d5e5f4;
    border-color: #7486a6;
    color: #105289;
}

/* Rating Stat Specifics */
.clip-actions .button-column .rating-stat {
    background-color: #e0eaf3;
    cursor: default;
    font-weight: normal;
    color: #365b7a;
    /* display: inline-block !important; <-- REMOVED !important */
    /* visibility: visible !important; <-- REMOVED !important */
}
.clip-actions .rating-stat .star { /* Style for the star if needed */
    color: #ff9900; /* Gold star */
    margin-left: 5px;
    font-weight: bold;
    line-height: 1; /* Prevent extra space */
    /* display: inline-block !important; <-- REMOVED !important */
}

/* Specific widths for button columns */
.clip-actions .button-column-left {
    width: 150px; /* Adjust as needed */
}
.clip-actions .button-column-right {
    width: 110px; /* Adjust as needed */
}

/* Arrow for "View Details" button */
.toggle-clip-details .arrow {
     margin-left: 5px;
     display: inline-block;
     transition: transform 0.2s ease-in-out;
}
.toggle-clip-details.open .arrow { /* Class added by JS when open */
     transform: rotate(180deg);
}


/* Collapsible Clip Details Area */
.clip-details-collapsible {
    display: none; /* Hidden by default, shown by JS */
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.6); /* Match item background */
    border-top: 1px dashed #cddcec; /* Separator line */
    clear: both;
}

.clip-details-table {
    width: 100%;
    font-size: 0.9em;
    color: #333;
    border-collapse: collapse;
}
.clip-details-table td {
    padding: 4px 8px;
    vertical-align: top;
    width: 33.33%; /* Three columns */
    font-family: sans-serif;
    line-height: 1.4;
}
.clip-details-table strong { /* Labels within details table */
    font-family: 'Hammersmith One', sans-serif;
    color: #105289;
    margin-right: 5px;
    font-weight: normal;
    display: inline-block; /* Or block if preferred */
}


/* Loading Indicator */
#loading-indicator {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #555;
    display: none; /* Shown by JS */
    clear: both;
    width: 1034px; /* Match content width */
    margin: 15px auto;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}


/* --- Lightbox Styles --- */

/* Common styles for overlays */
#lightbox-overlay,
#video-lightbox-overlay {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000; /* High z-index */
    cursor: pointer; /* Indicate clickable background to close */
    transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Fade effect */
    display: flex;
    align-items: center;
    justify-content: center;
}
#lightbox-overlay { /* Image lightbox specific */
    background-color: rgba(0, 0, 0, 0.85);
    overflow-y: auto; /* Allow scrolling if image is tall */
}
#video-lightbox-overlay { /* Video lightbox specific */
     background-color: rgba(0, 0, 0, 0.9); /* Darker */
     overflow: hidden; /* Prevent scrolling */
     z-index: 1010; /* Above image lightbox if both could appear */
}

/* Active state for overlays */
#lightbox-overlay.lightbox-active,
#video-lightbox-overlay.lightbox-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Image Lightbox Content */
#lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 0; /* Centered by flexbox */
    cursor: default;
    background-color: #111; /* Dark background for image */
    padding: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.7);
    transform: scale(0.95); /* Scale effect */
    transition: transform 0.3s ease;
}
#lightbox-overlay.lightbox-active #lightbox-content {
    transform: scale(1); /* Scale in when active */
}

#lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
    margin: 0 auto; /* Center image within content box */
    cursor: pointer; /* Allow clicking image (e.g., for next/prev if implemented) */
}

#lightbox-close { /* Close button for image lightbox */
    position: absolute;
    top: -10px;
    right: -5px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 10px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    line-height: 1;
    z-index: 1001; /* Above content */
}
#lightbox-close:hover {
    color: #ccc;
}


/* Video Lightbox Content */
#video-lightbox-content { /* Outer container */
    position: relative;
    width: 80%; /* Responsive width */
    max-width: 960px; /* Max width */
    height: auto;
    margin: 0; /* Centered by flexbox */
    cursor: default;
    background-color: transparent; /* Outer container transparent */
    padding: 0;
    transform: scale(0.95); /* Scale effect */
    transition: transform 0.3s ease;
}
#video-lightbox-overlay.lightbox-active #video-lightbox-content {
    transform: scale(1); /* Scale in when active */
}

/* Direct Player Wrapper */
#video-lightbox-content .video-player-container {
     width: 100%;
     position: relative;
     line-height: 0; /* Prevent extra space */
     padding: 0;
     margin: 0 auto;
     max-width: 830px; /* Match original max-width if needed */
     overflow: hidden;
}

/* AJAX Content Placeholder */
#video-lightbox-content #ajax-video-content {
    /* Styles for the loading message */
}
#video-lightbox-content #ajax-video-content p {
    text-align: center;
    padding: 50px;
    color: #ccc;
}

/* Video.js Player Styling (Aspect Ratio Method) */
#video-lightbox-content .video-player-container .video-js {
    position: relative;
    display: block;
    width: 100% !important;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (adjust if needed) */
    height: 0 !important;
    overflow: hidden;
    background-color: #000; /* Player background */
    max-height: none;
}

/* Actual <video> element */
#video-lightbox-content .video-player-container .video-js .vjs-tech {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video.js Poster and Spinner */
 #video-lightbox-content .video-player-container .vjs-poster,
 #video-lightbox-content .video-player-container .vjs-loading-spinner {
     background-color: #000 !important; /* Ensure black background */
 }

/* Close button for video lightbox */
#video-lightbox-close {
    position: absolute;
    top: -15px; /* Position outside the content box */
    right: -15px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 0px 8px;
    background-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    line-height: 0.8; /* Adjust for vertical centering */
    z-index: 1011; /* Above content */
    transition: color 0.2s ease;
}
#video-lightbox-close:hover {
    color: #ccc;
}

/* --- Footer Styles --- */

.footer-container {
    /* Container NUR für die Spalten */
    max-width: 1034px;
    width: 100%;
    margin: 40px auto 0 auto; /* Abstand oben, zentriert, KEIN Abstand unten mehr hier */
    background-color: #7486a6; /* Dein Hintergrund */
    /* Padding nur oben und seitlich, unten weniger oder 0, da Copyright draußen ist */
    padding: 30px 15px 20px; /* z.B. 20px unten */
    box-sizing: border-box;
    border-radius: 4px;
    color: #ffffff; /* Standard-Textfarbe für Spalten */
    text-align: left;
}

.footer-grid {
    display: grid;
    gap: 25px;
}

.footer-column h4 {
    font-family: 'Hammersmith One', sans-serif;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: normal;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column a,
.footer-column p {
    color: #e0eaf3;
    text-decoration: none;
    font-size: 0.9em;
    line-height: 1.5;
}
.footer-column p {
     margin-bottom: 10px;
}
.footer-column p a {
    color: #e0eaf3;
}

.footer-column a:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* Copyright Styling (Jetzt außerhalb des blauen Kastens) */
.copyright {
    text-align: center;
    font-size: 0.9em;
    /* Abstand ZWISCHEN blauem Kasten und Copyright */
    margin-top: 25px;
    margin-bottom: 20px; /* Abstand nach ganz unten */
    padding-top: 0; /* Kein Padding oben mehr nötig */
    border-top: none; /* KEINE Trennlinie mehr */
    color: #666; /* Dunklere Farbe für Lesbarkeit auf hellem Grund */
    font-family: sans-serif;
}

.copyright a {
     color: #666; /* Gleiche Farbe wie Text */
     text-decoration: none;
     font-weight: normal;
}
.copyright a:hover {
    text-decoration: underline;
    color: #105289; /* Standard-Linkfarbe beim Hovern */
}


/* --- Responsive Design für den Footer (betrifft nur Grid) --- */

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 577px) and (max-width: 991px) {
     .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-column {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .footer-container {
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 15px; /* Ggf. unteren Abstand anpassen */
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
     .footer-column h4 {
        margin-top: 15px;
    }
    .footer-column:first-child h4 {
        margin-top: 0;
    }
    .copyright {
        margin-top: 20px; /* Ggf. Abstand auf Mobilgeräten anpassen */
        margin-bottom: 15px;
    }
}

/* --- ENDE Footer Styles --- */


/* --- List Page Specific Styles --- */
/* (These were previously inline in movie-list.php / actress-list.php) */

/* Multi-column layout for lists */
.movie-list-columns,
.actress-list-columns {
    column-count: 3; /* Adjust number of columns as needed */
    column-gap: 20px;
    padding-top: 10px;
}

/* Individual list items */
.movie-list-item,
.actress-list-item {
    margin-bottom: 8px;
    break-inside: avoid-column; /* Try to prevent items breaking across columns */
    padding: 5px;
    text-align: left;
}
.movie-list-item a,
.actress-list-item a {
    text-decoration: none;
    color: #333;
    font-size: 1.1em;
    font-weight: bold;
    display: block; /* Ensure link takes full width for hover */
}
.movie-list-item a:hover,
.actress-list-item a:hover {
    color: #000;
    text-decoration: underline;
}

/* "No items found" message style */
#movie-list-container > p,
#actress-list-container > p {
    padding-top: 15px;
    font-style: italic;
}

/* Note on movie list page */
.title-language-note {
    font-size: 0.9em;
    color: #555;
    margin-top: -5px;
    margin-bottom: 15px;
    text-align: center;
}

 /* Style for error messages (e.g., from search.php) */
.error-message {
    color: #D8000C; /* Red */
    background-color: #FFD2D2; /* Light red */
    border: 1px solid #D8000C;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
}
.info-message-box {
     padding: 15px;
     margin: 15px 0;
     border: 1px solid #cddcec;
     background-color: #eaf2fa;
     border-radius: 4px;
     text-align: center;
     font-style: italic;
}
/* Style for search results page */
 .search-result-item .clip-info h3 { /* Filmtitle */
    font-size: 1.2em; /* Etwas größer */
    margin-bottom: 3px;
}
.search-result-item .clip-info h3 .movie-year {
     font-size: 0.9em;
     color: #555;
     font-family: sans-serif;
     font-weight: normal;
     margin-left: 5px;
}
.search-result-item .clip-info .actors-in-scene { /* Schauspielerliste */
    font-size: 0.95em;
    color: #333;
    margin: 0 0 2px 0;
    line-height: 1.3;
}
.search-result-item .clip-info .actors-in-scene a {
    color: #105289; /* Standard-Linkfarbe */
}
.search-result-item .clip-info .episode-info { /* Episodeninfo (falls vorhanden) */
     font-size: 0.9em;
     color: #777;
     margin-top: 0;
}
#search-results-container h2 .result-count {
    font-size: 0.8em;
    color: #555;
    font-family: sans-serif;
    font-weight: normal;
}
#search-results-container .sort-options {
     margin-top: 10px; /* Add some space below the title */
     margin-bottom: 15px; /* Add space below sort options */
}


/* --- Utility Classes --- */
.JS { /* Class often added by JS, maybe for progressive enhancement */
    border-collapse: collapse; /* Example style */
}

/* --- NEUE ANIMATIONSSTILE --- */
.animate-on-load {
    opacity: 0;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    will-change: transform, opacity; /* Performance-Hinweis für den Browser */
}

.fly-in-from-top {
    transform: translateY(-80px); /* Startet 80px weiter oben */
}

.fly-in-from-bottom {
    transform: translateY(80px); /* Startet 80px weiter unten */
}

.fly-in-from-left {
    transform: translateX(-80px); /* Startet 80px weiter links */
}

.fly-in-from-right {
    transform: translateX(80px); /* Startet 80px weiter rechts */
}

/* Endzustand, wenn .is-visible durch JS hinzugefügt wird */
.animate-on-load.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0); /* Zurück zur normalen Position */
}
/* --- ENDE NEUE ANIMATIONSSTILE --- */

/* --- Actor Biography Block --- */
.actor-bio-block {
    display: flex; /* Enable flexbox layout */
    align-items: flex-start; /* Align items to the top */
    gap: 15px; /* Space between portrait and text */
    margin-bottom: 20px; /* Space below each bio block */
}

.actor-bio-portrait {
    flex-shrink: 0; /* Prevent image from shrinking */
    width: 200px; /* Explicit width */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure the whole image is visible, might add letterboxing if aspect ratio differs significantly */
}

.actor-bio-content-right {
    flex-grow: 1; /* Allow text content to take remaining space */
    min-width: 0; /* Prevents overflow issues with flex items */
}

/* Actor Bio - Accordion Styles (Placeholders, refine as needed) */