/* --- Main Theme & Layout --- */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-container {
    flex-grow: 1;
}

/* --- Header & Footer --- */
.navbar {
    background-color: #1e1e1e !important;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.navbar-brand { 
    color: #fff !important; 
}

footer {
    background-color: #1e1e1e !important;
    border-top: 1px solid #333;
    flex-shrink: 0;
    margin-top: auto;
}

/* --- Input Section --- */
#input-section .card {
    background: #1e1e1e;
    border: 1px solid #333;
    text-align: center;
}
#input-section h1 { color: #fff; }
#input-section p { color: #aaa; }

#features-section .feature-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    height: 100%;
}
#screenshots-content h4 {
    color: #fff;
}

#schemaAccordion .list-card li {
    color: #fff; /* Force white text for high contrast */
}
#features-section p { color: #aaa; }

/* --- Report Layout & Cards --- */
#report-dashboard {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
}

.report-card {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    height: 100%;
}

.report-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}

/* --- Score Charts --- */
#score-charts-container .score-card {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1rem;
}

#score-charts-container canvas {
    max-height: 100px;
}

#score-charts-container h6 {
    color: #aaa;
    margin-top: 0.5rem;
}

/* --- Main Audit Tabs --- */
#audit-tabs {
    border-bottom-color: #333;
}

#audit-tabs .nav-link {
    background-color: transparent;
    border: 1px solid transparent;
    color: #aaa;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
}

#audit-tabs .nav-link.active {
    background-color: #2a2a2a;
    border-color: #444 #444 #2a2a2a;
    color: #fff;
}

#audit-tabs-content {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.tab-pane .row {
    align-items: stretch; /* Make columns in a row the same height */
}

/* --- Performance Section --- */
.nav-tabs {
    border-bottom-color: #333;
}

.nav-tabs .nav-link {
    background-color: transparent;
    border: 1px solid #333;
    color: #aaa;
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
}

.nav-tabs .nav-link.active {
    background-color: #1e1e1e;
    border-color: #333 #333 #1e1e1e;
    color: #fff;
}

.tab-content {
    background-color: #1e1e1e;
    padding: 1.5rem;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.metric-card {
    background-color: #2a2a2a;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    height: 100%;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.metric-label {
    font-size: 0.85rem;
    color: #aaa;
}

/* --- Generic Cards & Lists --- */
.info-card p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}
.info-card .text-muted { color: #aaa !important; }

.list-card .text-muted {
    color: #cccccc !important; /* A brighter grey than #aaa */
}

.list-card {
    padding-left: 0;
    list-style: none;
    margin-bottom: 0;
}

.list-card li {
    padding: 0.75rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-card li:last-child {
    border-bottom: none;
}

.list-card li code {
    font-size: 0.85rem;
    word-break: break-all;
    background-color: #333;
    padding: 2px 4px;
    border-radius: 4px;
    color: #f0f0f0;
}

/* --- Utility Classes --- */
.status-icon { font-size: 1.2rem; margin-right: 0.5rem; }
.text-success { color: #28a745 !important; }
.text-warning { color: #ffc107 !important; }
.text-danger { color: #dc3545 !important; }

/* --- Loader --- */
#loader p { color: #fff; }

.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.loading-dot {
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0);
    } 40% {
        transform: scale(1.0);
    }
}

.card-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    color: #fff;
}

/* --- Chart Customizations --- */
canvas {
    max-width: 100%;
    height: auto;
}

/* --- Glassmorphism Effect --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* --- Responsive Adjustments --- */
@media (max-width: 767.98px) {
    #report-dashboard {
        padding: 1rem;
    }
    .report-card {
        padding: 1rem;
    }
    .info-card p {
        font-size: 1.2rem;
    }
    #audit-tabs .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* --- Accordion Customization --- */
.accordion-item {
    background-color: #3a3a3a;
    border: 1px solid #444;
}
.accordion-button {
    background-color: #3a3a3a;
    color: #e0e0e0;
}
.accordion-button:not(.collapsed) {
    background-color: #4a4a4a;
    color: #fff;
}
.accordion-button:focus {
    box-shadow: none;
    border-color: #444;
}
.accordion-button::after {
    filter: invert(1) grayscale(100%);
}
.accordion-body {
    background-color: #2a2a2a;
}