@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');

:root {
    /* Color Variables - Modern Dark Gold Theme */
    --primary-color: #d4af37;           /* Helles Gold */
    --primary-color-dark: #b8962a;      /* Dunkleres Gold */
    --primary-color-light: #f0d876;     /* Helleres Gold für Hover */
    --secondary-color: #8b7332;         /* Gedämpftes Gold */
    --accent-color: #ffd700;            /* Leuchtendes Gold für Akzente */

    --background-color: #0a0a0a;        /* Sehr dunkler Hintergrund */
    --background-secondary: #141414;    /* Sekundärer Hintergrund */
    --background-tertiary: #1a1a1a;     /* Card-Hintergrund */

    --text-color: #e8e8e8;              /* Hellgrau für besseren Kontrast */
    --text-color-secondary: #a0a0a0;    /* Helleres Grau */
    --text-color-muted: #707070;        /* Gedämpfter Text */

    --input-background: #1c1c1c;        /* Dunklerer Input-Hintergrund */
    --input-border: #2a2a2a;            /* Hellerer Border für Kontrast */
    --input-focus: #3a3a3a;             /* Focus-State */

    --profile-dropdown-bg: #1a1a1a;
    --profile-dropdown-color: #e8e8e8;
    --dark-bg: #0f0f0f;                 /* Sehr dunkel für Bilder */

    --success-color: #10b981;           /* Modernes Grün */
    --danger-color: #ef4444;            /* Modernes Rot */
    --warning-color: #f59e0b;           /* Modernes Orange */
    --info-color: #3b82f6;              /* Modernes Blau */

    /* Font Variables */
    --font-family: 'Lexend', sans-serif;
    --font-size-small: 0.85em;
    --font-size-normal: 0.95em;
    --font-size-medium: 0.97em;
    --font-size-large: 1.08em;
    --font-size-xlarge: 1.3rem;

    /* Spacing Variables */
    --spacing-xs: 5px;
    --spacing-sm: 8px;
    --spacing-md: 10px;
    --spacing-lg: 15px;
    --spacing-xl: 18px;
    --spacing-xxl: 20px;

    /* Border Radius Variables */
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-xxl: 16px;

    /* Transition Variables */
    --transition-fast: 0.15s;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadow Variables - Modernere Schatten */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.7);
    --shadow-focus: 0 0 0 3px rgba(212, 175, 55, 0.3);
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.15);

    /* Size Variables */
    --thumbnail-width: 120px;
    --thumbnail-height: 68px;
    --channel-thumb-size: 60px;
    --avatar-size-sm: 28px;
    --avatar-size-md: 32px;
    --avatar-size-lg: 40px;
    --avatar-size-xl: 44px;
}

.btn-primary {
    --bs-btn-color: var(--input-background);
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: #c8a64d;
    --bs-btn-hover-color: var(--input-background);
    --bs-btn-hover-bg: var(--primary-color-dark);
    --bs-btn-hover-border-color: var(--primary-color-dark);
    --bs-btn-focus-shadow-rgb: 200, 166, 77;
    --bs-btn-active-color: var(--input-background);
    --bs-btn-active-bg: var(--secondary-color);
    --bs-btn-active-border-color: var(--secondary-color);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(200, 166, 77, 0.125);
    --bs-btn-disabled-color: var(--input-background);
    --bs-btn-disabled-bg: #c8a64d;
    --bs-btn-disabled-border-color: #c8a64d;
}

.btn-outline-primary {
    --bs-btn-color: var(--primary-color);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: var(--input-background);
    --bs-btn-hover-bg: var(--primary-color);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-focus-shadow-rgb: 212, 175, 55;
    --bs-btn-active-color: var(--input-background);
    --bs-btn-active-bg: var(--primary-color);
    --bs-btn-active-border-color: var(--primary-color);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(212, 175, 55, 0.125);
    --bs-btn-disabled-color: var(--primary-color);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--primary-color);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.btn-outline-primary:hover {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.btn-check:checked + .btn-outline-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--input-background) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.admin-status-toggle input[type="datetime-local"] {
    background-color: var(--input-background);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    outline: none;
    width: 100%;
}

.admin-status-toggle .form-label {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.btn-group .btn {
    border-width: 2px;
    font-weight: 500;
}

.btn-group .btn-outline-primary {
    border-radius: var(--radius-md) !important;
    margin: 0 4px;
}

.btn-danger {
    --bs-btn-color: var(--input-background);
    --bs-btn-bg: #dc3545;
    --bs-btn-border-color: #dc3545;
    --bs-btn-hover-color: var(--input-background);
    --bs-btn-hover-bg: #c82333;
    --bs-btn-hover-border-color: #bd2130;
    --bs-btn-focus-shadow-rgb: 220, 53, 69;
    --bs-btn-active-color: var(--input-background);
    --bs-btn-active-bg: #bd2130;
    --bs-btn-active-border-color: #b21f2d;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(220, 53, 69, 0.125);
    --bs-btn-disabled-color: var(--input-background);
    --bs-btn-disabled-bg: #dc3545;
    --bs-btn-disabled-border-color: #dc3545;

    filter: drop-shadow(0px 0px 2px var(--bs-btn-bg));
}

* {
    box-sizing: border-box;
    font-family: var(--font-family), serif;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar {
    width: 10px;
    background-color: var(--input-background);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color-dark);
}

::selection {
    background: var(--secondary-color);
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-color-dark);
}

header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    justify-items: center;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

h1 {
    color: var(--primary-color);
    text-shadow: 2px 2px 20px var(--secondary-color);
    margin-top: 30px;
}

.h1-icon {
    color: var(--primary-color);
    font-size: 3em;
    margin-right: 10px;
    text-shadow: 2px 2px 20px var(--secondary-color);
}

h2 {
    color: var(--text-color);
    font-weight: 400;
    font-size: 1.5em;
}

input[type="text"] {
    width: 100%;
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background-color: var(--input-background);
    color: var(--text-color);
    outline: none;
}

input[type="text"]:disabled {
    background-color: var(--input-border);
    color: var(--text-color-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

#categoryTypeInput {
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background-color: var(--input-background);
    color: var(--text-color);
    outline: none;
}

textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background-color: var(--input-background);
    color: var(--text-color);
    outline: none;
    resize: none;
}

textarea:disabled {
    background-color: var(--input-border);
    color: var(--text-color-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

select {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background-color: var(--input-background);
    color: var(--text-color);
    outline: none;
    cursor: pointer;
}

select:disabled {
    background-color: var(--input-border);
    color: var(--text-color-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

select option {
    background-color: var(--input-background);
    color: var(--text-color);
    padding: var(--spacing-md);
}

button {
    background-color: var(--primary-color);
    color: var(--input-background);
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-md) 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

button:disabled {
    background-color: var(--input-border);
    color: var(--text-color-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

button:hover {
    background-color: var(--primary-color-dark);
}

button:disabled:hover {
    background-color: var(--input-border);
}

#loginBtn {
    text-decoration: none;
}

#loginBtn div{
    background-color: var(--primary-color-dark);
    color: var(--input-background);
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-md) 0;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color var(--transition-normal);
    display: inline-block;
    font-weight: 600;
}

#loginBtn div:hover {
    background-color: var(--secondary-color);
    color: var(--input-background);
}

#result {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#result > div {
    display: flex;
    background-color: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);

    animation: fadeIn 0.5s ease-in-out;
}

#result > select {
    margin-left: auto;
    background-color: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    color: var(--text-color);
    padding: var(--spacing-md);
    outline: none;

    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
    animation-delay: 0.225s;
    cursor: pointer;
}

#result > textarea {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
    animation-delay: 0.45s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.alert {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-md);
    border: 1px solid;
    font-size: var(--font-size-normal);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    border-color: #28a745;
    color: #28a745;
}

.alert-success strong {
    color: #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
    color: #dc3545;
}

.alert-danger strong {
    color: #dc3545;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
    color: #ffc107;
}

.alert-warning strong {
    color: #ffc107;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.15);
    border-color: #17a2b8;
    color: #17a2b8;
}

.alert-info strong {
    color: #17a2b8;
}

#result img {
    max-width: 100px;
    margin-right: 20px;
    border-radius: var(--radius-md);
}

#result p {
    color: var(--text-color-secondary);
}

#channelResult ul {
    list-style-type: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    max-width: 400px;
}

#channelResult ul li {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
    margin-bottom: 5px;
    background-color: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin-right: 5px;
}

#categoriesList {
    max-height: 425px;
    overflow-y: auto;
}

/* Twitch-Kanal-Suche Komponente Styles */
.twitch-channel-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-end;
}

.twitch-channel-search-container > div {
    flex: 1;
    position: relative;
}

.tcs-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tcs-selected-img {
    width: var(--avatar-size-md);
    height: var(--avatar-size-md);
    border-radius: 50%;
    display: none;
    flex-shrink: 0;
}

.tcs-input {
    flex: 1;
    min-width: 0;
}

.tcs-input:disabled {
    background-color: var(--input-border);
    color: var(--text-color-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

.tcs-clear-btn {
    background: var(--primary-color);
    border: none;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    color: var(--input-background);
    padding: 0;
    margin: 0;
    transition: color var(--transition-fast);
    width: 40px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.tcs-clear-btn:hover {
    color: var(--text-color);
}

.twitch-search-popup {
    position: absolute;
    z-index: 10;
    min-width: 250px;
    width: 100%;
    background: var(--profile-dropdown-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 4px 0;
    border: 1px solid var(--input-border);
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

.twitch-search-popup:empty {
    display: none;
}

.twitch-search-popup .list-group-item {
    padding: var(--spacing-lg) var(--spacing-md);
    gap: 8px;
    background: none;
    color: var(--text-color);
    border: none;
    font-family: var(--font-family), sans-serif;
    font-size: var(--font-size-normal);
    transition: background var(--transition-fast);
    margin: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.twitch-search-popup .list-group-item:hover {
    background: var(--input-border);
    color: var(--text-color);
}

.twitch-search-popup img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.twitch-search-popup .list-group-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Loading state item in Twitch search popup */
.tcs-loading {
    cursor: default;
    opacity: 0.9;
}
.tcs-loading:hover {
    background: none;
}
.tcs-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tcs-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-color);
    border-top-color: transparent;
    border-right-color: transparent;
    border-radius: 50%;
    animation: tcs-spin 0.8s linear infinite;
}
@keyframes tcs-spin {
    to { transform: rotate(360deg); }
}

/* Pop-in animation for search results */
.tcs-pop {
    opacity: 0;
    animation: tcs-pop 300ms ease-out both;
    will-change: transform, opacity;
}
@keyframes tcs-pop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .tcs-spinner { animation: none; }
    .tcs-pop { animation: none; opacity: 1; }
}

#categoriesList > div {
    background-color: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 5px 15px;
    margin: 5px 10px 5px 0;
    cursor: pointer;
    transition: background-color var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

#categoriesList > div:hover {
    background-color: var(--secondary-color);
}

footer .text-body-secondary{
    color: var(--text-color) !important;
}

#adminStats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    justify-content: space-evenly;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

@media (max-width: 400px) {
    #adminStats {
        grid-template-columns: 1fr;
    }
}

#adminStats div {
    background-color: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    transition: background-color var(--transition-normal);
}

#adminStats div:hover {
    background-color: var(--secondary-color);
}

/* --- Admin-Benutzer-Editor Styles --- */
#adminUserSearchResults {
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    background: var(--input-background);
    border: 1px solid var(--input-border);
    margin-top: 2px;
}

#adminUserSearchResults .list-group-item {
    background: var(--input-background);
    color: var(--text-color);
    border: none;
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-normal);
    padding: 8px 12px;
}
#adminUserSearchResults .list-group-item:last-child {
    border-bottom: none;
}
#adminUserSearchResults .list-group-item:hover:not(:disabled) {
    background: var(--secondary-color);
}

#adminUserSearchResults img {
    width: var(--avatar-size-md);
    height: var(--avatar-size-md);
    border-radius: 50%;
    object-fit: cover;
    background: #222;
}

#adminUserSearchResults small {
    font-size: var(--font-size-small);
    color: var(--text-color-secondary) !important;
}

#adminUserSearchResults:empty {
    display: none;
}

#adminUserList {
    margin-top: 20px;
}

#adminUserList h5 {
    margin-bottom: 12px;
    color: var(--primary-color);
}
#adminUserList .d-flex {
    background: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    margin-bottom: 8px;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    box-shadow: var(--shadow-sm);
}
#adminUserList img {
    width: var(--avatar-size-lg);
    height: var(--avatar-size-lg);
    border-radius: 50%;
    object-fit: cover;
    background: #222;
}
#adminUserList strong {
    font-size: var(--font-size-large);
    color: var(--text-color);
}
#adminUserList .btn-danger {
    margin-left: auto;
    font-size: 0.95em;
    padding: 6px 14px;
}
#adminUserList .text-muted {
    font-size: 0.95em;
    color: var(--text-color-secondary) !important;
    margin-left: 6px;
    filter: blur(4px) !important;
    transition: filter 0.5s ease;
}

#adminUserList .text-muted:hover {
    filter: none !important;
    cursor: help;
}

@media (max-width: 700px) {
    #adminUserList, #adminUserSearchResults {
        min-width: 0;
        max-width: 100%;
    }
    #adminUserList .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    #adminUserList img {
        margin-bottom: 4px;
    }
}

.badge.clip {
    background-color: #ae8b3c !important; /* Dunkles Bronze für Clip */
    color: #fff;
}

.badge.solo {
    background-color: #ffd162 !important; /* Silber für Solo */
    color: #222;
}

.badge.duo {
    background-color: #c8a64d !important; /* Gold für Duo */
    color: #222;
}

#categoriesList .badge.bg-info {
    background-color: #816f41 !important; /* Dunkles Bronze für Clip */
    color: #fff;
}

/* --- Modal Custom Style --- */
.modal-content {
    background-color: var(--input-background);
    color: var(--text-color);
    border-radius: var(--radius-xxl);
    border: 1.5px solid var(--primary-color);
    box-shadow: var(--shadow-xl);
}
.modal-header, .modal-footer {
    border: none;
    background: transparent;
}

.modal-header .btn-close {
    background-color: var(--primary-color);
}

.modal-title {
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.modal-body label {
    color: var(--primary-color);
    font-weight: 500;
}
.modal-body input[type="text"], .modal-body textarea, .modal-body select {
    background-color: var(--input-background);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    outline: none;
    width: 100%;
}
.modal-body input[type="text"]:focus, .modal-body textarea:focus, .modal-body select:focus {
    background-color: var(--input-background);
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-focus);
}
.modal-body textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer .btn-primary {
    background-color: var(--primary-color);
    color: var(--input-background);
    border: none;
}
.modal-footer .btn-primary:hover {
    background-color: var(--primary-color-dark);
}
.modal-footer .btn-secondary {
    background-color: var(--input-border);
    color: var(--text-color-secondary);
    border: none;
}
.modal-footer .btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

@keyframes modalBackdropFadeIn {
    from {
        opacity: 0;
        background-position: 0% 0;
    }
    to {
        opacity: 0.85;
        background-position: 30% 0;
    }
}

.modal {
    backdrop-filter: blur(5px);
}

.modal-backdrop.show {
    opacity: 0.85;
    background: linear-gradient(120deg, #0b0906 50%, var(--primary-color) 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    animation: modalBackdropFadeIn 0.7s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* Profil Dropdown Styling */
.custom-profile-dropdown {
    right: 0;
    left: auto;
    min-width: 180px;
    background: var(--profile-dropdown-bg) !important;
    color: var(--profile-dropdown-color) !important;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    border: 1px solid var(--input-border);
    padding: 0.5rem 0;
}
.custom-profile-dropdown .dropdown-item {
    color: var(--profile-dropdown-color) !important;
    margin: 2px 0 !important; /* Kleineres margin oben/unten */
    padding: 12px 24px !important; /* Größeres Padding für mehr Klickfläche */
}
.custom-profile-dropdown .dropdown-item:hover,
.custom-profile-dropdown .dropdown-item:focus {
    background: var(--primary-color-dark);
    color: var(--input-background) !important;
}
@media (max-width: 500px) {
    .custom-profile-dropdown {
        left: 0;
        right: auto;
    }
}

pre {
    background-color: var(--input-background);
    color: var(--text-color);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid var(--input-border);
}

/* Responsive Anpassungen für Profilseite und Einsendungen */
@media (max-width: 600px) {
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    .row.g-3 > .col-12 {
        padding-left: 0;
        padding-right: 0;
    }
    .d-flex.align-items-center.p-3.mb-2 {
        flex-direction: column;
        align-items: stretch;
        padding: 1em 0.5em;
        min-width: 0;
    }
    .d-flex.align-items-center.p-3.mb-2 img,
    .d-flex.align-items-center.p-3.mb-2 > div:first-child {
        margin-right: 0 !important;
        margin-bottom: 10px;
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
        min-width: 0;
    }
    .d-flex.align-items-center.p-3.mb-2 > div[style*="flex:1"] {
        margin-bottom: 10px;
    }
    .revokeSubmissionBtn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 8px;
        font-size: 1.1em;
        padding: 0.7em 0;
    }
    .btn {
        font-size: 1.05em;
        padding: 0.7em 0.9em;
    }
    .modal-dialog {
        margin: 0.5em auto;
        max-width: 98vw;
    }
    .modal-content {
        font-size: 1em;
    }
    #jsonData {
        font-size: 0.95em;
        max-width: 100vw;
        word-break: break-all;
        white-space: pre-wrap;
        overflow-x: auto;
    }
}

/* Responsive Anpassungen für Admin-Seite */
@media (max-width: 768px) {
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    /* Kategorien-Eingabezeile */
    #categoryInput,
    #categoryTypeInput,
    #addCategoryButton {
        width: 100%;
        margin-bottom: 6px;
    }
    div[style*="display: flex;"][style*="gap: 10px;"] {
        flex-direction: column !important;
        gap: 6px !important;
        align-items: stretch !important;
    }
    /* Kategorien-Liste */
    #categoriesList > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        font-size: 1rem;
    }
    #categoriesList .badge {
        margin-left: 0 !important;
        margin-top: 2px;
        display: inline-block;
    }
    /* Modal Anpassung */
    .modal-dialog {
        max-width: 95vw;
        margin: 1.75rem auto;
    }
    /* Statistiken */
    #adminStats > div {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    /* Admin-Suche und Liste */
    #adminUserSearch {
        width: 100%;
        margin-bottom: 6px;
    }
    #adminUserSearchResults {
        width: 100%;
        left: 0 !important;
    }
    #adminUserList > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        font-size: 1rem;
    }
    #adminUserList img {
        margin-bottom: 4px;
        margin-right: 0;
    }
    #adminUserList button {
        width: 100%;
        margin-top: 4px;
    }
}

/* Kleinere Buttons und Abstände für mobile */
@media (max-width: 480px) {
    .btn, .btn-sm {
        font-size: 0.95rem;
        padding: 0.4rem 0.7rem;
    }
    h1 {
        font-size: var(--font-size-xlarge);
        margin-top: 1.2rem;
        margin-bottom: 0.7rem;
    }
}

/* Additional utility classes */
.clip-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.section-divider {
    margin: 40px 0;
}

.form-group {
    margin-bottom: 10px;
}

.form-group-large {
    margin-bottom: 20px;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.feedback-message {
    margin-top: 10px;
}

.hidden {
    display: none;
}

.category {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(200, 166, 77, 0.1);
    border-radius: 8px;
    transition: background-color 0.3s ease;
    user-select: none;
}

.category:hover {
    background-color: rgba(200, 166, 77, 0.2);
}

.category h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.category p {
    margin-bottom: 0;
    color: var(--text-color-secondary);
}

details{
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--input-border);
}

details summary{
    font-weight: bold;
    cursor: pointer;
    color: var(--primary-color);
    font-size: var(--font-size-large);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    user-select: none;
}

details summary:hover{
    text-decoration: underline;
}

details .category {
    margin: 10px;
}

details ol {
    padding-left: 30px;
}

details li {
    margin-bottom: 15px;
}

details li span {
    color: var(--text-color-secondary);
}

/* Profile Page - Submission Cards */
.submission-card {
    background: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    padding: 1rem 1.125rem;
    margin-bottom: 0.5rem;
}

.submission-thumbnail {
    width: var(--thumbnail-width);
    height: var(--thumbnail-height);
    object-fit: cover;
    border-radius: 8px;
    margin-right: 18px;
    background: #222;
    border: 1px solid var(--input-border);
}

.submission-thumbnail-placeholder {
    width: var(--thumbnail-width);
    height: var(--thumbnail-height);
    background: #222;
    border-radius: 8px;
    margin-right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 2em;
}

.submission-content {
    flex: 1;
    min-width: 0;
}

.submission-title {
    font-size: var(--font-size-large);
    font-weight: 500;
    color: var(--primary-color);
    word-break: break-all;
}

.submission-title a {
    color: var(--primary-color);
    text-decoration: underline;
}

.submission-meta {
    color: var(--text-color-secondary);
    font-size: var(--font-size-medium);
}

.submission-message {
    color: var(--text-color-secondary);
    font-size: 0.90em;
    margin-top: 5px;
    font-style: italic;
}


/* Submission Cards - fix overflow + ellipsis */
.submissions-page .submission-card {
    background: var(--input-background);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);

    display: flex;
    flex-direction: column;
    align-items: stretch; /* <-- wichtig: nicht center */
    padding: 1rem 1.125rem;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}

/* Bild sicher auf Kartengröße zwingen */
.submissions-page .submission-card .card-img-top {
    width: 100%;
    aspect-ratio: 16 / 9; /* oder was immer dein Bildseitenverhältnis ist */
    display: block;
    object-fit: cover;
}

/* Body muss schrumpfbar sein und die Breite voll nutzen */
.submissions-page .submission-card .card-body {
    flex: 1 1 auto;
    min-width: 0; /* WICHTIG für ellipsis in Flexbox */
    width: 100%;
    box-sizing: border-box;
}

/* Titel + kleine Texte mit ellipsis */
.submissions-page .submission-card .card-title {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.submissions-page .submission-card .card-text small {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}


/* Channel Submission Cards */
.channel-thumbnails {
    display: flex;
    gap: 8px;
    margin-right: 18px;
}

.channel-thumbnail {
    width: var(--channel-thumb-size);
    height: var(--channel-thumb-size);
    object-fit: cover;
    border-radius: 8px;
    background: #222;
    border: 1px solid var(--input-border);
}

/* JSON Data Display */
.json-data-display {
    background: #222;
    color: #fff;
    padding: 1em;
    border-radius: 8px;
    overflow: auto;
}

/* Platform Badge Colors */
.badge.bg-purple {
    background-color: #6441A5 !important;
}

.bg-purple {
    background-color: #6441A5 !important;
}

/* Badge vertical alignment */
.badge-middle {
    vertical-align: middle;
}

/* Timer page - rounded table */
.table-rounded {
    border-radius: 7px;
    overflow: hidden;
}

/* Schedule config visibility */
.schedule-config-hidden {
    display: none;
}

#channelSubmissionSection {
    padding: 1.25rem;
    background-color: var(--background-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

/* Form Check Input - Switch Styling */
.form-check-input {
    background-color: var(--input-background) !important;
    border: 2px solid var(--primary-color) !important;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.form-check-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: var(--shadow-focus) !important;
}

/* Switch Kugel sichtbar machen */
.form-check-input[type="checkbox"][role="switch"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23d4af37'/%3e%3c/svg%3e") !important;
}

.form-check-input[type="checkbox"][role="switch"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%231c1c1c'/%3e%3c/svg%3e") !important;
}

/* ===== Timer Countdown Styles ===== */
#timer {
    white-space: nowrap;
    font-family: monospace;
    background: var(--background-secondary);
    padding: var(--spacing-md) var(--spacing-xxl);
    border-radius: var(--radius-md);
    display: inline-block;
    user-select: none;
    box-shadow: var(--shadow-md);
    max-width: 100%;
    overflow: hidden;
}

#timer .digit {
    display: inline-block;
    vertical-align: top;
    height: 40px;
    width: 30px;
    position: relative;
    margin: 0 2px;
    overflow: hidden;
    background: var(--input-background);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

#timer .digit-wrapper {
    transition: transform var(--transition-normal);
    position: relative;
}

#timer .digit-wrapper > div {
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 2em;
    color: var(--text-color);
}

#timer .symbol {
    display: inline-block;
    vertical-align: top;
    width: 20px;
    text-align: center;
    font-size: 2em;
    line-height: 40px;
    color: var(--text-color);
}

/* Responsive Timer für mobile Geräte */
@media (max-width: 768px) {
    #timer {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    #timer .digit {
        height: 30px;
        width: 22px;
        margin: 0 1px;
    }

    #timer .digit-wrapper > div {
        height: 30px;
        line-height: 30px;
        font-size: 1.5em;
    }

    #timer .symbol {
        width: 15px;
        font-size: 1.5em;
        line-height: 30px;
    }
}

@media (max-width: 480px) {
    #timer {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    #timer .digit {
        height: 25px;
        width: 18px;
        margin: 0 1px;
    }

    #timer .digit-wrapper > div {
        height: 25px;
        line-height: 25px;
        font-size: 1.2em;
    }

    #timer .symbol {
        width: 12px;
        font-size: 1.2em;
        line-height: 25px;
    }
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--background-tertiary, #222);
    color: var(--text-color, #e8e8e8);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
    padding: 18px 0 14px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--font-size-normal, 1em);
}
.cookie-banner-content {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0 18px;
}
.cookie-banner button {
    background: var(--primary-color, #d4af37);
    color: #222;
    border: none;
    border-radius: var(--radius-md, 8px);
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.cookie-banner button:hover {
    background: var(--primary-color-light, #f0d876);
}
.cookie-banner a {
    color: var(--accent-color, #ffd700);
    text-decoration: underline;
}

/* Modal Open - Disable Body Scroll */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}

body.modal-open::-webkit-scrollbar {
    display: none;
}

/* ===== Link Preview Tooltip (Twitch Chat) ===== */
.cr-link-preview-tooltip {
    position: fixed;
    z-index: 100000;
    max-width: 460px;
    background: rgba(20, 20, 40, 0.98);
    color: var(--text-color, #e8e8e8);
    border: 1px solid rgba(145, 70, 255, 0.35);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border-radius: 10px;
    padding: 10px;
    backdrop-filter: blur(2px);
    pointer-events: auto;
}
.cr-link-preview-tooltip .cr-lp-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.cr-link-preview-tooltip .cr-lp-thumb {
    width: 96px;
    height: 54px;
    border-radius: 8px;
    background: var(--dark-bg, #0f0f0f);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.08);
}
.cr-link-preview-tooltip .cr-lp-thumb.placeholder {
    display: block;
}
.cr-link-preview-tooltip .cr-lp-thumb.error {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(220,53,69,0.1);
    border: 1px solid rgba(220,53,69,0.4);
}
.cr-link-preview-tooltip .cr-lp-meta {
    min-width: 0;
    flex: 1;
}
.cr-link-preview-tooltip .cr-lp-title {
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    margin-top: 2px;
}
.cr-link-preview-tooltip .cr-lp-desc {
    margin-top: 6px;
    color: rgba(255,255,255,0.85);
    font-size: 0.92em;
    max-height: 3.7em;
    overflow: hidden;
}
.cr-link-preview-tooltip .cr-lp-host {
    margin-top: 6px;
    color: var(--text-color-secondary, #a0a0a0);
    font-size: 0.85em;
}

/* Skeleton Loader */
.cr-link-preview-tooltip .skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
}
.cr-link-preview-tooltip .skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    animation: cr-lp-shimmer 1.1s infinite;
}
@keyframes cr-lp-shimmer {
    100% { transform: translateX(100%); }
}

@media (max-width: 520px) {
    .cr-link-preview-tooltip {
        max-width: 92vw;
        padding: 8px;
    }
    .cr-link-preview-tooltip .cr-lp-thumb {
        width: 84px;
        height: 48px;
    }
}


.voting-category {
    margin: 40px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.voting-category h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(145, 70, 255, 0.5);
}

.voting-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.voting-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.voting-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(145, 70, 255, 0.3);
}

.voting-item.voted {
    border-color: #9146ff;
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.5);
}

.voting-item.voted::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: #9146ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.voting-item-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.3);
}

.voting-item-content {
    padding: 15px;
}

.voting-item-title {
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.voting-item-submitter {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.voting-item-channels {
    display: flex;
    gap: 10px;
    align-items: center;
}

.voting-channel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voting-channel-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(145, 70, 255, 0.5);
}

.voting-channel-name {
    font-weight: bold;
    color: #fff;
}

.login-required-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}

.voting-item:hover .login-required-overlay {
    opacity: 1;
}

.no-items-message {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(145, 70, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s ease;
}

.voting-item:hover .play-overlay {
    background: rgba(145, 70, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay i {
    font-size: 24px;
    color: white;
    margin-left: 4px;
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

.video-modal.show {
    display: block;
    overflow-x: hidden; /* Verhindere horizontales Scrollen */
}

.video-modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.95) 0%, rgba(20, 20, 40, 0.95) 100%);
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

/* Streamer Mode - Fullscreen */
.video-modal.streamer-mode .video-modal-content {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
}

.video-modal.streamer-mode .video-modal-close {
    z-index: 10002;
    right: 30px;
    top: 20px;
}

.streamer-mode-layout {
    display: grid;
    grid-template-columns: 1fr 500px;
    height: 100vh;
    gap: 0;
}

.streamer-mode-left {
    display: flex;
    flex-direction: column;
    background: #000;
    padding: 20px;
}

.streamer-mode-right {
    display: flex;
    flex-direction: column;
    background: rgba(30, 30, 50, 0.95);
    padding: 20px;
    gap: 20px;
    min-height: 0; /* Verhindere, dass der Container über 100vh wächst */
    overflow: hidden; /* Verhindere Überlauf */
}

.facecam-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.1) 0%, rgba(100, 50, 200, 0.1) 100%);
    border: 2px dashed rgba(145, 70, 255, 0.5);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0; /* Verhindere, dass die Facecam schrumpft */
}

.facecam-placeholder i {
    font-size: 3em;
    margin-bottom: 10px;
}

.facecam-placeholder p {
    font-size: 1.2em;
    margin: 0;
}

.twitch-chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    min-height: 0; /* Wichtig: Erlaubt dem Chat-Container zu schrumpfen */
}

.twitch-chat-header {
    background: rgba(145, 70, 255, 0.2);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    border-bottom: 1px solid rgba(145, 70, 255, 0.3);
}

.chat-status {
    margin-left: auto;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status.connected {
    color: #28a745;
}

.chat-status.disconnected {
    color: #dc3545;
}

.chat-status i {
    font-size: 0.7em;
}

.twitch-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0; /* Wichtig für Flexbox-Scrolling */
    max-height: 100%; /* Verhindert Überlauf */
}

/* ----------------------------------------------------------------- */
/* Angepasste Chat-Styles: Name und Nachricht als normaler Fließtext  */
/* ----------------------------------------------------------------- */
.chat-message {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid rgba(145, 70, 255, 0.5);
    animation: slideInChat 0.3s ease;
    display: block; /* kein Flex mehr, damit Text wie Fließtext umbricht */
    line-height: 1.4;
    word-break: break-word;
    transition: background 0.3s ease;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-badge {
    display: inline-block;
    font-size: 1em;
    margin-right: 6px;
    vertical-align: middle;
}

.chat-message-username {
    font-weight: bold;
    color: #9146ff;
    display: inline; /* Inline mit dem Nachrichten-Text */
    margin-right: 8px;
}

.chat-message-text {
    color: rgba(255, 255, 255, 0.9);
    display: inline; /* zusammen mit Username in einer Zeile */
    white-space: pre-wrap; /* Zeilenumbrüche innerhalb der Nachricht erhalten */
    word-break: break-word;
}

@keyframes slideInChat {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.twitch-chat-info {
    padding: 10px 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(145, 70, 255, 0.2);
}

.chat-reply-info {
    width: 100%;
}

#videoPlayerContainerStreamer {
    flex: 1;
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#videoPlayerContainerStreamer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.streamer-mode-info {
    margin-top: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.streamer-mode-info h3 {
    margin: 0;
    color: #fff;
    font-size: 1.3em;
    font-weight: bold;
}

.streamer-mode-controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.hidden {
    display: none !important;
}

/* Navigation Buttons in Streamer Mode */
.video-modal.streamer-mode .video-modal-nav {
    background: rgba(145, 70, 255, 0.9);
}

/* Normal Mode Styles */
.video-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
}

.video-modal-close:hover {
    color: #9146ff;
}

#videoPlayerContainer {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 10px;
}

#videoPlayerContainer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal-info {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.video-modal-info h3 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 1.5em;
}

.vote-button {
    background: linear-gradient(135deg, #9146ff 0%, #7b2ff7 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.vote-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(145, 70, 255, 0.5);
}

.vote-button:disabled {
    background: rgba(145, 70, 255, 0.3);
    cursor: not-allowed;
}

.vote-button.voted {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.video-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(145, 70, 255, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-nav:hover {
    background: rgba(145, 70, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.video-modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.video-modal-prev {
    left: 20px;
}

.video-modal-next {
    right: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.video-modal-content.slide-out-left {
    animation: slideOutLeft 0.2s ease-in-out forwards;
}

.video-modal-content.slide-out-right {
    animation: slideOutRight 0.2s ease-in-out forwards;
}

.video-modal-content.slide-in-left {
    animation: slideInLeft 0.2s ease-in-out forwards;
}

.video-modal-content.slide-in-right {
    animation: slideInRight 0.2s ease-in-out forwards;
}

@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 15px;
    }

    .video-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .video-modal-prev {
        left: 10px;
    }

    .video-modal-next {
        right: 10px;
    }
}

@media (max-width: 1200px) {
    .streamer-mode-layout {
        grid-template-columns: 1fr 400px;
    }
}

@media (max-width: 968px) {
    .streamer-mode-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }

    .streamer-mode-right {
        max-height: 40vh;
    }
}
:root {
    /* ensure good defaults if not already defined */
}

/* ===== Clip-Such-Popup: bessere Lesbarkeit ===== */
.cr-modal {
    /* overlay already inline; ensure stacking and font smoothing */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cr-modal .cr-modal-content {
    background: #111 !important;
    color: #f0f0f0 !important;
}

.cr-modal .cr-modal-header h3,
.cr-modal .form-label,
.cr-modal small,
.cr-modal label {
    color: #f0f0f0 !important;
}

/* Inputs and selects inside modal */
.cr-modal .tcs-input-row {
    background: transparent;
}
.cr-modal .tcs-input,
.cr-modal .form-select,
.cr-modal input[type="text"],
.cr-modal select,
.cr-modal textarea {
    background: #1d1d1d !important;
    color: #e8e8e8 !important;
    border: 1px solid #333 !important;
    outline: none;
}

.cr-modal .tcs-input::placeholder,
.cr-modal input::placeholder,
.cr-modal textarea::placeholder {
    color: #aaaaaa !important;
}

/* Clear button contrast */
.cr-modal .tcs-clear-btn {
    background: #2b2b2b !important;
    color: #ffffff !important;
    border: 1px solid #3a3a3a !important;
}
.cr-modal .tcs-clear-btn:hover {
    background: #383838 !important;
}

/* Results dropdown in modal */
.cr-modal .twitch-search-popup {
    background: #161616 !important;
    border-color: #2e2e2e !important;
}
.cr-modal .twitch-search-popup .list-group-item {
    color: #eaeaea !important;
}
.cr-modal .twitch-search-popup .list-group-item:hover,
.cr-modal .twitch-search-popup .list-group-item:focus {
    background: #242424 !important;
}
.cr-modal .twitch-search-popup .list-group-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

/* Primary action button inside modal */
.cr-modal .btn-primary,
.cr-modal #clipModalFetchBtn {
    background: #7c5cff !important;
    color: #fff !important;
    border: 1px solid #6a4df0 !important;
    padding: 10px 14px;
    border-radius: 8px;
}
.cr-modal .btn-primary:hover,
.cr-modal #clipModalFetchBtn:hover {
    background: #6a4df0 !important;
}

/* Hint text readability */
#clipModalHint {
    color: #c9c9c9 !important;
}

/* Clip card styling */
.cr-clip-card {
    background: #1a1a1a !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: #efefef !important;
}
.cr-clip-card:hover,
.cr-clip-card:focus {
    border-color: rgba(255,255,255,0.18) !important;
    box-shadow: 0 0 0 2px rgba(124,92,255,0.25);
}
.cr-clip-card .views-badge,
.cr-modal .cr-clip-card span {
    color: #f5f5f5 !important;
}

/* Scrollbar inside results for better visibility */
.cr-modal .twitch-search-popup::-webkit-scrollbar,
#clipModalResults::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.cr-modal .twitch-search-popup::-webkit-scrollbar-thumb,
#clipModalResults::-webkit-scrollbar-thumb {
    background: #3b3b3b;
    border-radius: 6px;
}
.cr-modal .twitch-search-popup::-webkit-scrollbar-track,
#clipModalResults::-webkit-scrollbar-track {
    background: #1b1b1b;
}

#channelClipResult {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

#channelClipResult:empty {
    display: none;
}