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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 40px;
}

.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
    user-select: none;
    -webkit-user-select: none;
}

.upload-area:hover {
    background: #f0f2ff;
    border-color: #764ba2;
    transform: translateY(-2px);
}

.upload-area.dragover {
    background: #e8ebff;
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-icon {
    color: #667eea;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.upload-subtext {
    color: #666;
    font-size: 0.9em;
}

.queue-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.queue-section h3 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 1.2em;
}

.queue-status {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.queue-count {
    color: #666;
    margin-bottom: 10px;
}

.queue-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.queue-items li {
    padding: 8px 12px;
    background: white;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    color: #333;
    word-break: break-all;
}

.video-preview-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.video-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.video-container h3 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 1.2em;
}

.video-container video {
    width: 100%;
    border-radius: 10px;
    background: #000;
}

.video-name {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    word-break: break-all;
}

.processing-status {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    color: #667eea;
    font-weight: 600;
}

.progress-section {
    margin-bottom: 30px;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.progress-text {
    text-align: center;
    color: #666;
    font-weight: 500;
}

.download-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.download-btn:active {
    transform: translateY(0);
}

.info-section {
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

details {
    cursor: pointer;
}

summary {
    font-weight: 600;
    font-size: 1.1em;
    color: #667eea;
    padding: 10px;
    user-select: none;
}

summary:hover {
    color: #764ba2;
}

.info-content {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    line-height: 1.6;
}

.info-content ul {
    margin: 15px 0 15px 20px;
}

.info-content li {
    margin: 8px 0;
}

.processed-videos-section {
    margin-bottom: 30px;
}

.processed-videos-section h3 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.3em;
}

.processed-videos-list {
    margin-top: 15px;
}

.processed-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.processed-video-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.processed-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.processed-video-preview {
    margin-bottom: 15px;
}

.processed-video-preview video {
    width: 100%;
    border-radius: 10px;
    background: #000;
    max-height: 200px;
}

.processed-video-info {
    text-align: center;
}

.processed-video-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-break: break-all;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.processed-video-size {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.processed-video-date {
    color: #999;
    font-size: 0.8em;
    margin-bottom: 12px;
}

.download-btn-small {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.download-btn-small:active {
    transform: translateY(0);
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .video-preview-section {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2em;
    }

    main {
        padding: 20px;
    }
    
    .processed-videos-grid {
        grid-template-columns: 1fr;
    }
}

