* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 1000px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 300;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.version-badge {
    display: inline-block;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

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

.nav-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 10px;
    border: 2px solid #667eea;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.nav-link.active {
    background: #667eea;
    color: white;
}

/* Tab Styles */
.tab-container {
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e0e6ed;
    margin-bottom: 20px;
}

.tab {
    background: none;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    color: #7f8c8d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.tab-content {
    display: none;
    animation: slideIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #34495e;
    font-weight: 500;
    font-size: 1.1em;
}

textarea {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

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

/* File Upload Styles */
.file-upload-area {
    border: 2px dashed #e0e6ed;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-icon {
    font-size: 3em;
    color: #bdc3c7;
    margin-bottom: 10px;
}

.upload-text {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.file-input {
    display: none;
}

.file-list {
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
}

.file-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-icon {
    margin-right: 10px;
    color: #667eea;
}

.file-details {
    flex-grow: 1;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
}

.file-size {
    font-size: 0.9em;
    color: #7f8c8d;
}

.file-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-pending {
    background: #fef9e7;
    color: #f39c12;
}

.status-processed {
    background: #e8f5e8;
    color: #27ae60;
}

.status-error {
    background: #fee;
    color: #e74c3c;
}

.btn-container {
    text-align: center;
    margin-top: 20px;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 150px;
    margin: 0 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    padding: 1rem;
    border-radius: 1rem;
    outline: none;
    border: none;
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
    cursor: pointer;
}

.loading {
    display: none;
    text-align: center;
    margin: 30px 0;
    color: #667eea;
}

.loading.show {
    display: block;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    display: none;
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.result.show {
    display: block;
    animation: slideResultIn 0.5s ease-out;
}

@keyframes slideResultIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.error {
    background: #fee;
    border-left-color: #e74c3c;
    color: #c0392b;
}

.download-info {
    background: #e8f5e8;
    border: 1px solid #27ae60;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #27ae60;
    text-align: center;
}

.btn-download {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    min-width: 200px;
    margin: 10px;
    text-decoration: none;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e6ed;
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* File Attachment Styles */
.attachment-section {
    margin-bottom: 20px;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    background: #f8f9fa;
    padding: 20px;
}

.attachment-header {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attachment-drop-zone {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.attachment-drop-zone:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.attachment-drop-zone.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.attachment-icon {
    font-size: 2em;
    color: #bdc3c7;
    margin-bottom: 10px;
}

.attachment-text {
    color: #7f8c8d;
    font-size: 0.95em;
}

.attached-files {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 6px;
}

.attached-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    margin-bottom: 5px;
}

.attached-file:last-child {
    margin-bottom: 0;
}

.file-info-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    min-width: 0;
}

.file-type-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.file-name-size {
    flex-grow: 1;
    min-width: 0;
}

.file-name-compact {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size-compact {
    font-size: 0.8em;
    color: #7f8c8d;
}

.remove-file-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-file-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.file-input-hidden {
    display: none;
}

/* Editable Results Form Styles */
.editable-results {
    display: none;
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #27ae60;
    animation: slideResultIn 0.5s ease-out;
}

.editable-results.show {
    display: block;
}

.editable-results h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: center;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-field input {
    padding: 12px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

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

.form-field-full {
    grid-column: 1 / -1;
}

.form-field-full textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
}

.form-field-full textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.btn-regenerate {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-regenerate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-cancel {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
    text-decoration: none;
}

.btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

/* Recording Styles */
.recording-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    border: 2px solid #e0e6ed;
}

.recording-status {
    margin-bottom: 30px;
}

.recording-icon {
    font-size: 4em;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.recording-icon.recording {
    color: #e74c3c;
    animation: pulse 1.5s infinite;
}

.recording-icon.paused {
    color: #f39c12;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.recording-info {
    margin-bottom: 20px;
}

.recording-state {
    font-size: 1.3em;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.recording-time {
    font-size: 2em;
    font-weight: 300;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.recording-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-record, .btn-record-pause, .btn-record-stop {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    min-width: 120px;
}

.btn-record:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-record-pause {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-record-pause:hover {
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
    transform: translateY(-2px);
}

.btn-record-stop {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-record-stop:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    transform: translateY(-2px);
}

.btn-record:disabled, .btn-record-pause:disabled, .btn-record-stop:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.audio-preview {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e6ed;
    margin-top: 20px;
}

.preview-header {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Multiple Results Interface Styles */
.multiple-results-container {
    display: none;
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.multiple-results-container.show {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header h3 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.single-result-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.single-result-form:last-of-type {
    margin-bottom: 0;
}

.file-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px 20px;
    margin: -25px -25px 25px -25px;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid #2980b9;
}

.file-header h4 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

.multiple-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.multiple-actions .btn-download {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.multiple-actions .btn-download:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

.multiple-actions .btn-download:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.multiple-actions .btn-cancel {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.multiple-actions .btn-cancel:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

/* Individual download buttons within each form */
.individual-download-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(52, 152, 219, 0.3);
}

.individual-download-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(52, 152, 219, 0.4);
}

.individual-download-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
}

.recipients_info_textarea {
    min-height: 100px !important;
}

.diagnosis-textarea {
    min-height: 3rem;
    max-height: 3rem;
    padding: 12px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    resize: vertical;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
}

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

/* Responsive design for multiple results */
@media (max-width: 768px) {
    .single-result-form {
        padding: 20px 15px;
    }
    
    .file-header {
        margin: -20px -15px 20px -15px;
        padding: 12px 15px;
    }
    
    .file-header h4 {
        font-size: 1.1em;
    }
    
    .multiple-actions .btn-download,
    .multiple-actions .btn-cancel {
        padding: 10px 20px;
        font-size: 1em;
        margin: 5px;
        display: block;
        width: 100%;
        max-width: 300px;
    }
}

