* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --bg-light: #f9fafb;
    --bg-dark: #1f2937;
    --text-light: #6b7280;
    --text-dark: #111827;
    --border-color: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

section h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Upload Area */
.upload-section {
    text-align: center;
}

.upload-area {
    border: 3px dashed var(--primary-color);
    border-radius: 12px;
    padding: 60px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.upload-area:hover {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

.upload-area.drag-over {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    transform: scale(1.02);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin: 0 auto 15px;
    opacity: 0.8;
}

.upload-area p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

/* Video Info */
.video-info {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
}

.video-container {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#videoPlayer {
    width: 100%;
    height: auto;
    background: #000;
}

.video-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.video-meta p {
    margin: 0;
    color: var(--text-light);
}

.video-meta strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 5px;
}

/* Controls */
.controls {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.control-group select {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.control-group select:hover,
.control-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-dark);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Messages */
.status {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.status.info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

.status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.status.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

/* Transcrição */
.result {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-header h2 {
    margin: 0;
}

.progress-section {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.progress-section p {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.transcription-container {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.transcription-text {
    line-height: 1.8;
    color: var(--text-dark);
}

.transcription-line {
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
}

.timestamp {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 80px;
    flex-shrink: 0;
}

.text {
    flex: 1;
    color: var(--text-dark);
}

.transcription-line.interim .timestamp,
.transcription-line.interim .text {
    color: var(--text-light);
    font-style: italic;
}

.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Info Section */
.info-section {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.info-section ul {
    list-style-position: inside;
    color: var(--text-light);
    line-height: 1.8;
}

.info-section li {
    margin-bottom: 8px;
}

.info-section strong {
    color: var(--text-dark);
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.9;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Animações */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    main {
        padding: 20px;
    }

    .video-meta {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }

    .transcription-container {
        max-height: 300px;
    }

    .control-group select {
        max-width: 100%;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        width: 36px;
        height: 36px;
    }

    section h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    main {
        padding: 15px;
    }

    section h2 {
        font-size: 1.1rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .transcription-line {
        flex-direction: column;
        gap: 4px;
    }

    .timestamp {
        min-width: auto;
    }
}
