/* Yvonne Web Video Platform - Styles - Updated for Unified Video List */
/* 2025-08-19: Upload-Info Styling für Upload-Liste hinzugefügt */

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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* Zeitanzeige */
.time-display {
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
}

.time-display.time-warning {
    background: rgba(220, 53, 69, 0.8);
}

/* Zeit-abgelaufen-Overlay */
.time-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
    font-size: 36px;
    font-weight: bold;
}

/* Progress-Dialog */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.progress-dialog {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.progress-item {
    margin-bottom: 15px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* Error-Dialog */
.error-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.error-dialog {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.error-dialog-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.error-dialog-msg {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
    word-break: break-word;
}

.progress-track {
    width: 100%;
    height: 18px;
    background: #e9ecef;
    border-radius: 9px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 9px;
    transition: width 0.5s ease;
}

.user-info {
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Login */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    margin: 100px auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="file"],
input[type="number"],
select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

/* Upload Info Styling (NEU) */
.upload-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-icon {
    padding: 6px 10px;
    font-size: 16px;
    line-height: 1;
    background: #f1f3f5;
    color: #333;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.btn-icon:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-icon-danger:hover {
    background: #fde8ea;
    border-color: #dc3545;
}

/* Video Sections */
.video-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.section-title {
    font-size: 24px;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    margin: 0;
}

/* Video Count Info */
.video-count-info {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.total-count {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.type-counts {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.youtube-count {
    color: #dc3545;
    font-weight: bold;
    padding: 4px 8px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
}

.local-count {
    color: #28a745;
    font-weight: bold;
    padding: 4px 8px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
}

/* Ordner-Navigation */
.folder-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.folder-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.folder-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.folder-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.folder-btn-add {
    border-style: dashed;
    color: #999;
}

.folder-btn-add:hover {
    color: #667eea;
    border-color: #667eea;
}

/* Ordner-Admin */
.folder-admin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.folder-admin-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.btn-small {
    padding: 3px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
}

.btn-small:hover {
    border-color: #667eea;
}

.btn-small-danger:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.video-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    position: relative;
}

.video-item:hover {
    transform: translateY(-5px);
}

/* Video Type Badges */
.video-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.youtube-badge {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.local-badge {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.video-player {
    width: 100%;
    height: 200px;
    background: #000;
    position: relative;
}

/* Thumbnail mit Play-Overlay */
.video-thumbnail {
    width: 100%;
    height: 200px;
    background: #000;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    pointer-events: none;
    transition: background 0.3s;
}

.video-thumbnail:hover .play-overlay {
    background: rgba(102, 126, 234, 0.8);
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.3;
}

.video-date {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.video-filesize {
    color: #999;
    font-size: 11px;
    margin-bottom: 10px;
    font-style: italic;
}

.video-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Video Type Specific Styling */
.youtube-video {
    border-left: 4px solid #dc3545;
}

.local-video {
    border-left: 4px solid #28a745;
}

/* Admin Panel */
.admin-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.add-video-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
}

/* Messages */
.error-message {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.success-message {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.info-message {
    color: #0c5460;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.msg-dismiss {
    margin-left: 15px;
    padding: 2px 12px;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 13px;
}

.msg-dismiss:hover {
    opacity: 0.7;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #000;
    padding: 0;
    border-radius: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .video-count-info {
        width: 100%;
        justify-content: space-between;
    }

    .type-counts {
        gap: 10px;
    }

    .container {
        padding: 10px;
    }

    .upload-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Empty State */
.video-grid:empty::after {
    content: "🔭 Noch keine Videos vorhanden";
    display: block;
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
}