* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --prism-black: #0f0f0f;
    --prism-dark: #1a1a1a;
    --prism-gray: #2a2a2a;
    --prism-light-gray: #3a3a3a;
    --prism-accent: #4a4a4a;
    --prism-white: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    
    /* Prism Gradient Colors */
    --prism-purple: #8b5cf6;
    --prism-blue: #3b82f6;
    --prism-cyan: #06b6d4;
    --prism-emerald: #10b981;
    --prism-yellow: #f59e0b;
    --prism-orange: #f97316;
    --prism-pink: #ec4899;
    
    /* Main Gradient */
    --prism-gradient: linear-gradient(135deg, var(--prism-purple), var(--prism-blue), var(--prism-cyan));
    --prism-gradient-alt: linear-gradient(45deg, var(--prism-pink), var(--prism-orange), var(--prism-yellow));
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--prism-black);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* Header */
.header {
    height: 80px;
    background: var(--prism-dark);
    border-bottom: 1px solid var(--prism-gray);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex: 1;
}

.logo i {
    font-size: 2rem;
    background: var(--prism-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--prism-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--prism-gray);
    border-radius: 8px;
    background: var(--prism-gray);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--prism-purple);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--prism-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: var(--prism-gray);
    color: var(--text-primary);
    border: 1px solid var(--prism-light-gray);
}

.btn-secondary:hover {
    background: var(--prism-light-gray);
    transform: translateY(-2px);
}

/* Main Layout */
.main-container {
    height: calc(100vh - 80px);
    display: flex;
    max-width: 1800px;
    margin: 0 auto;
    background: var(--prism-black);
}

/* Panel System */
.panel {
    background: var(--prism-dark);
    border-right: 1px solid var(--prism-gray);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.panel:last-child {
    border-right: none;
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--prism-gray);
    background: var(--prism-gray);
    position: sticky;
    top: 0;
    z-index: 100;
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.panel-content {
    padding: 1rem;
}

.panel-back-button {
    margin-bottom: 1rem;
}

/* Left Panel - Categories */
.categories-panel {
    width: 280px;
    min-width: 250px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-item:hover,
.category-item.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(5px);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--prism-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Middle Panel - Channels/Content */
.content-panel {
    width: 380px;
    min-width: 320px;
}

.content-grid {
    display: grid;
    gap: 0.75rem;
}

.content-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--prism-gray);
    background: var(--prism-gray);
}

.content-item:hover,
.content-item.active {
    background: var(--prism-light-gray);
    border-color: var(--prism-purple);
    transform: scale(1.02);
}

.content-thumbnail {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    background: var(--prism-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

.content-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

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

.content-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.5rem;
}

.quality-badge {
    background: var(--prism-gradient);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.hevc-badge {
    background: var(--prism-gradient-alt);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Right Panel - Player */
.player-panel {
    flex: 1;
    min-width: 600px;
    display: flex;
    flex-direction: column;
}

.player-wrapper {
    flex: 1;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-container {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-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;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.player-overlay.show {
    opacity: 1;
}

.player-welcome {
    text-align: center;
    color: var(--text-secondary);
}

.player-welcome i {
    font-size: 4rem;
    background: var(--prism-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.player-welcome h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--prism-gray);
    border-top: 3px solid var(--prism-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Custom Video Controls */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.player-container:hover .custom-controls,
.custom-controls:hover {
    transform: translateY(0);
}

/* Fullscreen Controls */
.player-container:fullscreen .custom-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 1.5rem;
    z-index: 2147483647;
}

.player-container:-webkit-full-screen .custom-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 1.5rem;
    z-index: 2147483647;
}

.player-container:-moz-full-screen .custom-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 1.5rem;
    z-index: 2147483647;
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.progress-container {
    flex: 1;
    margin: 0 1rem;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--prism-gradient);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.progress-handle {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 80px;
}

.volume-slider input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.player-info {
    padding: 1rem 2rem;
    background: var(--prism-gray);
    border-top: 1px solid var(--prism-light-gray);
}

.current-playing {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.now-playing-info {
    flex: 1;
}

.now-playing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.now-playing-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Setup Panel */
.setup-panel {
    padding: 2rem;
    text-align: center;
    background: var(--prism-dark);
    border-radius: 12px;
    margin: 2rem;
}

.setup-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: var(--prism-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.setup-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.setup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.setup-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--prism-gray);
    border: 1px solid var(--prism-light-gray);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.setup-button:hover {
    background: var(--prism-light-gray);
    border-color: var(--prism-purple);
    transform: translateY(-5px);
}

.setup-button-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--prism-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.setup-button-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.setup-button-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

/* Content Type Selection Panel */
.content-type-panel {
    padding: 2rem;
    text-align: center;
    background: var(--prism-dark);
    border-radius: 12px;
    margin: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
}

.content-type-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: var(--prism-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-type-description {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.content-type-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.content-type-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem 2rem;
    background: var(--prism-gray);
    border: 2px solid var(--prism-light-gray);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-type-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--prism-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.content-type-button:hover::before {
    transform: scaleX(1);
}

.content-type-button:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--prism-purple);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
}

.content-type-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--prism-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.content-type-button:hover .content-type-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.content-type-button-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.content-type-button-description {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.content-type-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--prism-light-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

.content-type-back {
    margin-top: 2rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--prism-dark);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--prism-gray);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--prism-gray);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--prism-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--text-primary);
    background: var(--prism-gray);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--prism-gray);
    border-radius: 8px;
    background: var(--prism-gray);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--prism-purple);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .main-container {
        max-width: 100%;
    }
    
    .categories-panel {
        width: 260px;
    }
    
    .content-panel {
        width: 340px;
    }
}

@media (max-width: 1200px) {
    .categories-panel {
        width: 240px;
    }
    
    .content-panel {
        width: 320px;
    }
    
    .player-container {
        max-width: 700px;
    }
    
    .content-type-buttons {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        max-width: 100%;
    }
    
    .panel {
        width: 100% !important;
        height: auto;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid var(--prism-gray);
    }
    
    .categories-panel {
        height: 180px;
        overflow-x: auto;
    }
    
    .content-panel {
        height: 250px;
    }
    
    .player-panel {
        flex: 1;
        min-height: 300px;
        min-width: 0;
    }
    
    .player-wrapper {
        padding: 0.5rem;
    }
    
    .player-container {
        max-width: 100%;
        border-radius: 8px;
    }
    
    .custom-controls {
        padding: 0.5rem;
    }
    
    .controls-row {
        gap: 0.5rem;
    }
    
    .volume-container {
        display: none;
    }
    
    .content-type-buttons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content-type-panel {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
        flex-wrap: wrap;
        height: auto;
        min-height: 80px;
    }
    
    .search-container {
        width: 200px;
    }
    
    .panel-content {
        padding: 0.5rem;
    }
    
    .category-item,
    .content-item {
        padding: 0.75rem;
    }
    
    .categories-panel {
        height: 120px;
    }
    
    .content-panel {
        height: 200px;
    }
    
    .player-info {
        padding: 0.75rem 1rem;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .progress-container {
        margin: 0 0.5rem;
    }
    
    .content-type-button {
        padding: 2rem 1.5rem;
        gap: 1rem;
    }
    
    .content-type-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .content-type-button-title {
        font-size: 1.2rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--prism-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--prism-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--prism-gradient-alt);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Notification System */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--prism-gradient);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, var(--prism-emerald), var(--prism-cyan));
}

.notification.error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.notification.warning {
    background: linear-gradient(135deg, var(--prism-orange), var(--prism-yellow));
    color: var(--prism-black);
}

.notification.info {
    background: linear-gradient(135deg, var(--prism-blue), var(--prism-purple));
}/* === PERFORMANCE CSS ADDITIONS === */
/* Diese CSS-Regeln UNTEN an Ihre style.css ANHÄNGEN */

/* Virtual Scrolling */
.virtual-item {
    position: absolute;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--prism-gray);
    background: var(--prism-gray);
    box-sizing: border-box;
}

.virtual-item:hover {
    background: var(--prism-light-gray);
    border-color: var(--prism-purple);
    transform: scale(1.02);
}

/* Loading Skeleton */
.loading-skeleton {
    background: linear-gradient(90deg, 
        var(--prism-gray) 25%, 
        var(--prism-light-gray) 50%, 
        var(--prism-gray) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
    height: 80px;
    margin-bottom: 0.75rem;
}

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

/* Progress Indicator für Parsing */
.parsing-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    border: 1px solid var(--prism-purple);
}

.parsing-progress .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--prism-gray);
    border-top: 3px solid var(--prism-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Improved Content Grid für Virtual Scrolling */
.content-grid.virtual-container {
    position: relative;
    overflow-y: auto;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--prism-purple) var(--prism-dark);
}

/* Smooth Scrolling */
.content-grid.virtual-container {
    scroll-behavior: smooth;
}

/* Performance: Hardware Acceleration */
.content-item,
.category-item,
.virtual-item {
    will-change: transform;
    transform: translateZ(0);
}

/* Memory-friendly animations */
@media (prefers-reduced-motion: reduce) {
    .content-item,
    .category-item,
    .virtual-item,
    .loading-skeleton {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimized for large lists */
.content-grid {
    contain: layout style paint;
}

.content-item {
    contain: layout style paint;
}

/* Search Results Highlighting */
.search-highlight {
    background: rgba(139, 92, 246, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Progress Bar für Batch Loading */
.batch-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--prism-dark);
    z-index: 10000;
}

.batch-progress-fill {
    height: 100%;
    background: var(--prism-gradient);
    width: 0%;
    transition: width 0.3s ease;
}

/* Preloader indicators */
.channel-preloaded::after {
    content: "✓";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 16px;
    height: 16px;
    background: var(--prism-emerald);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

/* Lazy Loading Image States */
.content-thumbnail img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-thumbnail img.loaded {
    opacity: 1;
}

.content-thumbnail img.error {
    display: none;
}

/* Enhanced Error States */
.stream-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #dc3545;
}

.stream-error .error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stream-error .error-message {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stream-error .error-details {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Memory Usage Indicator (Development) */
.memory-indicator {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    z-index: 1000;
    display: none; /* Nur in Development anzeigen */
}

/* Optimized Focus States */
.content-item:focus,
.category-item:focus,
.virtual-item:focus {
    outline: 2px solid var(--prism-purple);
    outline-offset: 2px;
}

/* Reduced Motion Alternative */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .slide-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* High Performance Mode */
.performance-mode .content-item {
    transition: none;
}

.performance-mode .category-item {
    transition: none;
}

.performance-mode .virtual-item {
    transition: none;
}

/* Improved Scrollbar for Virtual Lists */
.content-grid::-webkit-scrollbar {
    width: 12px;
}

.content-grid::-webkit-scrollbar-track {
    background: var(--prism-dark);
    border-radius: 6px;
}

.content-grid::-webkit-scrollbar-thumb {
    background: var(--prism-gradient);
    border-radius: 6px;
    border: 2px solid var(--prism-dark);
}

.content-grid::-webkit-scrollbar-thumb:hover {
    background: var(--prism-gradient-alt);
}

/* Intersection Observer Loading States */
.content-item.loading {
    opacity: 0.5;
    transform: scale(0.95);
}

.content-item.loaded {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* Batch Loading Indicator */
.batch-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(139, 92, 246, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 1000;
}

/* Cache Status Indicators */
.cached-item::before {
    content: "⚡";
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Network Status */
.offline-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 9999;
    display: none;
}

.offline-indicator.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}
/* === style.css - Zusätzliche CSS-Regeln für Mixed Content Warnings (AM ENDE ANHÄNGEN) === */

/* Mixed Content Warning */
.mixed-content-warning {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    z-index: 9998;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(243, 156, 18, 0.3);
    animation: slideDown 0.5s ease;
}

.mixed-content-warning .warning-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.mixed-content-warning .warning-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.mixed-content-warning .warning-message {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* CORS Error Styles */
.cors-error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-left: 4px solid #c0392b;
}

.cors-error::before {
    content: "🔒";
    margin-right: 0.5rem;
}

/* Proxy Status Indicator */
.proxy-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1000;
    display: none;
}

.proxy-status.active {
    display: block;
    background: rgba(46, 204, 113, 0.9);
}

.proxy-status.error {
    display: block;
    background: rgba(231, 76, 60, 0.9);
}

/* Loading states for proxy requests */
.proxy-loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

/* Error recovery buttons */
.error-recovery {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.error-recovery .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Improved error messages */
.error-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.error-message.warning {
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.error-message.info {
    border-left-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

/* Connection status indicator */
.connection-status {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #95a5a6;
}

.connection-status.online {
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.5);
}

.connection-status.error {
    background: #e74c3c;
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.5);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .mixed-content-warning {
        top: 80px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .proxy-status {
        bottom: 80px;
        left: 10px;
        right: 10px;
        text-align: center;
    }
}