:root {
    --bg-color: #18181b;
    --card-bg: #27272a;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --border: #3f3f46;
    --success: #10b981;
    --error: #ef4444;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    padding: 2rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
}

.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.drop-zone {
    width: 100%;
    min-height: 120px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    background: var(--card-bg);
    transition: all 0.2s;
    position: relative;
    margin-bottom: 1rem;
}

.drop-zone--over {
    border-style: solid;
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.drop-zone__input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.video-preview-container {
    margin-top: 1rem;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-preview-container video {
    width: auto;
    max-width: 100%;
    max-height: 250px;
    display: block;
    margin: 0 auto;
}

.file-list {
    list-style: none;
    margin-top: 1rem;
}

.file-list li {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    gap: 0.5rem;
}

.file-list video {
    width: auto;
    max-width: 100%;
    max-height: 250px;
    border-radius: 0.25rem;
    margin: 0 auto;
}

.action-section {
    text-align: center;
    margin: 2rem 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.clear-all-btn {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
}

.clear-all-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    width: 100%;
}

.remove-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover:not(:disabled) {
    background: var(--primary-hover);
}

button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.hidden {
    display: none !important;
}

#status-container {
    margin-top: 1.5rem;
    text-align: left;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

#status-text {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.2s;
}

.download-btn {
    background: var(--success);
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    text-decoration: none;
    color: white;
    border-radius: 0.25rem;
    display: inline-block;
}

.download-btn:hover {
    background: #059669;
}

.info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.warning-box {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: left;
    font-size: 0.9rem;
}

.warning-box ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-actions {
    display: flex;
    gap: 0.5rem;
}

.secondary-btn {
    background: var(--border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.secondary-btn:hover:not(:disabled) {
    background: #52525b;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.results-grid .download-btn {
    text-align: center;
}
