:root {
    --primary-color: #068C6D;
    --secondary-color: #F4B3CB;
    --background-color: #FCE1DA;
    --text-color: #000000;
    --text-highlight: #F45535;
}

html, body {
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

main {
    max-width: 100%;
    margin: auto;
    flex: 1;
}

.landing-page {
    width: 100%;
}

.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.svg-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.svg-bg-element {
    width: 100%;
    height: 100%;
    object-position: center top;
    object-fit: cover;
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Center the SVG properly */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding-right: 20px;
    padding-left: 20px;
    animation: fadeIn 1.5s ease-out;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow:
            -0.3px -0.3px 0 black,
            0.3px -0.3px 0 black,
            -0.3px  0.3px 0 black,
            0.3px  0.3px 0 black;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.highlight {
    font-size: 5rem;
    font-weight: 900;
    color: var(--text-highlight);
    margin: 20px 0;
    line-height: 1;
    display: block;
}

.subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.5;
    display: block;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: var(--text-highlight);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.content {
    padding: 0 120px 0 120px;
    text-align: center;
    text-wrap: balance;
}

.content svg {
    padding-top: 20px;
}

.content h2 {
    margin-bottom: 10px;
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow:
            -0.3px -0.3px 0 black,
            0.3px -0.3px 0 black,
            -0.3px  0.3px 0 black,
            0.3px  0.3px 0 black;}

.content h3 {
    margin: 0;
    font-size: 20px;
    text-align: left;
    text-wrap: pretty;
}

.content p {
    display: inline-block;
    text-align: left;
    text-wrap: pretty;
}


.bold-highlight {
    font-size: 20px;
    color: var(--text-highlight);
    text-shadow:
            -0.1px -0.1px 0 black,
            0.1px -0.1px 0 black,
            -0.1px  0.1px 0 black,
            0.1px  0.1px 0 black;}

.revolution-button, .globalOverview-button, .find-out-button, .cta-button-cultural, .cta-button-flavor {
    background-color: var(--secondary-color);
    color: black;
    border: none;
    margin-top: 30px;
    margin-bottom: 50px;
    padding: 10px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.revolution-button:hover, .globalOverview-button:hover, .find-out-button:hover, .cta-button-cultural:hover, .cta-button-flavor:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

hr {
    height: 2px;
    margin: 0 100px 0 100px;
    color: var(--text-highlight);
    background-color: var(--text-highlight);
    border: none;
    border-radius: 4px;
}

.year-dropdown option {
    text-align: center;
    background: #068C6D;
    color: white;
}

/* For Firefox */
.year-dropdown {
    text-align: center;
    text-align-last: center;
}

/*
#brand-select, #product-select {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    margin: 10px;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    background-color: white;
    color: var(--primary-color);
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#brand-select:hover,
#product-select:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}
*/

.label {
    font-family: sans-serif;
    font-size: 12px;
    pointer-events: none;

}
.center-image {
    pointer-events: none;
}


/* Ramen Visualization Styles */
.flavor-profile {
    margin: 10px 0 30px 0;
    text-align: left;
}

.flavor-profile p {
    margin: 12px 0; /* Add more vertical spacing */
    line-height: 1.6;
    display: block;
}

.ramen-visualization-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.ramen-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    position: relative;
}

.ramen-dropdown {
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 40px 12px 30px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    background-color: white;
    color: var(--primary-color);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 300px;
    margin: 8px auto;
    text-align: left;
    outline: none;
    position: relative;
}

.dropdown-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 300px;
}

.dropdown-container::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--primary-color);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s ease;
}

.ramen-dropdown:hover {
    background-color: var(--primary-color);
    border-color: var(--text-highlight);
    color: white;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.ramen-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ramen-carousel {
    display: flex;
    width: 100%;
    position: relative;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    transition: transform 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.ramen-slide {
    display: flex;
    align-items: center;
    min-width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
    padding: 20px;
    flex-direction: row;
    gap: 30px;
    transition: transform 0.3s ease;
}

.ramen-image-container {
    flex: 0 0 auto;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.ramen-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.ramen-slide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 300px;
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
}

.nav-button:hover {
    background-color: var(--text-highlight);
    transform: scale(1.1);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin: 40px 0 40px 0;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* Ramen details styling */
.ramen-brand {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.ramen-flavor {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
    color: var(--text-color);
}

.ramen-country {
    display: inline-block;
    background-color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.ramen-rating {
    font-size: 1.3rem;
    margin: 15px 0 15px 0;
    color: var(--text-highlight);
    font-weight: 600;
}

.ramen-rating .stars {
    color: gold;
    text-shadow: 0 0 1px rgba(0,0,0,0.3);
}

.ramen-description {
    line-height: 1.6;
    margin-bottom: 0;
    color: #333;
}

.no-ramen {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ramen-slide {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 5px;
    }

    .ramen-image {
        max-height: 250px;
    }

    .ramen-image-container,
    .ramen-slide-content {
        min-width: 100%;
        padding: 15px;
    }

    .nav-button {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .carousel-dots {
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .ramen-display {
        gap: 5px;
    }

    .nav-button {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .ramen-brand {
        font-size: 1.3rem;
    }

    .ramen-flavor {
        font-size: 1.1rem;
    }

    .ramen-slide-content {
        padding: 20px;
    }

    .carousel-dots {
        gap: 8px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

.chart-controls {
    margin: 20px 0 0 60px;
    text-align: start;
}

.year-dropdown {
    font-family: inherit;
    font-weight: 500;
    color: var(--primary-color);
    background-color: white;
    cursor: pointer;
}

.year-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(49, 63, 138, 0.2);
}

.noodle-bar {
    transition: fill 0.15s ease-out, opacity 0.15s ease-out;
}

#story-1 svg, #story-2 svg, #story-3 svg {
    display: block;
    margin: 0 auto;
}

#map {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Brand container styling */
.brand-chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Chart div styling */
.chart-div {
    width: 100%;
    height: auto;
}

/* Legend container styling */
.legend-div {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.brand-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: 4px;
    max-width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-text {
    font-size: 12px;
    color: #333;
    white-space: wrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

#price-history {
    padding-bottom: 20px;
}

/* Tooltip styles */
.line-chart-tooltip,
.choropleth-tooltip,
.bar-chart-tooltip {
    position: absolute;
    background: white;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    pointer-events: none;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
    min-width: 160px;
    z-index: 100;
}

.tooltip-header {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--text-highlight);
}

.tooltip-row {
    margin: 4px 0;
    display: flex;
}

.tooltip-label {
    font-weight: 600;
    color: black;
    min-width: 70px;
    display: inline-block;
}

/* Ensure text doesn't wrap in the values */
.tooltip-row > span:not(.tooltip-label) {
    white-space: nowrap;
}

.brand-chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dot {
    transition: r 0.2s ease;
}

.tooltip-country {
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.tooltip-value {
    color: black;
}

/* Turning Point Tooltip Styles */
.turning-point-tooltip {
    text-align: left;
}

.turning-point-tooltip h3 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 16px;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 8px;
}

.turning-point-tooltip .tooltip-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.turning-point-tooltip .emoji {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.turning-point-tooltip .tooltip-row p {
    margin: 0;
    line-height: 1.4;
    flex-grow: 1;
    padding-top: 2px;
}

.turning-point-tooltip .gif-container {
    text-align: center;
    margin-top: 10px;
}

.turning-point-tooltip .gif-container img {
    max-width: 100%;
    border-radius: 4px;
}

.turning-point-hit-area {
    cursor: help;
    pointer-events: all;
}

.turning-point-tooltip .gif-caption {
    font-size: 12px;
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 5px;
    line-height: 1.4;
    padding: 0 10px;
}

.turning-point-marker {
    pointer-events: none;
}

.turning-point-label {
    font-weight: bold;
    pointer-events: none;
}

#package-type {
    text-align: left;
    margin: 0 auto;
}

.cultural-aspects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.aspect {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.aspect h3 {
    color: var(--text-highlight);
    margin-top: 0;
}

#package-type p {
    display: block;
    margin: 8px 0;
}

#pie-chart {
    text-align: center;
    margin: 50px auto;
}

#pie-chart svg {
    text-align: center;
    margin: 16px auto;
    display: flex;
    justify-content: center;
    overflow: visible;
}

.closing-thought {
    font-style: italic;
    text-align: center;
    margin-top: 40px;
    position: relative;
}

.closing-thought::before {
    content: "";
    display: block;
    width: 100px;
    height: 2px;
    background: var(--text-highlight);
    margin: 0 auto 20px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

footer {
    margin-top: 20px;
    background-color: var(--secondary-color);
    color: black;
    text-align: left;
    padding: 10px 20px 0 20px;
    font-size: 0.9em;
}
footer a {
    color: var(--text-color);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.4rem;
    }

    .highlight {
        font-size: 3.5rem;
        margin: 15px 0;
    }

    .subtitle {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    .cta-button, .cta-button-cultural {
        padding: 9px 25px;
        font-size: 0.9rem;
    }

    .content {
        padding: 0 30px 0 30px;
    }

    hr {
        margin: 0 50px 0 50px;
    }

    .introduction {
        padding: 0 20px 0 20px;
    }

    #line-chart {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.2rem;
    }

    .highlight {
        font-size: 3rem;
        margin: 12px 0;
    }

    .content {
        padding: 0 20px 0 20px;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.1rem;
    }

    .highlight {
        font-size: 2.5rem;
        margin: 10px 0;
    }

    .subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    .cta-button, .cta-button-cultural {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    .content {
        padding: 0 15px 0 15px;
    }

    .introduction {
        text-align: left;
        padding: 0;
    }
}

@media (max-width: 360px) {
    .hero h1 {
        font-size: 1rem;
    }

    .highlight {
        font-size: 2rem;
        margin: 8px 0;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .cta-button, .cta-button-cultural {
        padding: 7px 15px;
        font-size: 0.7rem;
    }

    .content {
        padding: 0 10px 0 10px;
    }

    .introduction {
        padding: 0;
    }
}