/* TS to MP4 Converter - Styles */

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --drop-zone-border: #d1d5db;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 500px;
    width: 100%;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Drop Zone */
.drop-zone {
    background: var(--card-bg);
    border: 2px dashed var(--drop-zone-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: #f0f0ff;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone .icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.drop-zone p {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.drop-zone .or {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: normal;
}

.file-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 0.5rem;
    pointer-events: auto;
}

.file-button:hover {
    background: var(--primary-hover);
}

/* Progress Section */
.progress-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

#file-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

#file-size {
    color: var(--text-muted);
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.status-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Result Section */
.result-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--success-color);
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.result-text {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 1rem;
}

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

.download-button svg {
    width: 20px;
    height: 20px;
}

.secondary-button {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-button:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

/* Error Section */
.error-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.error-text {
    color: var(--error-color);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Footer */
footer {
    margin-top: 2rem;
    text-align: center;
}

footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

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

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .drop-zone {
        padding: 2rem 1.5rem;
    }

    .progress-section,
    .result-section,
    .error-section {
        padding: 1.5rem;
    }
}
