/* ============================================
   BASIS
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1d21;
    color: #e9ecef;
    overflow-x: hidden;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar-brand {
    font-weight: 600;
    color: #fff !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.88);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* ============================================
   CARDS
   ============================================ */
.card.bg-secondary {
    background: #262b30 !important;
    border: 1px solid #363c42;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    color: #e9ecef;
}

.card.bg-secondary > .card-header {
    background: #2d3339;
    border-bottom: 1px solid #3a4148;
    color: #f1f3f5;
}

.card.bg-secondary > .card-body {
    color: #e9ecef;
}

.card.bg-secondary .card-header h5,
.card.bg-secondary .card-header h6 {
    color: #f1f3f5;
    font-weight: 600;
}

.card.bg-secondary .text-muted {
    color: #a4adb6 !important;
}

.card.bg-secondary small {
    color: #a4adb6;
}

/* ============================================
   TABELLEN
   ============================================ */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-color: #e9ecef;
    --bs-table-border-color: #3a4048;
    --bs-table-striped-bg: rgba(255,255,255,0.03);
    --bs-table-hover-bg: rgba(255,255,255,0.06);
    --bs-table-hover-color: #fff;
    color: #e9ecef;
}

.table-dark th {
    color: #f1f3f5;
    border-color: #3a4048;
}

.table-dark td {
    color: #e9ecef;
    border-color: #3a4048;
    vertical-align: middle;
}

.table-dark strong {
    color: #fff;
}

.table-dark .form-control,
.table-dark .form-select {
    background: #1e2227;
    border-color: #495057;
    color: #f1f3f5;
}

.table-dark .form-control::placeholder {
    color: #8b95a1;
}

.table-dark .form-control:focus,
.table-dark .form-select:focus {
    background: #1e2227;
    border-color: #0d6efd;
    color: #f1f3f5;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.3);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    color: #f1f3f5;
    border-width: 1px;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.15);
    border-color: rgba(13, 202, 240, 0.4);
    color: #b8d4ff !important;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.4);
    color: #a7e9c3 !important;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffe69c !important;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
    color: #f5c2c7 !important;
}

.alert-secondary {
    background-color: rgba(108, 117, 125, 0.2);
    border-color: rgba(108, 117, 125, 0.4);
    color: #e9ecef !important;
}

.alert strong {
    color: #fff;
}

.alert code {
    color: #ffd9a3;
    background: rgba(255,255,255,0.08);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
}

.alert a {
    color: #9ec5fe;
}

.alert a:hover {
    color: #cfe2ff;
}

/* ============================================
   SUCHFELD
   ============================================ */
.search-box {
    position: relative;
    width: 100%;
}

.search-box input[type="search"] {
    padding-right: 35px;
    background: #1e2227;
    border: 1px solid #495057;
    color: #f1f3f5;
    border-radius: 8px;
    height: 36px;
    font-size: 0.85rem;
}

.search-box input[type="search"]::placeholder {
    color: #8b95a1;
}

.search-box input[type="search"]:focus {
    background: #1e2227;
    border-color: #0d6efd;
    color: #f1f3f5;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.3);
}

.search-box input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #8b95a1;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    display: none;
    line-height: 1;
    transition: all 0.15s;
}

.search-clear.visible {
    display: block;
}

.search-clear:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.search-result-info {
    font-size: 0.75rem;
    color: #adb5bd;
    text-align: center;
    padding: 6px;
    background: #1e2227;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* ============================================
   SOURCE PLAYLIST
   ============================================ */
.source-channels {
    max-height: 75vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 5px;
    border-radius: 8px;
    background: #1e2227;
}

.channel-card {
    background: #32383e;
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 12px;
    transition: all 0.2s;
    position: relative;
    border: 1px solid #3d444b;
    cursor: pointer;
    overflow: hidden;
}

.channel-card:hover {
    background: #3a4148;
    transform: translateY(-1px);
    border-color: #4d545c;
}

.channel-card:active {
    transform: translateY(0);
}

.channel-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fb;
    padding: 3px;
    flex-shrink: 0;
}

.channel-info {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.channel-card .channel-name,
.channel-card .channel-group {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.channel-name {
    font-weight: 600;
    color: #f1f3f5;
    font-size: 0.9rem;
    line-height: 1.2;
}

.channel-group {
    font-size: 0.75rem;
    color: #a4adb6;
    margin-top: 3px;
}

.channel-card .add-btn {
    flex-shrink: 0;
}

/* ============================================
   ADD-BUTTON STATES
   ============================================ */
.add-btn {
    min-width: 36px;
    font-weight: bold;
    transition: all 0.2s;
}

.add-btn.added-check {
    background: #20a464 !important;
    border-color: #20a464 !important;
    color: #fff !important;
    opacity: 0.9;
    cursor: default;
    padding: 4px 10px;
    font-size: 1rem;
}

.add-btn.added-check:disabled {
    opacity: 0.9;
}

.channel-card.is-added {
    background: #24382c;
    border-color: #20a464;
}

.channel-card.is-added:hover {
    background: #24382c;
    transform: none;
    border-color: #20a464;
}

/* ============================================
   MEINE PLAYLIST
   ============================================ */
.playlist-container {
    padding: 0;
    background: transparent;
    max-height: 75vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    width: 100%;
}

.playlist-info {
    padding: 8px 12px;
    background: #1e2227;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.85rem;
    color: #e9ecef;
}

.playlist-info .text-muted,
.playlist-info small {
    color: #a4adb6 !important;
}

.playlist-item {
    display: flex;
    align-items: center;
    background: #2b3035;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    gap: 10px;
    border: 1px solid #3a4048;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    min-width: 0;
}

.playlist-item:hover {
    background: #333940;
    border-color: #4a5159;
}

.playlist-item .item-number {
    min-width: 34px !important;
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.4);
    line-height: 1;
    visibility: visible !important;
    opacity: 1 !important;
    border: none;
    padding: 0;
    cursor: pointer;
}

.item-handle {
    color: #8b95a1;
    font-size: 1.4rem;
    cursor: grab;
    padding: 4px 2px;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    flex-shrink: 0;
    transition: color 0.2s;
    font-weight: bold;
}

.item-handle:hover,
.item-handle:active {
    color: #4d9fff;
}

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

.item-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8f9fb;
    padding: 3px;
    flex-shrink: 0;
}

.item-info {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.item-name {
    font-weight: 600;
    color: #f1f3f5;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.item-group {
    font-size: 0.72rem;
    color: #a4adb6;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-remove {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: rgba(220, 53, 69, 0.18);
    color: #ff6b78;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.item-remove:hover {
    background: #dc3545;
    color: white;
}

.item-remove:active {
    transform: scale(0.9);
}

.empty-playlist {
    text-align: center;
    padding: 50px 15px;
    color: #8b95a1;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ced4da;
    margin-bottom: 8px;
}

.empty-text {
    font-size: 0.9rem;
    color: #8b95a1;
}

/* ============================================
   EXPORT-PANEL
   ============================================ */
.export-panel {
    background: #1e3a5f;
    border: 1px solid #2d5a8a;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    animation: fadeIn 0.2s ease;
    color: #d7e8ff;
}

.export-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.export-close {
    background: transparent;
    border: none;
    color: #d7e8ff;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 6px;
    border-radius: 4px;
}

.export-close:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.export-panel-desc {
    font-size: 0.75rem;
    color: #b8d4ff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.export-url-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.export-url-row input {
    flex: 1 1 200px;
    min-width: 0;
    background: #0f1e2e;
    color: #e9ecef;
    border: 1px solid #2d5a8a;
    font-family: monospace;
    font-size: 0.78rem;
}

.export-url-row input:focus {
    background: #0f1e2e;
    color: #e9ecef;
    border-color: #4d9fff;
    box-shadow: 0 0 0 0.15rem rgba(77, 159, 255, 0.25);
}

.export-url-row .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    color: #fff;
}

.btn-success {
    color: #fff;
}

.btn-danger {
    color: #fff;
}

.btn-warning {
    color: #000;
    font-weight: 500;
}

.btn-warning:hover {
    color: #000;
}

.btn-info {
    color: #000;
    font-weight: 500;
}

.btn-info:hover {
    color: #000;
}

.btn-secondary {
    color: #fff;
}

.btn-outline-info {
    color: #3dd5f3;
    border-color: #3dd5f3;
}

.btn-outline-info:hover {
    background: #0dcaf0;
    color: #000;
}

.btn-outline-danger {
    color: #ff6b78;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: #fff;
}

.btn-outline-light {
    color: #e9ecef;
    border-color: #adb5bd;
}

.btn-outline-light:hover {
    background: #e9ecef;
    color: #212529;
}

/* ============================================
   BADGES
   ============================================ */
.badge.bg-primary {
    color: #fff;
}

.badge.bg-warning {
    color: #000 !important;
}

.badge.bg-success {
    color: #fff;
}

.badge.bg-info {
    color: #000;
}

.badge.bg-secondary {
    color: #fff;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content.bg-dark {
    background: #262b30 !important;
    color: #e9ecef;
    border: 1px solid #3a4048;
}

.modal-content.bg-dark .modal-header {
    border-bottom-color: #3a4048;
    color: #f1f3f5;
}

.modal-content.bg-dark .modal-footer {
    border-top-color: #3a4048;
}

.modal-content.bg-dark .modal-body {
    color: #e9ecef;
}

.modal-content.bg-dark .text-muted {
    color: #a4adb6 !important;
}

.modal-content.bg-dark .form-control {
    background: #1e2227;
    border-color: #495057;
    color: #f1f3f5;
}

.modal-content.bg-dark .form-control:focus {
    background: #1e2227;
    border-color: #0d6efd;
    color: #f1f3f5;
}

.modal-content.bg-dark .form-control::placeholder {
    color: #8b95a1;
}

/* ============================================
   EPG STATUS KARTEN
   ============================================ */
#epgStatusCard,
#epgInfoCard {
    color: #f1f3f5;
}

#epgStatusCard .card-body,
#epgInfoCard .card-body {
    color: #f1f3f5;
}

#epgStatusCard strong,
#epgInfoCard strong {
    color: #ffffff;
}

#epgStatusCard .text-muted,
#epgInfoCard .text-muted,
#epgStatusText,
#epgInfoText,
#epgInfoTime {
    color: #a4adb6 !important;
}

#epgStatusCard .badge.bg-warning,
#epgInfoCard .badge.bg-warning {
    color: #000 !important;
}

#epgElapsed {
    color: #000 !important;
    font-weight: 600;
    min-width: 50px;
}

#epgRebuildBtn {
    color: #000;
    font-weight: 500;
}

#epgRebuildBtn:disabled {
    color: #000;
    opacity: 0.8;
}

#epgSpinner {
    color: #ffc107;
}

/* ============================================
   FORMULARE
   ============================================ */
.form-control,
.form-select {
    background: #1e2227;
    border-color: #495057;
    color: #f1f3f5;
}

.form-control:focus,
.form-select:focus {
    background: #1e2227;
    border-color: #0d6efd;
    color: #f1f3f5;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.3);
}

.form-control::placeholder {
    color: #8b95a1;
}

.form-label {
    color: #e9ecef;
}

/* ============================================
   SORTABLEJS STATES
   ============================================ */
.sortable-ghost {
    opacity: 0.35;
    background: #1e4976 !important;
    border: 2px dashed #4d9fff !important;
}

.sortable-chosen {
    background: #333940 !important;
}

.sortable-drag,
.sortable-fallback {
    opacity: 0.95 !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6) !important;
    background: #3a4148 !important;
    border: 2px solid #4d9fff !important;
}

/* ============================================
   TOAST / SPINNER
   ============================================ */
.toast-message,
.toast-message.alert,
.toast-message.alert-success,
.toast-message.alert-warning,
.toast-message.alert-danger,
.toast-message.alert-info,
.toast-message.alert-secondary {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 250px;
    max-width: 90vw;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
    font-weight: 600;
    font-size: 0.95rem;
    border-width: 2px !important;
    border-style: solid !important;
    padding: 14px 18px;
    border-radius: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Kräftige, opake Farben – mit !important um Bootstrap-Alerts zu überschreiben */
.toast-message.alert-success {
    background-color: #0f5132 !important;
    background-image: none !important;
    border-color: #20a464 !important;
    color: #ffffff !important;
}

.toast-message.alert-warning {
    background-color: #664d03 !important;
    background-image: none !important;
    border-color: #ffc107 !important;
    color: #ffffff !important;
}

.toast-message.alert-danger {
    background-color: #58151c !important;
    background-image: none !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.toast-message.alert-info {
    background-color: #055160 !important;
    background-image: none !important;
    border-color: #0dcaf0 !important;
    color: #ffffff !important;
}

.toast-message.alert-secondary {
    background-color: #41464b !important;
    background-image: none !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

/* Auch wenn Toast keine alert-Klasse hat */
.toast-message:not([class*="alert-"]) {
    background-color: #41464b !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

.toast-message strong {
    color: #ffffff !important;
}

/* Text explizit hell – verhindert, dass eine andere Regel die Farbe überschreibt */
.toast-message,
.toast-message * {
    color: #ffffff !important;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
}

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

/* ============================================
   ALERTS (Bootstrap) – normale Alerts, NICHT Toast
   ============================================ */
.alert:not(.toast-message) {
    color: #f1f3f5;
    border-width: 1px;
}

.alert-info:not(.toast-message) {
    background-color: rgba(13, 202, 240, 0.15);
    border-color: rgba(13, 202, 240, 0.4);
    color: #b8d4ff !important;
}

.alert-success:not(.toast-message) {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.4);
    color: #a7e9c3 !important;
}

.alert-warning:not(.toast-message) {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffe69c !important;
}

.alert-danger:not(.toast-message) {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
    color: #f5c2c7 !important;
}

.alert-secondary:not(.toast-message) {
    background-color: rgba(108, 117, 125, 0.2);
    border-color: rgba(108, 117, 125, 0.4);
    color: #e9ecef !important;
}

.alert:not(.toast-message) strong {
    color: #fff;
}

.alert:not(.toast-message) code {
    color: #ffd9a3;
    background: rgba(255,255,255,0.08);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
}

.alert:not(.toast-message) a {
    color: #9ec5fe;
}

.alert:not(.toast-message) a:hover {
    color: #cfe2ff;
}

/* ============================================
   POSITIONS-EINGABE
   ============================================ */
.playlist-item .item-number.editing {
    background: #1e2227 !important;
    box-shadow: 0 0 0 2px #4d9fff;
    min-width: 90px !important;
    width: auto !important;
    transform: scale(1.05);
    padding: 0;
    cursor: default;
}

.position-edit-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    width: 100%;
}

.position-input {
    width: 45px;
    background: transparent;
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    outline: none;
    padding: 2px;
    line-height: 1;
    -moz-appearance: textfield;
}

.position-input:focus {
    outline: none;
    color: #4d9fff;
}

.position-save-btn {
    background: #20a464;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 7px;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.position-save-btn:hover {
    background: #1a8a53;
}

.position-save-btn:active {
    transform: scale(0.9);
}

@keyframes positionPulse {
    0% {
        background: #0d6efd;
        transform: scale(1.03);
        box-shadow: 0 0 20px rgba(13, 110, 253, 0.6);
    }
    100% {
        background: #2b3035;
        transform: scale(1);
        box-shadow: none;
    }
}

.playlist-item.position-highlight {
    animation: positionPulse 1s ease;
    border-color: #4d9fff !important;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e2227;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #4a5159;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6268;
}

/* ============================================
   MOBILE OPTIMIERUNG
   ============================================ */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    
    .card-body {
        padding: 0.5rem !important;
    }
    
    .card-header {
        padding: 0.5rem 0.75rem !important;
    }
    
    .channel-card {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .channel-logo {
        width: 44px;
        height: 44px;
    }
    
    .channel-name {
        font-size: 0.85rem;
    }
    
    .channel-group {
        font-size: 0.7rem;
    }
    
    .add-btn {
        min-width: 40px;
        min-height: 40px;
        font-size: 1.1rem;
        padding: 4px 10px;
    }
    
    .playlist-item {
        padding: 8px;
        gap: 8px;
        margin-bottom: 6px;
        border-radius: 8px;
    }
    
    .playlist-item .item-number {
        min-width: 30px !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem;
    }
    
    .item-handle {
        font-size: 1.5rem;
        padding: 6px 2px;
        color: #8b95a1;
    }
    
    .item-logo {
        width: 36px;
        height: 36px;
    }
    
    .item-name {
        font-size: 0.85rem;
    }
    
    .item-group {
        font-size: 0.68rem;
    }
    
    .item-remove {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .playlist-container {
        max-height: 55vh;
    }
    
    .source-channels {
        max-height: 45vh;
    }
    
    .playlist-info {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    #saveBtn {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    .card-header h5,
    .card-header h6 {
        font-size: 0.95rem;
    }
    
    .search-box input[type="search"] {
        height: 38px;
        font-size: 0.9rem;
    }
    
    .export-url-row {
        flex-direction: column;
    }
    
    .export-url-row input {
        flex: 1 1 auto;
    }
    
    .export-url-row .btn {
        width: 100%;
    }
    
    /* Mobile Toasts etwas kleiner */
    .toast-message {
        min-width: 200px;
        padding: 12px 14px;
        font-size: 0.9rem;
        top: 12px;
        right: 12px;
    }
}

/* ============================================
   HOCHKANT (Portrait)
   ============================================ */
@media (max-width: 768px) and (orientation: portrait) {
    .playlist-container {
        max-height: 55vh;
        min-height: 200px;
    }
    
    .source-channels {
        max-height: 45vh;
        min-height: 150px;
    }
}

/* ============================================
   QUERFORMAT (Landscape)
   ============================================ */
@media (max-width: 900px) and (orientation: landscape) {
    .playlist-container {
        max-height: 65vh;
    }
    
    .source-channels {
        max-height: 55vh;
    }
}

/* ============================================
   SEHR SCHMALE BILDSCHIRME
   ============================================ */
@media (max-width: 400px) {
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .playlist-item .item-number {
        min-width: 26px !important;
        width: 26px !important;
        height: 26px !important;
        font-size: 0.7rem;
    }
    
    .item-logo {
        width: 30px;
        height: 30px;
    }
    
    .item-handle {
        font-size: 1.3rem;
    }
    
    .item-remove {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .item-name {
        font-size: 0.8rem;
    }
    
    .item-group {
        font-size: 0.65rem;
    }
    
    .channel-logo {
        width: 38px;
        height: 38px;
    }
    
    .channel-name {
        font-size: 0.8rem;
    }
    
    .add-btn {
        min-width: 36px;
        min-height: 36px;
        font-size: 1rem;
    }
    
    .playlist-container {
        max-height: 50vh;
    }
    
    .source-channels {
        max-height: 40vh;
    }
}

/* ============================================
   ANIMATIONEN
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.playlist-item,
.channel-card,
.export-panel {
    animation: fadeIn 0.2s ease;
}