/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    color: #f5f5f5;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #4CAF50, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Seções */
section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Área de Upload */
.file-upload-area {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.file-upload-area.dragover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.02);
}

.file-upload-area i {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 15px;
    display: block;
}

.file-upload-area h3 {
    margin-bottom: 10px;
    color: #f5f5f5;
}

.file-upload-area p {
    margin-bottom: 20px;
    opacity: 0.7;
}

/* Informações do arquivo */
.file-info {
    margin-top: 20px;
}

.file-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.file-info-header h3 {
    margin: 0;
    flex: 1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    min-width: auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.info-item strong {
    color: #4CAF50;
    display: block;
    margin-bottom: 5px;
}

/* Controles de ajuste */
.adjustment-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    background: #4CAF50;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-input-group label {
    font-weight: 500;
    color: #4CAF50;
}

.time-input-group input {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #f5f5f5;
    font-size: 1rem;
    width: 150px;
}

.time-input-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* Controles de tradução */
.translation-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.translation-mode {
    display: flex;
    gap: 15px;
}

.language-selection {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.language-selection label {
    font-weight: 500;
    color: #4CAF50;
}

.language-selection select {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #f5f5f5;
    font-size: 1rem;
    min-width: 200px;
}

.language-selection select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* Controles do editor */
.editor-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.editor-container {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

#subtitleEditor {
    width: 100%;
    height: 400px;
    padding: 20px;
    border: none;
    background: rgba(24, 26, 27, 0.8);
    color: #f5f5f5;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

#subtitleEditor:focus {
    outline: none;
}

/* Controles de download */
.download-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.download-info {
    color: #4CAF50;
    font-weight: 500;
}

/* 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;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:before {
    display: none;
}

.btn-primary {
    background: linear-gradient(45deg, #1976D2, #2196F3);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #FF9800, #FFB74D);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.btn-purple {
    background: linear-gradient(45deg, #9C27B0, #BA68C8);
    color: white;
}

.btn-purple:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #607D8B, #78909C);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 125, 139, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #f44336, #EF5350);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #23272e;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #4CAF50;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* Barra de progresso */
.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .file-info-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .file-info-header h3 {
        text-align: center;
    }
    
    .adjustment-controls,
    .translation-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .radio-group {
        justify-content: center;
    }
    
    .editor-controls {
        flex-wrap: wrap;
    }
    
    .download-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #66BB6A;
}
