#stats-view {
    max-width: 1200px; /* Wider for stats */
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Titles with Gradient & Neon */
#stats-view .view-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

#stats-view .view-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-light) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

#stats-view .view-title .highlight {
    color: var(--accent-primary);
    -webkit-text-fill-color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

/* Section Headers */
#stats-view .form-section-title {
    color: var(--text-light);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 40px 0 25px 0;
    padding-left: 15px;
    border-left: 4px solid var(--accent-primary);
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.1) 0%, transparent 100%);
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
}

/* Grid & Cards (Base styles from config) */
#stats-view .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjusted minmax */
    gap: 25px;
    margin-bottom: 35px;
}

#stats-view .form-group {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

#stats-view .form-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(52, 211, 153, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

#stats-view .form-group:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#stats-view .form-group:hover::before {
    opacity: 1;
}

/* Specific Stats Cards */
#stats-view .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

#stats-view .stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#stats-view .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

#stats-view .stat-card.highlight-stat {
    border-color: var(--accent-primary);
    background: rgba(52, 211, 153, 0.05);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.1);
}

#stats-view .stat-title {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#stats-view .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-light);
    font-family: var(--font-heading);
    margin-bottom: 5px;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#stats-view .stat-card.highlight-stat .stat-value {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

#stats-view .stat-comparison {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Charts Grid */
#stats-view .stats-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

#stats-view .chart-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

#stats-view .chart-container h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

#stats-view .chart-container.full-width {
    grid-column: 1 / -1;
}

/* Controls / Toolbar */
#stats-view .toolbar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

#stats-view .toolbar label {
    display: flex;
    align-items: center;
    color: var(--text-medium);
    font-weight: 500;
    margin-right: 5px;
}

/* Inputs in Toolbar */
#stats-view .toolbar select,
#stats-view .toolbar input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#stats-view .toolbar select:focus,
#stats-view .toolbar input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    #stats-view .toolbar {
        flex-direction: column;
        border-radius: 16px;
        width: 100%;
        gap: 15px;
    }
    
    #stats-view .stats-charts-grid {
        grid-template-columns: 1fr;
    }
}
