:root {
    --white: #FFFCF2;
    --grey: #CCC5b9;
    --dark-grey: #403D39;
    --black: #252422;
    --orange: #EB5E28;
    background: var(--white);
}
* {
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    padding: 20px;
}

header {
    text-align: center;
    margin: -30px -30px 20px -30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background: var(--black);
}
header h1 {
    color: var(--white);
    font-size: 2em;
    margin-left: 1em;
    font-weight: 800;
}
header p {
    font-size: 1.3em;
    color: var(--white);
    margin-left: 2em;
}
header a {
    color: inherit;
    text-decoration: none;
    padding: 0.1em 0.4em;
    border-radius: 0.8em 0.3em;
    background: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background-size: 200% 100%;
    background-position: 100% 0;
    transition: background-position 0.5s ease;
}
.navbar {
    display: flex;
    flex-direction: row;
    align-items: center;
}
header a:hover {
      background-image: linear-gradient(
        to right,
        rgba(235, 94, 40, 0.3),
        rgba(235, 94, 40, 0.9) 50%,
        rgba(235, 94, 40, 0.5)
      ) !important;
      background-position: 0 0;}

/* Upload Section */
.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4em;
    border-radius: 20px;
    border: 2px dashed black;
    padding: 70px 60px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.upload-section:hover, .upload-section.dragover {
    transform: scale(1.01);
    background: var(--grey);
}

.upload-section p {
    opacity: 0.9;
    font-size: 1.1em;
    margin-top: 2.5em;
}

.upload-section img {
    max-width: 8em;
    height: auto;
    align-items: center;
    margin-bottom: 1em;
}

input[type="file"] {
    display: none;
}

label {
    display: inline-block;
    margin-top: 3em;
    padding: 25px 30px;
    background: var(--black);
    color: var(--white);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

label:hover {
    background: var(--dark-grey);
}


/* tutorial */
.tutorial{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 3em;
    padding: 0 1em;
}
.step {
    text-align: center;
    font-size: 1.25em;
}
.step img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 0.5em auto 0;
}

@media (max-width: 768px) {
    .tutorial {
        grid-template-columns: 1fr;
        gap: 2em;
    }
    .step {
        font-size: 1.1em;
    }
    header h1 {
        font-size: 1.5em;
        margin-left: 0.5em;
    }
    header p {
        font-size: 1em;
        margin-left: 1em;
    }
    .navbar {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* FAQ */
h2 {
    font-size: 1.8em;
    margin: 3em 1em 1em 1em
}
.faq-bubble {
    border: 1px solid var(--black);
    border-radius: 20px;
    padding: 1.5em 2em;
    margin-left: 1.2em;
    margin-right: 1.2em;
    margin-bottom: 1.5em;
    background: var(--white);
}
.faq-bubble h3 {
    color: var(--black);
    margin-bottom: 0.5em;
    font-size: 1.3em;
}
.faq-bubble p {
    color: var(--dark-grey);
    font-size: 1.1em;
    line-height: 1.6;
}
/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 6em;
}
.stat-card {
    background: var(--black);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}
.stat-value {
    background: var(--black);
    font-size: 2em;
    font-weight: 500;
    color: white;
    margin-bottom: 5px;
}
.stat-label {
    background: var(--black);
    color: white;
    font-size: 0.9em;
}

/* Charts */
.chart-container {
    background: var(--white);
    padding: 1em;
    border: 2px solid var(--black);
    box-shadow: 4px 4px 0 4px;
    border-radius: 2px;
    margin-bottom: 3em;
}
.chart-container h2 {
    font-weight: 400;
    font-size: 2em;
    text-align: center;
    margin: 0 0 1em 0;
}
canvas {
    max-height: 400px;
}

/* filter */
.slider-container {
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 3em;
    margin-top: 3em;

}
.slider-label {
    color: var(--grey);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.year-display {
    margin-top: 30px;
    color: #c9c9c9;
    font-size: 1.1em;
    font-weight: 300;
    text-align: center;
    letter-spacing: 0.5px;
}

/* noUiSlider custom styling */
.noUi-target {
    background: var(--black) ;
    border: none ;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) ;
}
.noUi-connect {
    background: var(--orange) ;
}
.noUi-horizontal {
    height: 6px ;
}
.noUi-horizontal .noUi-handle {
    width: 24px ;
    height: 24px ;
    right: -12px ;
    top: -9px ;
    background: var(--orange) ;
    border: none ;
    border-radius: 50% ;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: grab;
}
.noUi-handle:before,
.noUi-handle:after {
    display: none;
}
.noUi-handle:hover {
    transform: scale(1.1);
}
.noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.05);
}

