:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --background-color: #f5f5f5;
    --panel-color: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --error-color: #e74c3c;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

h2 {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.settings-panel, .results-panel {
    background-color: var(--panel-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="text"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

input[type="file"] {
    padding: 10px 0;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
}

.primary-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

#file-details {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.result-container {
    margin-top: 10px;
}

#transcription-result {
    width: 100%;
    min-height: 200px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
}

.error-box {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}
/* Settings Button */
.settings-container {
    display: flex;
    justify-content: flex-end;
}

.secondary-btn {
    background-color: #f1f1f1;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.secondary-btn:hover {
    background-color: #e1e1e1;
}

.gear-icon {
    font-size: 1.2em;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    padding: 0;
    border: none;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.hidden {
    display: none !important;
}
.helper-text {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 4px;
}

/* Model selection checkboxes */
.model-checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.model-checkbox {
    display: flex;
    align-items: center;
}

.model-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

/* Results display */
#results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-card {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.result-header {
    background-color: #f5f7f9;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-actions {
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-end;
}

.model-name {
    font-size: 16px;
}

.processing-time {
    font-size: 14px;
    color: #666;
}

.no-results-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Error text in result cards */
.error-text {
    color: var(--error-color);
    font-style: italic;
}

/* Textarea styling in result cards */
.result-container textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: none;
    font-size: 16px;
    resize: vertical;
}

/* Result card actions */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-actions {
    display: flex;
    gap: 5px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 5px;
    border-radius: 3px;
}

.action-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Toast notification */
#toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

#toast-notification.toast-visible {
    opacity: 1;
}

/* New UI layout styles */
.section {
    background-color: var(--panel-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Result card header with checkbox */
.result-header {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 10px 15px;
    background-color: #f5f7f9;
    border-bottom: 1px solid var(--border-color);
}

/* Adjust positioning of elements */
.play-btn {
    margin-right: 4px;
}

.model-label {
    padding-left: 4px;
}

.result-actions {
    justify-self: end;
}

.result-select {
    margin-right: 10px;
}

.model-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Analyze section */
.analyze-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.analyze-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.analyze-btn:hover:not(:disabled) {
    background-color: var(--secondary-color);
}

.analyze-btn:disabled {
    background-color: var(--border-color);
    color: #999;
    cursor: not-allowed;
}

/* Updated toggle button */
.toggle-btn span {
    font-size: 12px;
    padding: 2px;
}

/* Success and error card states */
.success-card .result-header {
    background-color: rgba(46, 204, 113, 0.15);
}

.error-card .result-header {
    background-color: rgba(231, 76, 60, 0.15);
}

/* Loading animation */
@keyframes rotating {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.play-btn span[title="Transcribing..."] {
    display: inline-block;
    animation: rotating 2s linear infinite;
}

/* Audio player styling */
#audio-player-container {
    margin-top: 10px;
    width: 100%;
}

#audio-preview {
    width: 100%;
    height: 40px;
}

/* Rerun button styling */
.rerun-btn {
    color: #2980b9;
}

.rerun-btn:hover {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

/* Make sure action buttons have enough space */
.result-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
