body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    padding: 25px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #0056b3;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px; /* Increased padding */
    border: 1px solid #ccc;
    border-radius: 5px; /* Slightly more rounded corners */
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s; /* Added transition */
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

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

/* Styles for the main dashboard menu grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.menu-item {
    background-color: #e9f5ff;
    border: 1px solid #b3e0ff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #0056b3;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.menu-item:hover {
    background-color: #cce7ff;
    transform: translateY(-5px);
}

.menu-item h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0056b3;
    border-bottom: none;
    padding-bottom: 0;
}

.menu-item p {
    font-size: 0.9em;
    color: #333;
}

/* Style for the collapsible button (from podcast_gui.css) */
.collapsible {
    background-color: #f1f1f1;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    transition: 0.4s;
    margin-top: 20px;
    border-radius: 4px;
}

.active, .collapsible:hover {
    background-color: #ccc;
}

/* Style for the collapsible content (from podcast_gui.css) */
.content {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 4px 4px;
    margin-bottom: 20px;
}

.content h3 {
    color: #0056b3;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 20px;
    margin-bottom: 15px;
}

/* Drop area styles (from style.css) */
.drop-area {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-top: 10px;
    background-color: #f9f9f9;
}

.drop-area.highlight {
    border-color: #007bff;
    background-color: #e9e9e9;
}

#reference-docs-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

#reference-docs-list li {
    background-color: #e9e9e9;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#reference-docs-list li .remove-file {
    color: #dc3545;
    cursor: pointer;
    font-weight: bold;
}

button, .button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

button:hover, .button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

details {
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}

summary {
    padding: 15px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    color: #0056b3;
}

details[open] {
    background-color: #fff;
}

details[open] summary {
    border-bottom: 1px solid #eee;
}

details .form-group {
    padding: 0 15px;
}

details .form-group:first-of-type {
    padding-top: 15px;
}

details .form-group:last-of-type {
    padding-bottom: 15px;
    margin-bottom: 0;
}

/* Output console styles */
#output pre,
#script-console-output,
#podcast-console-output {
    background-color: #333;
    color: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px; /* Fixed height */
    overflow-y: auto; /* Scrollable */
    text-align: left;
    margin-top: 20px;
}

#results {
    margin-top: 20px;
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

#output-links a, #report-links a { /* Combined from both CSS files */
    display: block; /* Changed from inline-block for better history display */
    margin-top: 10px;
    color: #004085;
    text-decoration: none;
    font-weight: bold;
}

#output-links a:hover, #report-links a:hover {
    text-decoration: underline;
}

nav a {
    margin-right: 15px;
    text-decoration: none;
    color: #007bff;
}

nav a:hover {
    text-decoration: underline;
}

.settings-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ccc;
}

.settings-section:last-child {
    border-bottom: none;
}

#llm-model-details {
    border: 1px solid #eee;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

#llm-model-details .form-group input[readonly] {
    background-color: #e9e9e9;
}

#delete-llm-model {
    background-color: #dc3545;
}

#delete-llm-model:hover {
    background-color: #c82333;
}

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

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.modal-content h2 {
    color: #0056b3;
    margin-top: 0;
}

.modal-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Spinner animation (combined and adjusted for size) */
.spinner {
    border: 4px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #007bff;
    width: 40px; /* Larger spinner from podcast_gui.css */
    height: 40px; /* Larger spinner from podcast_gui.css */
    animation: spin 1s linear infinite;
    margin: 20px auto; /* Center the spinner from podcast_gui.css */
    display: block; /* Ensure it takes its own line */
}

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

/* Styles for history page output list */
.output-list {
    margin-top: 20px;
}

.output-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.output-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0056b3;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.output-item p {
    margin-bottom: 5px;
    font-size: 0.95em;
}

.output-item .button {
    display: inline-block;
    margin-right: 10px;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
}

.output-item .button:hover {
    background-color: #0056b3;
}

.back-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
}

.back-button:hover {
    background-color: #5a6268;
}

/* Docker Status Widget Styles */
.docker-status-widget {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.docker-status-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

.status-dot.status-running {
    background-color: #28a745;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
}

.status-dot.status-stopped {
    background-color: #ffc107;
}

.status-dot.status-building {
    background-color: #17a2b8;
    animation: pulse 2s infinite;
}

.status-dot.status-error {
    background-color: #dc3545;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-text {
    font-weight: bold;
    color: #495057;
}

.docker-controls {
    margin-bottom: 15px;
}

.docker-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.docker-btn.start-btn {
    background-color: #28a745;
    color: white;
}

.docker-btn.start-btn:hover {
    background-color: #218838;
}

.docker-btn.stop-btn {
    background-color: #dc3545;
    color: white;
}

.docker-btn.stop-btn:hover {
    background-color: #c82333;
}

.docker-btn.ui-btn {
    background-color: #007bff;
    color: white;
}

.docker-btn.ui-btn:hover {
    background-color: #0056b3;
}

.docker-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.docker-message {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

/* Easy Mode Button */
.easy-mode-button {
    background-color: #28a745; /* Green color */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px; /* Space below the button */
    display: block; /* Ensure it takes full width */
}

.easy-mode-button:hover {
    background-color: #218838; /* Darker green on hover */
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation-name: animatetop;
    animation-duration: 0.4s
}

/* Add Animation */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#research-description {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
    resize: vertical;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
}

#research-description:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

/* Resume Section Styles */
.resume-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.resume-section h2 {
    font-size: 1.2em;
    color: #333;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
}

#resume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#resume-container select {
    flex-grow: 1; /* Allows the select to take up available space */
}

#load-podcast-button {
    background-color: #28a745; /* Green color for load button */
    flex-shrink: 0; /* Prevents the button from shrinking */
}

#load-podcast-button:hover {
    background-color: #218838;
}
