@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #050505;
    --bg-card: #121212;
    --bg-card-hover: #1a1a1a;
    
    --gold-primary: #c6a77b;
    --gold-light: #c6a77b;
    --gold-dark: #c6a77b;
    --gold-accent: linear-gradient(135deg, #c6a77b 0%, #c6a77b 50%, #c6a77b 100%);
    
    --text-main: #FFFFFF;
    --text-muted: #888888;
    
    --font-main: 'Outfit', sans-serif;
    
    --chart-bar-bg: #2a2a2a;
    --positive: #D4AF37; /* Gold for positive */
    --neutral: #666; 
    --negative: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    padding: 2rem;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
header {
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gold-accent);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gold-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-sub {
    font-size: 0.85rem;
    color: var(--gold-primary);
    margin-top: 0.5rem;
}

/* Sections */
.section-title {
    font-size: 1.5rem;
    color: var(--gold-light);
    margin: 3rem 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(212, 175, 55, 0.2);
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.question-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.question-text {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Charts */
.chart-container {
    margin-top: 1rem;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.bar-label {
    width: 60px;
    color: var(--text-muted);
    text-align: right;
    padding-right: 10px;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: var(--chart-bar-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: var(--gold-accent);
    border-radius: 4px;
    position: relative;
    /* Animation */
    width: 0;
    animation: growWidth 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes growWidth {
    to { width: var(--w); }
}

.bar-value {
    width: 45px;
    padding-left: 10px;
    color: var(--gold-primary);
    font-weight: 600;
}

/* Stacked Percentage Bar for "Answer Distribution" if needed */
.stacked-bar {
    display: flex;
    height: 12px;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.segment {
    height: 100%;
    transition: width 1s ease;
}

.seg-5 { background: #FFD700; } /* 5 stars */
.seg-4 { background: #D4AF37; }
.seg-3 { background: #997D29; }
.seg-2 { background: #555; }
.seg-1 { background: #333; }

/* Responsive */
@media (max-width: 768px) {
    body { padding: 1rem; }
    h1 { font-size: 1.8rem; }
    .questions-grid { grid-template-columns: 1fr; }
}

/* Utilities */
.text-gold { color: var(--gold-primary); }

/* Values & Impact Section tweaks */
.question-card[style*="grid-column: span 3"] {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-card-hover));
}

/* --- New Header Visualizations --- */
.charts-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.chart-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.chart-tag {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* SVG Base Styles */
svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Line Chart */
.line-chart-container {
    height: 250px;
    position: relative;
}

.line-path {
    fill: none;
    stroke: var(--gold-primary);
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 4px 6px rgba(212, 175, 55, 0.3));
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.area-fill {
    fill: url(#goldGradient);
    opacity: 0.2;
    animation: fadeIn 2s ease forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.25; }
}

.chart-grid-line {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.chart-axis-text {
    fill: var(--text-muted);
    font-size: 10px;
    font-family: var(--font-main);
}

/* Radar Chart */
.radar-chart-container {
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.radar-grid {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 0.5;
}

.radar-axis {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
}

.radar-area {
    fill: rgba(212, 175, 55, 0.2);
    stroke: var(--gold-light);
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
    transform-origin: center;
    transform: scale(0);
    animation: zoomIn 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.5s;
}

@keyframes zoomIn {
    to { transform: scale(1); }
}

.radar-label {
    fill: var(--gold-primary);
    font-size: 11px;
    font-weight: 600;
    text-anchor: middle;
    font-family: var(--font-main);
}

/* Responsive */
@media (max-width: 900px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    .radar-chart-container {
        height: 350px; /* More space on mobile if needed */
    }
}

/* --- Interactive Tooltips (CSS Only) --- */

/* Line & Radar Point Trigger */
.chart-point, .radar-point {
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-point circle, .radar-point circle {
    transition: r 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), stroke-width 0.2s;
}

.chart-point:hover circle, .radar-point:hover circle {
    r: 6px;
    stroke-width: 3px;
    fill: var(--bg-card);
    stroke: var(--gold-light);
}

/* Tooltip Container */
.chart-tooltip {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-10px); /* Start slightly left */
}

.chart-point:hover .chart-tooltip, .radar-point:hover .chart-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Tooltip Styling */
.tooltip-bg {
    fill: rgba(0, 0, 0, 0.9);
    stroke: var(--gold-primary);
    stroke-width: 1px;
    rx: 4; /* rounded corners */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.tooltip-text {
    fill: #fff;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-main);
    text-anchor: middle;
}

.tooltip-sub {
    fill: var(--gold-primary);
    font-size: 9px;
}

