/* ... bestehender Code ... */
:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #ff0050;
    --accent-hover: #d60043;
    --nav-bg: #000000;
}

* {
    box_sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background-color: var(--nav-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i { color: var(--accent); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

.btn-upload {
    background: var(--accent);
    padding: 8px 16px;
    border-radius: 4px;
    color: white !important;
}

.btn-upload:hover {
    background: var(--accent-hover);
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Filter Header */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: #1e1e1e;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}
.filter-header h2 { font-size: 1.2rem; margin: 0; }
.filter-header .highlight { color: var(--accent); }
.reset-filter { color: #ccc; text-decoration: none; font-size: 0.9rem; }
.reset-filter:hover { color: white; }

/* Grid System (3x3 Layout) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* Video Card */
.video-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; 
    background: #000;
}

.thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.play-overlay i {
    font-size: 3rem;
    color: white;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-row {
    margin-bottom: 8px;
}

.badge {
    font-size: 0.75rem;
    background: #333;
    padding: 3px 8px;
    border-radius: 12px;
    color: #ccc;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 3px;
    text-decoration: none;
}

/* Cast Styles */
.cast-row {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.cast-label {
    font-weight: bold;
    color: #888;
    margin-right: 5px;
}

.cast-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 5px;
    transition: color 0.2s;
}

.cast-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
.cast-link:after {
    content: ",";
}
.cast-link:last-child:after {
    content: "";
}

.tags {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.hashtag {
    margin-right: 5px;
    color: var(--accent);
}

.card-link {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10;
}

/* Forms */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.upload-container h2 {
    margin-bottom: 0;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}
.form-row .form-group {
    flex: 1;
}

.actor-upload-box {
    background: #252525;
    padding: 15px;
    border-radius: 6px;
    border: 1px dashed #444;
}

.actor-upload-box label {
    color: #ddd;
    margin-bottom: 10px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

input[type="text"], input[type="password"], textarea {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #333;
    color: white;
    border-radius: 4px;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    border: none;
    color: white;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-submit:hover {
    background: var(--accent-hover);
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.success { background: rgba(76, 175, 80, 0.2); color: #4caf50; border: 1px solid #4caf50; }
.error { background: rgba(244, 67, 54, 0.2); color: #f44336; border: 1px solid #f44336; }

.responsive-video iframe {
    width: 100%;
    height: 500px;
    border: none;
}
@media (max-width: 600px) {
    .responsive-video iframe { height: 300px; }
}

/* --- WATCH PAGE STYLES --- */
.watch-container {
    max-width: 1000px;
    margin: 0 auto;
}

.video-player-wrapper {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    background: #000;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-details-header {
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 10px;
}

.video-details-header h1 {
    font-size: 2rem;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.btn-edit {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-back-small {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
}
.btn-back-small:hover {
    color: white;
}

.video-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.video-description {
    background: #191919;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid var(--accent);
}

.video-description h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.video-description p {
    color: #ccc;
    line-height: 1.7;
    white-space: pre-wrap; 
}

.video-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.meta-section h4 {
    color: var(--accent);
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    display: inline-block;
}

/* Category Page & Links */
.category-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cat-card {
    background: var(--card-bg);
    border: 1px solid #333;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cat-card:hover {
    border-color: var(--accent);
    background: #252525;
    transform: translateY(-3px);
}

.cat-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.cat-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.click-cat:hover {
    background: var(--accent);
    color: white;
}

/* Updated Cast Chip with Avatar */
.cast-chip {
    display: flex; /* Flexbox for Avatar + Name */
    align-items: center;
    background: #252525;
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 8px;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.cast-chip:hover {
    background: #333;
    border-left-color: var(--accent);
}

.cast-chip i { margin-right: 8px; color: #777; }

.actor-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 1px solid #555;
}

/* NEU: Actors Grid Styles */
.actors-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 20px;
}

.actor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s;
}

.actor-card:hover {
    transform: translateY(-5px);
    color: var(--accent);
}

.actor-image-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid #333;
    background: #252525;
    transition: border-color 0.2s;
}

.actor-card:hover .actor-image-wrapper {
    border-color: var(--accent);
}

.actor-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #555;
}

.actor-name {
    font-weight: 500;
    font-size: 1.1rem;
}

.hashtag-pill {
    display: inline-block;
    color: var(--accent);
    background: rgba(255, 0, 80, 0.1);
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #333;
    color: white;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.page-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    border: 1px solid #333;
    font-size: 0.9rem;
}

.page-link:hover {
    background-color: #333;
    color: white;
    border-color: #555;
}

.page-link.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: bold;
    pointer-events: none;
}