/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --dark-bg: #1d1b31;
    --light-bg: #f5f7fa;
    --text-dark: #333;
    --text-light: #f5f7fa;
    --success-color: #4ade80;
    --warning-color: #fb923c;
    --danger-color: #ef4444;
    --neutral-color: #94a3b8;
    --text-color: #333;
    --card-bg-color: #fff;
    --primary-rgb: 67, 97, 238;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 0 28px;
    margin-bottom: 30px;
}

.logo i {
    font-size: 28px;
    margin-right: 10px;
    color: var(--accent-color);
}

.logo h2 {
    font-weight: 700;
    font-size: 22px;
}

.logo span {
    color: var(--accent-color);
}

.nav {
    list-style: none;
    flex: 1;
    padding-left: 8px;
}

.nav li {
    padding: 12px 15px 12px 20px;
    margin: 5px 8px 5px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    border-left: 4px solid transparent;
    border-radius: 0 8px 8px 0;
}

.nav li i {
    margin-right: 10px;
    font-size: 18px;
}

.nav li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav li.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    color: var(--accent-color);
}

.sidebar-footer {
    padding: 20px;
    font-size: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.header-title h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.header-title p {
    color: var(--neutral-color);
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    color: var(--neutral-color);
    margin-right: 10px;
    font-size: 14px;
}

/* Content Section Styles */
.content-section {
    display: none;
    animation: fadeIn 0.5s;
}

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

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.section-header p {
    color: var(--neutral-color);
    font-size: 14px;
}

/* KPI Cards */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

.kpi-icon i {
    font-size: 20px;
    color: var(--primary-color);
}

.kpi-info h3 {
    font-size: 14px;
    color: var(--neutral-color);
    margin-bottom: 5px;
}

.kpi-info p {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Chart Container */
.chart-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: 100%;
}

.chart-card.wide {
    grid-column: 1 / -1;
}

.chart-card h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

/* Prediction Tool */
.prediction-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-form {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.input-form h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--neutral-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-dark);
}

.checkbox-group input {
    width: auto;
    margin-right: 5px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

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

/* Prediction Result */
.prediction-result {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.prediction-result h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.result-container {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.result-placeholder {
    text-align: center;
    color: var(--neutral-color);
    padding: 30px;
}

.gauge-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gauge-value {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 42px;
    font-weight: 800;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark-mode .gauge-value {
    text-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* Pulse animation for gauge value */
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.gauge-value.pulse {
    animation: pulse 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.prediction-text {
    text-align: center;
    margin-top: 20px;
    padding: 20px 15px;
    border-radius: 12px;
    background-color: var(--card-bg-color);
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.dark-mode .prediction-text {
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
}

.prediction-text p {
    margin-bottom: 12px;
    font-size: 17px;
    line-height: 1.6;
}

.prediction-text p:first-child {
    font-weight: 500;
    margin-bottom: 16px;
}

/* Make the probability value stand out */
#prediction-probability {
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
    background-color: rgba(var(--primary-rgb), 0.1);
    margin-left: 4px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    display: inline-block;
    font-size: 1.05rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark-mode #prediction-probability {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Comparison Table */
.comparison-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

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

table th,
table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

/* Insights */
.insights-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.insight-card {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: flex-start;
}

.insight-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

.insight-icon i {
    font-size: 16px;
    color: var(--primary-color);
}

.insight-info h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.insight-info p {
    font-size: 14px;
    color: var(--neutral-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .chart-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .logo h2,
    .nav li span,
    .sidebar-footer {
        display: none;
    }
    
    .logo i {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .prediction-container,
    .comparison-container {
        grid-template-columns: 1fr;
    }
    
    .kpi-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* Feature Importance Bar Chart */
#feature-importance-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.feature-bar {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.feature-name {
    width: 150px;
    font-size: 14px;
}

.feature-bar-container {
    flex: 1;
    background-color: #eee;
    border-radius: 3px;
    height: 20px;
    overflow: hidden;
}

.feature-bar-value {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}

.feature-importance {
    width: 60px;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
    padding-left: 10px;
    color: var(--text-color);
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Status indicator styling (preserved but not used) */
/*.demo-mode-indicator,
.demo-indicator-styled,
.status-indicator {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #4361ee;
    font-weight: 500;
    text-align: center;
    padding: 8px 15px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 6px;
    border-left: 3px solid #4361ee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 0.4s ease-in-out;
    transition: all 0.2s ease;
}

.demo-mode-indicator:hover,
.demo-indicator-styled:hover,
.status-indicator:hover {
    background: rgba(67, 97, 238, 0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}*/

/* Animations for notifications */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
