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

body {
    font-family: "M PLUS Rounded 1c", sans-serif;
    background-color: #FCF9EA;
    color: #333333;
    min-height: 100vh;
    padding: 10px;
    overflow-x: hidden;
}

/* Screen management */
.screen {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screen.hidden {
    display: none;
}

.container {
    max-width: 100%;
    width: 100%;
    text-align: center;
    position: relative;
    padding: 0 10px;
}

/* Back to menu button */
.btn-back-to-menu-bottom {
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    background-color: white;
    color: #666666;
    border: 2px solid #BADFDB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 500;
}

.btn-back-to-menu-bottom:hover {
    background-color: #BADFDB;
    border-color: #A0CFC9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(186, 223, 219, 0.4);
}

.btn-back-to-menu-bottom:active {
    transform: translateY(0);
}

/* Money characters */
.money-characters {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.money-character {
    width: 70px;
    height: auto;
    animation: bounce 2s ease-in-out infinite;
}

.money-character:nth-child(2) {
    animation-delay: 0.3s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #FFA4A4;
    font-weight: 600;
}

/* Welcome text */
.welcome-text {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Mode selection */
.mode-selection {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-mode {
    font-family: "M PLUS Rounded 1c", sans-serif;
    padding: 1.2rem;
    background-color: #BADFDB;
    color: #333333;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-mode:hover {
    background-color: #A0CFC9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(186, 223, 219, 0.4);
}

.btn-mode:active {
    transform: translateY(0);
}

.mode-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.mode-desc {
    font-size: 0.8rem;
    color: #666666;
}

/* Daily stats */
.daily-stats {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #aaa;
    text-align: center;
}

/* Question area */
.question-area {
    background-color: transparent;
    padding: 1rem;
    border-radius: 12px;
}

.question-text {
    font-size: 1.5rem;
    color: #666666;
    margin-bottom: 1.5rem;
}

/* Stamp container */
.stamp-container {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.stamp {
    width: 45px;
    height: auto;
    animation: stampAppear 0.3s ease-out;
}

@keyframes stampAppear {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Money display (for identify mode) */
.money-display {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.money-image {
    max-width: 200px;
    height: auto;
}

/* Money collection (for count mode) */
.money-collection {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    padding: 0.5rem;
}

.money-item {
    max-width: 80px;
    height: auto;
}

/* Answer buttons */
.answer-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-answer {
    font-family: "M PLUS Rounded 1c", sans-serif;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    background-color: #FFBDBD;
    color: #333333;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    min-width: 100px;
}

.btn-answer:hover {
    background-color: #FFA4A4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 189, 189, 0.4);
}

.btn-answer:active {
    transform: translateY(0);
}

.btn-answer:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Current amount display (for make mode) */
.current-amount-display {
    font-size: 1.3rem;
    color: #666666;
    margin-bottom: 1.5rem;
    padding: 0.8rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(186, 223, 219, 0.2);
}

.current-amount-display .amount {
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFA4A4;
}

/* Money selector (for make mode) */
.money-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.7rem;
    margin: 1.5rem 0;
}

.money-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem;
    background-color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.money-option:hover {
    background-color: #BADFDB;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(186, 223, 219, 0.4);
}

.money-option:active {
    transform: translateY(0);
}

.money-option img {
    max-width: 70px;
    height: auto;
}

.money-option .label {
    font-size: 1rem;
    font-weight: 600;
}

.money-option .count {
    font-size: 0.85rem;
    color: #666666;
}

/* Control buttons */
.controls {
    display: flex;
    gap: 0.7rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    font-family: "M PLUS Rounded 1c", sans-serif;
}

.btn-reset-selection {
    background-color: #FFBDBD;
    color: #333333;
}

.btn-reset-selection:hover {
    background-color: #FFA4A4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 189, 189, 0.4);
}

.btn-check-answer {
    background-color: #BADFDB;
    color: #333333;
}

.btn-check-answer:hover {
    background-color: #A0CFC9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(186, 223, 219, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Completion message */
.completion-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.completion-message img {
    width: 150px;
    height: auto;
}

.completion-message .text {
    color: #FFA4A4;
    font-size: 2.5rem;
    font-weight: 600;
}

/* Feedback message */
.feedback-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 4px solid #FFBDBD;
    border-radius: 20px;
    padding: 2rem 3rem;
    box-shadow: 0 8px 16px rgba(255, 164, 164, 0.3);
    z-index: 1000;
    animation: popIn 0.3s ease-out;
    text-align: center;
}

.feedback-message .feedback-icon {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
}

.feedback-message .message {
    font-size: 1.8rem;
    color: #FFA4A4;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feedback-message .hint {
    font-size: 1.2rem;
    color: #666666;
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Overlay for feedback */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .mode-selection {
        flex-direction: column;
        align-items: center;
    }

    .btn-mode {
        width: 100%;
        max-width: 300px;
    }

    .question-text {
        font-size: 1.5rem;
    }

    .money-image {
        max-width: 200px;
    }

    .money-item {
        max-width: 80px;
    }

    .btn-answer {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
        min-width: 100px;
    }

    .stamp {
        width: 45px;
    }

    .money-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .money-option img {
        max-width: 70px;
    }
}
