:root {
    --primary-color: #FFD600;
    --primary-hover: #E6C200;
    --primary-light: #FFFDE7;
    --bg-color: #0f172a;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --accent-1: #FFD600;
    --accent-2: #22c55e;
    --accent-3: #3b82f6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 2000px;
    margin: 20px auto;
    padding: 0 20px;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    background-color: var(--surface-color);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

h1 {
    font-weight: 600;
    font-size: 1.875rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

h3 {
    font-weight: 500;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.options {
    margin: 20px 0;
    padding: 16px;
    background-color: var(--primary-light);
    border-radius: 8px;
    border: 1px solid rgba(255, 214, 0, 0.1);
}

.option-item {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="file"] {
    padding: 12px;
    border: none;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    background-color: var(--primary-light);
    transition: all 0.2s;
    color: var(--text-primary);
    font-size: 0.875rem;
}

input[type="file"]:hover {
    background-color: rgba(255, 214, 0, 0.1);
}

/* Style the file input button */
input[type="file"]::-webkit-file-upload-button {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    margin-right: 12px;
    transition: background-color 0.2s;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: var(--primary-hover);
}

/* Firefox */
input[type="file"]::file-selector-button {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    margin-right: 12px;
    transition: background-color 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--primary-hover);
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: var(--primary-color);
}

input[type="number"] {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 100px;
}

button {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.error {
    color: var(--error-color);
    margin-top: 12px;
    padding: 12px;
    background-color: #fef2f2;
    border-radius: 6px;
    font-size: 0.875rem;
}

.metadata {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    height: 100%;
    margin: 0;
}

.metadata-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1em;
    color: var(--text-secondary);
}

.metadata-content strong {
    color: var(--text-primary);
}

.plot-container {
    background-color: var(--surface-color);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
}

.plot-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    margin-top: 10px;
    padding-left: 48px;
    text-align: center;
}

.plot-container.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    margin: 0;
    padding: 32px;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.expand-button {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
    transition: all 0.2s;
}

.expand-button:hover {
    background-color: var(--primary-hover);
    transform: scale(1.02);
}

.expand-button svg {
    width: 16px;
    height: 16px;
}

.plot-container.expanded .expand-button {
    position: fixed;
    top: 16px;
    left: 16px;
}

.plot-container.expanded .plot-title {
    position: fixed;
    top: 5px;
    left: 170px;
    z-index: 1000;
    margin-bottom: 0;
}

.plots-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 24px;
    margin-top: 24px;
    position: relative;
}

.loading {
    display: none;
    margin: 20px 0;
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.loading.active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading.active::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.top-section {
    display: grid;
    grid-template-columns: minmax(300px, 2fr) 3fr;
    gap: 24px;
    margin-bottom: 24px;
}

.controls-section {
    background-color: var(--surface-color);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#results {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#results li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

#results li:last-child {
    border-bottom: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.metadata-file {
    margin-bottom: 1.5rem;
}

.metadata-file h4 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.metadata-file:last-child {
    margin-bottom: 0;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

.file-results {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--primary-light);
    border-radius: 8px;
}

.file-results h4 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.file-results:last-child {
    margin-bottom: 0;
}

.results-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.results-header h3 {
    margin: 0;
    flex-grow: 1;
}

.toggle-results {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.toggle-results svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.toggle-results:hover {
    color: var(--accent);
}

.results-content {
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.results-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
} 