* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #f5f5f0;
    --text-color: #1a1a1a;
    --accent-color: #ff3333;
    --secondary-color: #333;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-caret {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--secondary-color);
}

#lang-select {
    padding: 8px 36px 8px 16px;
    font-size: 16px;
    border: 2px solid var(--secondary-color);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#lang-select:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

#lang-select:hover ~ .lang-caret {
    color: var(--accent-color);
}

/* Header */
.header {
    text-align: center;
    margin: 60px 0 40px;
}

.title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 900;
    font-size: clamp(32px, 8vw, 64px);
    line-height: 1.1;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 600;
    color: var(--secondary-color);
}

/* Counter Section */
.counter-section {
    text-align: center;
    margin: 60px 0;
}

.counter-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.counter-number {
    font-family: 'Work Sans', sans-serif;
    font-weight: 900;
    font-size: clamp(80px, 20vw, 160px);
    line-height: 1;
    color: var(--accent-color);
}

.counter-total {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(40px, 10vw, 80px);
    line-height: 1;
    color: var(--secondary-color);
}

.progress-bar {
    width: 100%;
    height: 32px;
    background: #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff6666);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Insult Section */
.insult-section {
    text-align: center;
    margin: 80px 0;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.insult-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(24px, 5vw, 42px);
    line-height: 1.3;
    color: var(--accent-color);
}

/* Section Title */
.section-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 6vw, 48px);
    margin-bottom: 24px;
    text-align: center;
}

.section-title.special-event {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Savings Section */
.savings-section {
    margin: 60px 0;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.savings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.savings-card {
    padding: 32px;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border-radius: 12px;
    text-align: center;
}

.savings-card--stress {
    background: linear-gradient(135deg, #ffe0e0, #ffd0d0);
}

.savings-amount {
    font-family: 'Work Sans', sans-serif;
    font-weight: 900;
    font-size: clamp(36px, 8vw, 56px);
    color: var(--accent-color);
    margin-bottom: 8px;
}

.savings-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
}

.savings-caption {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Japan Section */
.japan-section {
    margin: 60px 0;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}

.japan-cost {
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 600;
}

.japan-progress-bar {
    width: 100%;
    height: 40px;
    background: #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.japan-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    transition: width 0.3s ease;
}

.japan-progress-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.japan-late {
    font-size: 16px;
    color: var(--accent-color);
    font-weight: 600;
}

/* Duolingo Section */
.duolingo-section {
    margin: 60px 0;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f0fff4, #e0f7ff);
    border-radius: 16px;
    border: 2px solid #58cc02;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.duolingo-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(88, 204, 2, 0.2);
}

.duolingo-section--error {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff8e1, #ffe0b2);
}

.duolingo-section--disabled {
    border-color: #bdbdbd;
    background: linear-gradient(135deg, #f5f5f5, #eeeeee);
    opacity: 0.7;
}

.duolingo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.duolingo-icon {
    width: 64px;
    height: 64px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.duolingo-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    margin: 0;
}

.duolingo-xp {
    font-family: 'Work Sans', sans-serif;
    font-weight: 900;
    font-size: clamp(48px, 8vw, 72px);
    color: #58cc02;
    margin: 20px 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.duolingo-status {
    font-size: 15px;
    color: #666;
    margin: 16px 0 0 0;
    font-style: italic;
}

.duolingo-status--error {
    color: #ff6f00;
    font-weight: 600;
    font-style: normal;
}

/* Character Section */
.character-section {
    margin: 80px 0;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fff5e0, #ffe0e0);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 3px solid var(--accent-color);
}

.character-card {
    text-align: center;
}

.character-image {
    width: 100%;
    max-width: 500px;
    height: 400px;
    margin: 0 auto 24px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
}

.character-placeholder {
    width: 100%;
    max-width: 400px;
    height: 400px;
    margin: 0 auto 24px;
    background: #f0f0f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
}

.character-placeholder p {
    color: #999;
    font-size: 14px;
    padding: 8px;
}

.character-query {
    font-size: 12px !important;
    max-width: 80%;
    word-wrap: break-word;
}

.character-caption {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(24px, 5vw, 36px);
    color: var(--accent-color);
}

/* Food Section */
.food-section {
    margin: 60px 0;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.food-card {
    text-align: center;
    margin-bottom: 32px;
}

.food-image {
    width: 100%;
    max-width: 500px;
    height: 400px;
    margin: 0 auto 24px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
}

.food-image-placeholder {
    width: 100%;
    max-width: 500px;
    height: 400px;
    margin: 0 auto 24px;
    background: #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
}

.food-image-placeholder p {
    color: #999;
    font-size: 14px;
    padding: 16px;
    text-align: center;
    word-wrap: break-word;
    max-width: 90%;
}

.food-name {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 6vw, 42px);
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.food-description {
    font-size: 18px;
    color: #666;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

.food-question {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 6vw, 48px);
    text-align: center;
    color: var(--accent-color);
    margin-top: 40px;
}

.food-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.past-foods-link {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    background: var(--card-bg);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-block;
}

.past-foods-link:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Footer */
.footer {
    text-align: center;
    margin: 80px 0 40px;
    padding: 40px 20px;
    border-top: 2px solid #e0e0e0;
}

.footer-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(20px, 4vw, 28px);
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 16px;
    }

    .language-switcher {
        top: 12px;
        right: 12px;
    }

    .savings-grid {
        grid-template-columns: 1fr;
    }

    .insult-section,
    .savings-section,
    .japan-section,
    .character-section,
    .food-section {
        padding: 24px 16px;
    }
}
