/* =====================================================
   PAGE LAYOUT
===================================================== */
.heatmap-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 20px 80px;
    box-sizing: border-box;
}


.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat-value {
    font-family: monospace;
    font-weight: 600;
}

.stat-value.big {
    font-size: 1.4rem;
    color: var(--accent-color);
}

/* Insight Tip */
.insight-tip {
    margin-top: 10px;
    padding: 12px;
    font-size: 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-style: italic;
}

/* =====================================================
   THEME SELECTOR
===================================================== */
.theme-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.theme-btn.active {
    border-color: #fff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
}

/* =====================================================
   MOBILE POLISH
===================================================== */
@media (max-width: 600px) {
    .heatmap-page {
        padding-top: 120px;
    }

    .heatmap-header {
        flex-direction: column;
        align-items: flex-start;
    }

    #export-btn {
        width: 100%;
        text-align: center;
    }
}


/* =====================================================
   HEATMAP CARD
===================================================== */
.heatmap-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 50px;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Header */
.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.heatmap-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Export Button */
#export-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s ease;
}

#export-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* =====================================================
   HEATMAP SVG
===================================================== */
.heatmap-container {
    overflow-x: auto;
    padding: 20px 0;
}

.heatmap-container svg {
    min-width: 860px;
    display: block;
}

/* Loading State */
.loading {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
    font-style: italic;
}

/* =====================================================
   LEGEND
===================================================== */
.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-colors {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.legend-colors li {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* =====================================================
   INSIGHTS SECTION
===================================================== */
.insights-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Responsive */
@media (max-width: 1000px) {
    .insights-section {
        grid-template-columns: 1fr;
    }
}

/* Insight Card */
.insight-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.insight-card h3 {
    font-size: 1.15rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =====================================================
   STATS
===================================================== */
.insight-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.stat-value {
    font-weight: 600;
    font-family: monospace;
}

.stat-value.big {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.insight-tip {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
    border-radius: 10px;
    margin-top: 10px;
}

/* =======================
   Theme Selector
   ======================= */
.theme-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

.theme-btn.active {
    border-color: white;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

/* =======================
   Responsive Fixes for Navbar Overlap
   ======================= */
@media (max-width: 1200px) {
    .heatmap-container {
        padding-top: 120px; /* Ensure navbar does not overlap */
    }
}

/* =====================================================
   PAGE LAYOUT
