/* M-shape Jumper Unity Prediction Web Application */
/* Main CSS for styling the application */

:root {
    --primary-color: #071932;      /* Maastricht Blue */
    --secondary-color: #082540;    /* Oxford Blue */
    --accent-color: #023C4D;       /* Prussian Blue */
    --tertiary-color: #0D4848;     /* Blue-Green */
    --quaternary-color: #032D39;   /* Maastricht Blue variant */
    --success-color: #0D4848;      /* Blue-Green for success */
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #023C4D;         /* Prussian Blue for info */
    --light-color: #f8f9fa;
    --dark-color: #071932;         /* Maastricht Blue for dark text */
    --white: #ffffff;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-style: italic;
}

h2 {
    font-size: 2rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

h4 {
    font-size: 1.2rem;
}

button {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--secondary-color);
}

button:active {
    transform: translateY(1px);
}

.hidden {
    display: none !important;
}

/* Header Styles */
header {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: var(--white);
    margin-bottom: 0;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin-top: 0.5rem;
}

nav a {
    color: var(--light-color);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a.active, nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* Section Container */
.section-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.section-container h2 {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    margin-bottom: 0;
}

.section-content {
    padding: 1.5rem;
}

/* Parameter Form Styles */
.parameter-form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

legend {
    font-weight: bold;
    padding: 0 10px;
    color: #2196f3;
}

.parameter-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.parameter-input {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
}

.parameter-input label {
    margin-bottom: 5px;
    font-weight: 500;
}

.parameter-input input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.parameter-input input:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 10px 0;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn {
    background-color: #4caf50;
    color: white;
}

.submit-btn:hover {
    background-color: #388e3c;
}

.reset-btn {
    background-color: #f44336;
    color: white;
}

.reset-btn:hover {
    background-color: #d32f2f;
}

.sample-btn {
    background-color: #2196f3;
    color: white;
}

.sample-btn:hover {
    background-color: #1976d2;
}

/* Results Tabs */
.results-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: var(--secondary-color);
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: bold;
    cursor: pointer;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-pane {
    display: none;
}

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

/* Table Styles */
#element-config-display {
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background-color: var(--light-color);
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Detailed Results */
.detailed-results-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.unity-values-summary, .unity-values-details, .export-options {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.summary-item {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.summary-item p.value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.export-options {
    margin-top: 2rem;
    text-align: center;
}

.export-options button {
    margin: 0.5rem;
}

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

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid #fff;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.loading-message {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

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

#error-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: var(--danger-color);
    color: var(--white);
    padding: 1rem;
    border-radius: 4px;
    max-width: 400px;
    display: none;
    z-index: 2000;
}

#error-message button {
    background-color: var(--white);
    color: var(--danger-color);
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    .detailed-results-container {
        grid-template-columns: 1fr;
    }
    
    .unity-values-summary, .unity-values-details, .export-options {
        padding: 1rem;
    }
    
    .parameter-input {
        width: 100%;
    }
    
    .parameter-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* Add styling for parameter tooltips and validation messages */

/* Tooltips */
.parameter-tooltip {
    display: inline-block;
    margin-left: 5px;
    position: relative;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #2196f3;
    color: white;
    font-style: normal;
    font-size: 12px;
    cursor: help;
}

.tooltip-text {
    position: absolute;
    top: -5px;
    left: 25px;
    width: 250px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.parameter-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Form validation */
.parameter-input input.invalid {
    border-color: #f44336;
    background-color: rgba(244, 67, 54, 0.05);
}

.validation-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
    display: none;
} 

/* Configuration Results Styles */
.configuration-row {
    display: grid;
    grid-template-columns: 3fr auto 2fr;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
}

.config-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.config-details {
    font-size: 0.9rem;
    color: #666;
}

.config-segments {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

.segment-line {
    margin-bottom: 0.2rem;
    padding: 0.1rem 0;
}

.unity-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.unity-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.unity-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.unity-badge.above {
    background-color: var(--danger-color);
    color: white;
}

.unity-badge.below {
    background-color: var(--success-color);
    color: white;
}

.unity-badge.exact {
    background-color: var(--warning-color);
    color: black;
}

.visualization-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.config-3d-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.config-3d-canvas {
    width: 100%;
    height: 200px;
    display: block;
}

.unity-plots-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.unity-plot-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.unity-plot-canvas {
    width: 100%;
    height: 95px;
    display: block;
}

/* Category Section Styles */
.category-section {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
}

.category-title {
    margin: 0;
    font-size: 1.2rem;
}

.category-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.configurations-container {
    padding: 1rem;
    background-color: white;
    border-radius: 0 0 8px 8px;
    border: 1px solid #ddd;
    border-top: none;
} 
