/* aeon-play Custom Styles */

/* Root Variables */
:root {
    --aeon-primary: #2c3e50;
    --aeon-secondary: #18bc9c;
    --aeon-accent: #3498db;
    --aeon-warning: #f39c12;
    --aeon-danger: #e74c3c;
    --aeon-light: #ecf0f1;
    --aeon-dark: #2c3e50;
    --sidebar-width: 320px;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Navbar Customization */
.navbar-brand {
    font-size: 1.4rem;
}

.level-btn {
    min-width: 90px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--aeon-primary) 0%, var(--aeon-secondary) 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.3rem;
    opacity: 0.95;
}

/* Feature Cards */
.feature-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature-card .card-header {
    background: linear-gradient(135deg, var(--aeon-primary) 0%, var(--aeon-accent) 100%);
    color: white;
    font-weight: 600;
    border: none;
}

.feature-card.classification .card-header {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.feature-card.regression .card-header {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
}

.feature-card.clustering .card-header {
    background: linear-gradient(135deg, #9b59b6 0%, #a569bd 100%);
}

.feature-card.forecasting .card-header {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
}

.feature-card.anomaly .card-header {
    background: linear-gradient(135deg, #e74c3c 0%, #ec7063 100%);
}

.feature-card.segmentation .card-header {
    background: linear-gradient(135deg, #1abc9c 0%, #48c9b0 100%);
}

.feature-card.similarity .card-header {
    background: linear-gradient(135deg, #34495e 0%, #5d6d7e 100%);
}

/* Task Page Layout */
.task-sidebar {
    width: var(--sidebar-width);
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.task-main {
    flex: 1;
    padding-left: 1.5rem;
}

.task-results {
    width: 300px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

/* Parameter Forms */
.param-form {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.param-form label {
    font-weight: 500;
    color: var(--aeon-primary);
    font-size: 0.9rem;
}

.param-group {
    margin-bottom: 0.75rem;
}

/* Learning Sections */
.learning-section {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
    border-left: 4px solid var(--aeon-accent);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.learning-section h5 {
    color: var(--aeon-accent);
    margin-bottom: 0.5rem;
}

.learning-section p {
    margin-bottom: 0;
    color: #555;
}

/* Level Indicators */
.level-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    font-weight: 600;
}

.level-beginner {
    background: #d4edda;
    color: #155724;
}

.level-intermediate {
    background: #fff3cd;
    color: #856404;
}

.level-advanced {
    background: #f8d7da;
    color: #721c24;
}

/* Data Preview */
.data-preview-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.data-info-panel {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
}

.data-stat {
    text-align: center;
    padding: 0.5rem;
}

.data-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--aeon-primary);
}

.data-stat .label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
}

/* Metrics Display */
.metric-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.5rem;
}

.metric-card .metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--aeon-secondary);
}

.metric-card .metric-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
}

/* Code Export */
.code-export {
    background: var(--aeon-dark);
    color: #ecf0f1;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.code-export pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Tabs Styling */
.custom-tabs .nav-link {
    color: var(--aeon-primary);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.5rem;
}

.custom-tabs .nav-link:hover {
    border-color: var(--aeon-light);
}

.custom-tabs .nav-link.active {
    color: var(--aeon-secondary);
    border-bottom-color: var(--aeon-secondary);
    background: transparent;
}

/* Loading States */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--aeon-light);
    border-top-color: var(--aeon-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltips */
.tooltip-icon {
    color: #6c757d;
    cursor: help;
    margin-left: 0.25rem;
}

/* Distance Matrix */
.distance-matrix {
    overflow-x: auto;
}

/* Progress Bar */
.run-progress {
    height: 4px;
    margin-bottom: 1rem;
}

/* Toast Notifications */
.toast-notification {
    min-width: 300px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .task-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 1.5rem;
    }

    .task-main {
        padding-left: 0;
    }

    .task-results {
        width: 100%;
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Preset Buttons */
.preset-btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Warning/Info Boxes */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-box {
    background: #cce5ff;
    border: 1px solid #b8daff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Series Plot Container */
.series-plot-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Confusion Matrix */
.confusion-matrix {
    font-family: monospace;
}

/* Algorithm Card */
.algorithm-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.algorithm-card:hover {
    border-color: var(--aeon-secondary);
    background: #f8f9fa;
}

.algorithm-card.selected {
    border-color: var(--aeon-secondary);
    background: #e8f8f5;
}

.algorithm-tags {
    margin-top: 0.5rem;
}

.algorithm-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    margin-right: 0.25rem;
    background: #e9ecef;
    border-radius: 0.25rem;
    color: #495057;
}
