/* Style chính cho ứng dụng Speech to Text */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f7f9fc;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 25px;
}

.card-title {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab:hover {
    background-color: #e9ecef;
}

.tab.active {
    background-color: #fff;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    font-weight: 600;
    color: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border 0.3s ease;
}

.form-group input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
}

.file-upload {
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.file-upload:hover, .file-upload.dragover {
    border-color: #3498db;
    background-color: #f1f7fc;
}

.file-upload input[type="file"] {
    margin-top: 15px;
}

.file-upload p {
    margin: 10px 0;
    color: #616161;
}

.file-upload .icon {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 10px;
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.result {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-top: 25px;
}

.result h2 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.system-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-top: 25px;
    font-size: 14px;
}

.system-info h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background-color: #3498db;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.jobs-list {
    margin-top: 20px;
}

.job-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
}

.job-item.completed {
    border-left: 4px solid #2ecc71;
}

.job-item.error {
    border-left: 4px solid #e74c3c;
}

.job-item.processing {
    border-left: 4px solid #3498db;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.job-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.job-status {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-processing {
    background-color: #cce5ff;
    color: #004085;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.job-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
    margin: 10px 0;
    font-size: 0.9rem;
}

.job-actions {
    margin-top: 10px;
    text-align: right;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn-outline {
    background-color: transparent;
    color: #3498db;
    border: 1px solid #3498db;
}

.btn-outline:hover {
    background-color: #3498db;
    color: white;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .tab {
        padding: 10px 15px;
    }
    
    .job-details {
        grid-template-columns: 1fr;
    }
}