/*
============================================================================
Copyright (c) 2024 HJJB, LLC
All Rights Reserved

This software is the proprietary information of HJJB, LLC.
Unauthorized use, reproduction, or distribution is strictly prohibited.

For licensing inquiries, please contact:
Email: licensing@thecoatlessprofessor.com
============================================================================
*/

:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --secondary-color: #95a5a6;
    --secondary-hover: #7f8c8d;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --background: #ecf0f1;
    --container-bg: #ffffff;
    --text-color: #2c3e50;
    --border-color: #bdc3c7;
}

* {
    box-sizing: border-box;
}

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

.container {
    background: var(--container-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

header h1 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

header p {
    margin: 0;
    color: var(--secondary-color);
}

.section {
    margin-bottom: 25px;
}

.section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.3em;
}

.section p {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.primary-button, .secondary-button {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.primary-button {
    background-color: var(--primary-color);
    color: white;
}

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

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

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

.correlation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    overflow-x: auto;
    display: block;
}

.correlation-table table {
    width: 100%;
    border-collapse: collapse;
}

.correlation-table th,
.correlation-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    font-size: 0.9em;
}

.correlation-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.correlation-table td {
    font-family: 'Courier New', monospace;
}

.correlation-cell {
    font-weight: bold;
}

.heatmap-container {
    margin-top: 15px;
    overflow-x: auto;
}

.heatmap-grid {
    display: inline-grid;
    gap: 2px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.heatmap-cell {
    min-width: 80px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.heatmap-label {
    font-size: 0.75em;
    margin-bottom: 5px;
}

.heatmap-value {
    font-size: 1.1em;
}

.legend {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.legend h3 {
    margin-top: 0;
    font-size: 1em;
    color: var(--text-color);
}

.legend-scale {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.legend-gradient {
    flex: 1;
    height: 20px;
    background: linear-gradient(to right, #d32f2f, #f44336, #ffffff, #2196f3, #1976d2);
    border-radius: 4px;
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.85em;
}

.insights-list {
    margin-top: 15px;
}

.insight-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid;
}

.insight-strong-positive {
    background-color: #e3f2fd;
    border-color: #1976d2;
}

.insight-strong-negative {
    background-color: #ffebee;
    border-color: #d32f2f;
}

.insight-moderate {
    background-color: #fff3e0;
    border-color: #f57c00;
}

.insight-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.insight-value {
    color: var(--secondary-color);
    font-size: 0.95em;
}

.help-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

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

summary {
    cursor: pointer;
    font-weight: bold;
    padding: 5px;
    user-select: none;
}

summary:hover {
    color: var(--primary-color);
}

details pre {
    margin: 10px 0;
    background-color: #f8f9fa;
    color: var(--text-color);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}

details ul,
details ol {
    margin: 10px 0;
    padding-left: 20px;
}

details li {
    margin-bottom: 5px;
}
