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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.file-upload {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.file-upload h3 {
    margin-bottom: 15px;
    color: #4a5568;
}

.file-upload input[type="file"] {
    width: 100%;
    padding: 15px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f7fafc;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.file-upload input[type="file"]:hover {
    border-color: #667eea;
}

.file-upload textarea {
    width: 100%;
    padding: 15px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f7fafc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    margin-top: 10px;
    transition: border-color 0.3s ease;
}

.file-upload textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-upload textarea:hover {
    border-color: #667eea;
}

#srtPreview, #txtPreview {
    margin-top: 15px;
    padding: 15px;
    background: #edf2f7;
    border-radius: 8px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.control-section {
    text-align: center;
    margin-bottom: 30px;
}

.control-section button {
    padding: 15px 30px;
    margin: 0 10px;
    border: none;
    border-radius: 8px;
    background: #48bb78;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.control-section button:hover:not(:disabled) {
    background: #38a169;
}

.control-section button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.result-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.result-section h3 {
    margin-bottom: 20px;
    color: #4a5568;
    text-align: center;
}

#resultContainer {
    max-height: 500px;
    overflow-y: auto;
}

.sentence-item {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
}

.sentence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.sentence-number {
    font-weight: bold;
    color: #667eea;
}

.sentence-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.original-text, .translated-text {
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #cbd5e0;
}

.original-text {
    border-left: 4px solid #667eea;
}

.translated-text {
    border-left: 4px solid #48bb78;
}

.api-response-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: 30px;
}

.api-response-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.api-response-section textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: #f7fafc;
    color: #2d3748;
    resize: vertical;
}

.api-response-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-section {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    align-items: center;
}

.password-section input {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    width: 200px;
}

.password-section input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-section button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.password-section button:hover {
    background: #5a67d8;
}

@media (max-width: 768px) {
    .upload-section {
        grid-template-columns: 1fr;
    }
    
    .sentence-content {
        grid-template-columns: 1fr;
    }
    
    .control-section button {
        margin-bottom: 10px;
        width: 100%;
    }
}