.video-input-area { margin-bottom: 20px; }
.video-input-area label { display: block; margin-bottom: 10px; color: #444; font-weight: 500; }
.video-input-area input[type="text"] { width: 100%; padding: 14px 16px; border: 2px solid #e0e0e0; border-radius: 12px; font-size: 14px; outline: none; transition: border-color 0.3s; }
.video-input-area input[type="text"]:focus { border-color: #667eea; }
.video-input-area input[type="text"]::placeholder { color: #aaa; }
.video-input-area input[type="text"].invalid { border-color: #e57373; background: #fff8f8; }
.video-input-area input[type="text"].valid { border-color: #81c784; background: #f8fff8; }

.format-select { margin-bottom: 20px; }
.format-select > label { display: block; margin-bottom: 10px; color: #444; font-weight: 500; }
.format-options { display: flex; gap: 10px; }
.format-option { flex: 1; display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #f5f5f5; border-radius: 10px; cursor: pointer; transition: all 0.2s; }
.format-option:hover { background: #eee; }
.format-option input[type="radio"] { accent-color: #667eea; }
.format-option span { font-size: 14px; color: #444; }

.video-status { margin-top: 20px; padding: 15px; border-radius: 10px; font-size: 14px; display: none; }
.video-status.info { display: block; background: #e3f2fd; color: #1565c0; }
.video-status.success { display: block; background: #e8f5e9; color: #2e7d32; }
.video-status.error { display: block; background: #ffebee; color: #c62828; }
.video-status.loading { display: flex; align-items: center; gap: 10px; background: #fff3e0; color: #e65100; }
.video-status.loading::before { content: ''; width: 16px; height: 16px; border: 2px solid #e65100; border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }

.result-item.video-result { flex-direction: column; align-items: flex-start; gap: 12px; padding: 15px; }
.result-item.video-result .result-info { width: 100%; padding-right: 20px; }
.result-item.video-result .result-name { font-size: 15px; word-break: break-word; }

.video-buttons { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.video-file-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: white; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.video-file-btn:hover:not(:disabled) { background: #f5f5f5; border-color: #bbb; }
.video-file-btn .file-icon { font-size: 16px; }
.video-file-btn .file-label { color: #333; font-weight: 500; }
.video-file-btn .download-icon { color: #666; }
.video-file-btn.download-all-btn { background: #4caf50; border-color: #4caf50; }
.video-file-btn.download-all-btn .file-label { color: white; }
.video-file-btn.download-all-btn .download-icon { color: white; }
.video-file-btn.download-all-btn:hover:not(:disabled) { background: #43a047; border-color: #43a047; }
.video-file-btn:disabled, .video-file-btn.downloaded { background: #f0f0f0; border-color: #ddd; cursor: not-allowed; opacity: 0.7; }
.video-file-btn.downloaded .file-label { color: #999; }
.video-file-btn.downloaded .download-icon { display: none; }

.checkbox-option { display: flex; align-items: center; gap: 10px; margin: 15px 0; padding: 12px 16px; background: #f5f5f5; border-radius: 10px; cursor: pointer; }
.checkbox-option:hover { background: #eee; }
.checkbox-option input[type="checkbox"] { width: 18px; height: 18px; accent-color: #667eea; cursor: pointer; }
.checkbox-option span { font-size: 14px; color: #444; }
.checkbox-option.compact { padding: 8px 12px; margin: 8px 0; }
.checkbox-option.compact span { font-size: 13px; }

.resourcepack-options { background: #f5f5f5; border-radius: 10px; padding: 15px; margin-bottom: 15px; }
.resourcepack-options .input-group { margin-bottom: 12px; }
.resourcepack-options .input-group:last-child { margin-bottom: 0; }
.resourcepack-options label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 500; }
.resourcepack-options input[type="text"] { width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; outline: none; transition: border-color 0.3s; }
.resourcepack-options input[type="text"]:focus { border-color: #667eea; }

.update-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 8px; color: #666; font-size: 13px; cursor: pointer; transition: all 0.2s; margin-top: 15px; }
.update-btn:hover { background: #eee; border-color: #ccc; }
.update-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.copyright { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: #999; }
.copyright .heart { color: #e74c3c; animation: heartbeat 1.5s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.copyright a { color: #667eea; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.copyright a:hover { color: #764ba2; }

.progress-bar { width: 100%; height: 4px; background: #e0e0e0; border-radius: 2px; margin-top: 10px; overflow: hidden; }
.progress-bar .progress { height: 100%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 2px; transition: width 0.3s ease; }

.download-progress { margin-top: 15px; padding: 15px; background: #f5f5f5; border-radius: 10px; }
.download-progress .progress-text { font-size: 14px; color: #666; margin-bottom: 8px; }
.download-progress .progress-bar { height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden; flex: 1; }
.download-progress .progress-fill { height: 100%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 4px; transition: width 0.3s ease; }
.download-progress.dual-progress { padding: 20px; }
.download-progress .progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.download-progress .progress-row:last-of-type { margin-bottom: 15px; }
.download-progress .progress-label { font-size: 13px; color: #555; font-weight: 500; min-width: 55px; }
.download-progress .progress-percent { font-size: 13px; color: #667eea; font-weight: 600; min-width: 40px; text-align: right; }
.download-progress .progress-status { font-size: 13px; color: #888; text-align: center; padding-top: 10px; border-top: 1px solid #e0e0e0; }
.download-progress .video-fill { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.download-progress .audio-fill { background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%); }

.theme-toggle { position: absolute; top: 15px; right: 15px; background: #f0f0f0; border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; color: #666; }
.theme-toggle:hover { background: #e0e0e0; transform: rotate(15deg); }

.confirm-dialog { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; animation: fadeIn 0.2s ease; }
.confirm-content { background: white; padding: 25px 30px; border-radius: 12px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); animation: slideIn 0.2s ease; }
.confirm-content p { font-size: 16px; color: #333; margin-bottom: 20px; }
.confirm-buttons { display: flex; gap: 10px; justify-content: center; }
.confirm-yes, .confirm-no { padding: 10px 25px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.confirm-yes { background: #e57373; border: none; color: white; }
.confirm-yes:hover { background: #c62828; }
.confirm-no { background: #f5f5f5; border: 1px solid #ddd; color: #666; }
.confirm-no:hover { background: #eee; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideInResult { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideOutResult { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
@keyframes glowPulse { 0% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5), 0 0 10px rgba(102, 126, 234, 0.3); } 50% { box-shadow: 0 0 15px rgba(102, 126, 234, 0.8), 0 0 25px rgba(102, 126, 234, 0.5); } 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5), 0 0 10px rgba(102, 126, 234, 0.3); } }

/* Dark theme */
body.dark-theme { background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%); }
body.dark-theme .container, body.dark-theme .auth-modal { background: rgba(30, 30, 40, 0.95); color: #e0e0e0; }
body.dark-theme .auth-modal h2 { color: #e0e0e0; }
body.dark-theme .auth-hint { color: #aaa; }
body.dark-theme .auth-modal input::placeholder { color: #666; }
body.dark-theme .tab-btn { background: #2a2a3a; color: #aaa; }
body.dark-theme .tab-btn:hover { background: #3a3a4a; }
body.dark-theme .tab-btn.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
body.dark-theme .upload-area { background: #252530; border-color: #444; }
body.dark-theme .upload-area:hover { background: #2a2a3a; border-color: #667eea; }
body.dark-theme .upload-area p { color: #aaa; }
body.dark-theme .file-item { background: #2a2a3a; }
body.dark-theme .file-item .file-name { color: #e0e0e0; }
body.dark-theme .result-item { background: #1e3a2e; }
body.dark-theme .result-item .result-name { color: #e0e0e0; }
body.dark-theme .result-item.expired { background: #3a1e1e; }
body.dark-theme .result-item.new-item { border-color: rgba(102, 126, 234, 0.8); }
body.dark-theme .video-input-area input[type="text"], body.dark-theme .auth-modal input { background: #252530; border-color: #444; color: #e0e0e0; }
body.dark-theme .video-input-area input[type="text"]:focus, body.dark-theme .auth-modal input:focus { border-color: #667eea; }
body.dark-theme .video-input-area label, body.dark-theme .format-select > label { color: #aaa; }
body.dark-theme .format-option { background: #2a2a3a; }
body.dark-theme .format-option span { color: #ccc; }
body.dark-theme .checkbox-option { background: #2a2a3a; }
body.dark-theme .checkbox-option span { color: #ccc; }
body.dark-theme .resourcepack-options { background: #252530; }
body.dark-theme .resourcepack-options label { color: #aaa; }
body.dark-theme .resourcepack-options input[type="text"] { background: #2a2a3a; border-color: #444; color: #e0e0e0; }
body.dark-theme .tab-description { background: #252530; color: #aaa; }
body.dark-theme .divider::before, body.dark-theme .divider::after { background: #444; }
body.dark-theme .divider span { color: #666; }
body.dark-theme .video-status.info { background: #1e2a3a; color: #90caf9; }
body.dark-theme .video-status.success { background: #1e3a2e; color: #a5d6a7; }
body.dark-theme .video-status.error { background: #3a1e1e; color: #ef9a9a; }
body.dark-theme .download-progress { background: #252530; }
body.dark-theme .download-progress .progress-text { color: #aaa; }
body.dark-theme .download-progress .progress-bar { background: #3a3a4a; }
body.dark-theme .download-progress .progress-label { color: #aaa; }
body.dark-theme .download-progress .progress-status { color: #888; border-top-color: #444; }
body.dark-theme .history-section { border-top-color: #444; }
body.dark-theme .history-title { color: #ccc; }
body.dark-theme .clear-history-btn { background: #2a2a3a; border-color: #444; color: #aaa; }
body.dark-theme .clear-history-btn:hover { background: #3a2a2a; border-color: #e57373; color: #ef9a9a; }
body.dark-theme .update-btn { background: #2a2a3a; border-color: #444; color: #aaa; }
body.dark-theme .copyright { border-top-color: #444; color: #666; }
body.dark-theme .theme-toggle { background: #2a2a3a; color: #ffd54f; }
body.dark-theme .theme-toggle:hover { background: #3a3a4a; }
body.dark-theme .confirm-content { background: #2a2a3a; }
body.dark-theme .confirm-content p { color: #e0e0e0; }
body.dark-theme .confirm-no { background: #3a3a4a; border-color: #555; color: #ccc; }
body.dark-theme .custom-sound-name { background: #2a2a3a; border-color: #444; color: #e0e0e0; }
body.dark-theme .video-file-btn { background: #3a3a3a; border-color: #555; }
body.dark-theme .video-file-btn:hover:not(:disabled) { background: #444; border-color: #666; }
body.dark-theme .video-file-btn .file-label { color: #eee; }
body.dark-theme .video-file-btn .download-icon { color: #aaa; }
body.dark-theme .video-file-btn:disabled, body.dark-theme .video-file-btn.downloaded { background: #333; opacity: 0.6; }
body.dark-theme .video-file-btn.downloaded .file-label { color: #888; }
body.dark-theme .convert-btn:disabled { background: #444; color: #888; }

/* Trim Options */
.trim-options { background: #f5f5f5; border-radius: 10px; padding: 15px; margin-bottom: 15px; }
.trim-inputs { display: flex; align-items: center; gap: 12px; }
.trim-input-group { flex: 1; }
.trim-input-group label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.trim-input-group input { width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; text-align: center; font-family: monospace; outline: none; transition: border-color 0.3s; }
.trim-input-group input:focus { border-color: #667eea; }
.trim-separator { color: #999; font-size: 18px; margin-top: 16px; }
.trim-hint { font-size: 12px; color: #888; margin: 8px 0 0 0; text-align: center; }

body.dark-theme .trim-options { background: #252530; }
body.dark-theme .trim-input-group label { color: #aaa; }
body.dark-theme .trim-input-group input { background: #2a2a3a; border-color: #444; color: #e0e0e0; }
body.dark-theme .trim-input-group input:focus { border-color: #667eea; }
body.dark-theme .trim-separator { color: #666; }
body.dark-theme .trim-hint { color: #666; }

/* Audio Editor with Waveform */
.audio-editor { background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 12px; padding: 15px; margin: 15px 0; }
.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.editor-filename { font-weight: 600; color: #333; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 40px); }
.editor-close-btn { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; padding: 0; line-height: 1; }
.editor-close-btn:hover { color: #e57373; }
.waveform-container { background: #fff; border-radius: 8px; padding: 10px; margin-bottom: 12px; min-height: 100px; }
.editor-controls { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.editor-btn { background: #667eea; border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: white; transition: all 0.2s; }
.editor-btn:hover { background: #5a6fd6; transform: scale(1.05); }
.editor-btn.playing svg { display: none; }
.editor-btn.playing::before { content: '⏸'; font-size: 14px; }
.time-display { font-size: 13px; color: #666; font-family: monospace; }
.trim-range { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #666; margin-left: auto; }
.trim-time-input { width: 60px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; font-family: monospace; text-align: center; }
.trim-time-input:focus { border-color: #667eea; outline: none; }
.editor-hint { font-size: 12px; color: #888; margin: 10px 0 0 0; text-align: center; }

body.dark-theme .audio-editor { background: #252530; border-color: #444; }
body.dark-theme .editor-filename { color: #e0e0e0; }
body.dark-theme .waveform-container { background: #1a1a24; }
body.dark-theme .time-display { color: #aaa; }
body.dark-theme .trim-range { color: #aaa; }
body.dark-theme .trim-time-input { background: #2a2a3a; border-color: #444; color: #e0e0e0; }
body.dark-theme .editor-hint { color: #666; }

/* File actions */
.file-actions { display: flex; gap: 6px; align-items: center; }
.edit-btn { background: #667eea; border: none; border-radius: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: white; transition: all 0.2s; }
.edit-btn:hover { background: #5a6fd6; transform: scale(1.05); }
.trim-badge { background: #667eea; color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.file-item.has-trim { border-left: 3px solid #667eea; }
body.dark-theme .edit-btn { background: #667eea; }
body.dark-theme .edit-btn:hover { background: #7c8ff0; }

/* Video Preview */
.video-preview { margin: 15px 0; padding: 15px; background: #f8f9fa; border-radius: 12px; border: 1px solid #e0e0e0; }
.preview-loading { display: flex; align-items: center; gap: 12px; color: #666; }
.preview-loading .spinner { width: 20px; height: 20px; border: 2px solid #667eea; border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview-content { display: flex; gap: 15px; }
.preview-thumbnail { width: 160px; height: 90px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.preview-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.preview-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.preview-meta { display: flex; gap: 12px; font-size: 13px; color: #666; margin-bottom: 6px; }
.preview-uploader { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-duration { color: #667eea; font-weight: 500; }
.preview-size { font-size: 13px; color: #888; }
.preview-size strong { color: #667eea; font-weight: 600; }

body.dark-theme .video-preview { background: #252530; border-color: #444; }
body.dark-theme .preview-loading { color: #aaa; }
body.dark-theme .preview-title { color: #e0e0e0; }
body.dark-theme .preview-meta { color: #aaa; }
body.dark-theme .preview-size { color: #888; }

@media (max-width: 600px) {
    .preview-content { flex-direction: column; }
    .preview-thumbnail { width: 100%; height: auto; aspect-ratio: 16/9; }
    .container { padding: 25px 15px; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 8px; padding-bottom: 5px; }
    .tabs::-webkit-scrollbar { display: none; }
    .tab-btn { flex: 0 0 auto; padding: 10px 14px; font-size: 13px; white-space: nowrap; }
    h1 { font-size: 24px; }
    .format-options { flex-direction: column; }
    .theme-toggle { top: 10px; right: 10px; width: 36px; height: 36px; }
}
