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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    padding-top: 60px;
}

/* Simple header with name only */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

nav .nav-content {
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.update-info {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
}

/* Stats bar */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Filter controls */
.filter-container {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    min-width: 200px;
    transition: border-color 0.3s;
}

.filter-select:hover {
    border-color: #0066cc;
}

.filter-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.filter-info {
    margin-left: auto;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}


.stat-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0066cc;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Content sections */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 0.5rem;
}

.section p {
    color: #555;
    margin-bottom: 1rem;
}

.section a {
    color: #0066cc;
    text-decoration: none;
}

.section a:hover {
    text-decoration: underline;
}

/* Plot container */
.plot-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.plot-header {
    margin-bottom: 1.5rem;
}

.plot-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.plot-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

#massPlot {
    width: 100%;
    height: 700px;
    border-radius: 4px;
}

#massDistPlot {
    width: 100%;
    height: 500px;
    border-radius: 4px;
}

#finalMassPlot {
    width: 100%;
    height: 500px;
    border-radius: 4px;
}

/* Legend */
.legend-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 4rem;
    color: #999;
    font-size: 0.9rem;
}

footer a {
    color: #0066cc;
    text-decoration: none;
}

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

/* Loading state */
.loading {
    text-align: center;
    padding: 4rem 1rem;
    color: #999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #massPlot {
        height: 500px;
    }
    
    .legend-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .additional-plots {
        grid-template-columns: 1fr !important;
    }
}

/* Additional plots section */
.additional-plots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.plot-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.plot-card h3 {
    font-size: 1.2rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.plot-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.small-plot {
    width: 100%;
    height: 400px;
}

/* Event Detail Panel */
.event-detail-panel {
    background: #fff;
    border: 2px solid #0066cc;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0 3rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.detail-header h3 {
    font-size: 1.5rem;
    color: #0066cc;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-button:hover {
    background: #f0f0f0;
    color: #333;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.detail-section h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.version-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.parameter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.parameter-item {
    background: white;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.parameter-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.parameter-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.parameter-value sup,
.parameter-value sub {
    font-size: 0.65em;
    color: #0066cc;
    font-weight: 500;
    line-height: 1;
    vertical-align: baseline;
    position: relative;
}

.parameter-value sup {
    top: -0.6em;
}

.parameter-value sub {
    top: 0.3em;
}

.version-param sup,
.version-param sub {
    font-size: 0.6em;
    color: #0066cc;
    font-weight: 500;
    line-height: 1;
    vertical-align: baseline;
    position: relative;
}

.version-param sup {
    top: -0.6em;
}

.version-param sub {
    top: 0.3em;
}

.versions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.version-card {
    background: white;
    padding: 1.25rem;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    transition: all 0.2s;
}

.version-card.is-primary {
    border-color: #0066cc;
    background: #f0f7ff;
}

.version-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.version-catalog {
    font-weight: 600;
    font-size: 1rem;
    color: #0066cc;
}

.version-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #0066cc;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.version-params {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    font-size: 0.85rem;
}

.version-param {
    color: #666;
}

.version-param strong {
    color: #333;
}

/* Version tabs */
.version-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.version-tab {
    background: white;
    border: 2px solid #e0e0e0;
    border-bottom: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px 6px 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    bottom: -2px;
}

.version-tab:hover {
    background: #f8f9fa;
    color: #333;
}

.version-tab.active {
    background: #f0f7ff;
    border-color: #0066cc;
    color: #0066cc;
    border-bottom: 2px solid #f0f7ff;
}

.version-content-container {
    position: relative;
}

.version-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

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

.version-params-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    font-size: 0.9rem;
}

.version-params-detailed .version-param {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0066cc;
}

