:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --bg-overlay: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

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

body {
    font-family: 'Quicksand', 'Noto Sans TC', sans-serif;
    overflow: hidden;
    background: #f0f2f5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 95vw;
    height: 95vh;
    max-width: 1200px;
    max-height: 800px;
    background: url('assets/background.png') no-repeat center center;
    background-size: cover;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

/* Base Overlay System */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Default center, overridden by kid-theme */
    align-items: center;
    color: white;
    z-index: 10;
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

/* Kid Friendly Theme Overlay */
.overlay.kid-theme {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    justify-content: flex-start;
    /* Override to top alignment */
    padding-top: 40px;
    padding-bottom: 60px;
    /* Space for button at bottom */
    overflow-y: auto;
    /* Allow scrolling if window is short */
    display: flex;
}

.settings-icon-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: #fff;
    text-shadow: 0 4px 0 #ff6b6b, 0 8px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: min(3vh, 20px);
    font-family: "Varela Round", sans-serif;
    text-align: center;
}

/* Language Toggle */
.language-toggle-container {
    display: flex;
    background: white;
    padding: 5px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.lang-btn {
    padding: 10px 30px;
    border-radius: 40px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.lang-btn.active {
    background: #4ecdc4;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.4);
}

.lang-icon {
    font-size: 1.8rem;
    font-weight: bold;
}

.lang-label {
    font-size: 0.8rem;
    font-weight: bold;
}

.instruction-hint {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #444;
    font-weight: bold;
    margin-bottom: min(3vh, 20px);
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Giant Mode Grid */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    /* Flexible columns */
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 600px;
    /* Limit width to keep buttons centered and not too spread */
}

.mode-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    padding: 15px;
    width: 130px;
    /* Reduced size */
    height: 130px;
    /* Reduced size */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 4px solid transparent;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.mode-card:hover {
    transform: translateY(-5px);
    background: white;
}

.mode-card.active {
    border-color: #ff6b6b;
    background: white;
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.2);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
}

.action-area {
    margin-top: 20px;
    margin-bottom: 40px;
    flex-shrink: 0;
}

/* Big Start Button */
.big-start-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    font-size: 2rem;
    padding: 15px 60px;
    border-radius: 60px;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
    flex-shrink: 0;
    /* Keep size on small height */
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

p {
    font-size: 1.5rem;
}

.instructions {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
}

.instructions p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.button-group {
    display: flex;
    gap: 1.5rem;
}

button.outline {
    background: transparent;
    border: 3px solid rgba(255, 255, 255, 0.6);
    color: white;
}

button.outline:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.player-input-container {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.player-input-container label {
    font-size: 1.5rem;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

#player-name {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    font-family: inherit;
    font-weight: bold;
    color: var(--primary-color);
    width: 150px;
    outline: none;
}

#leaderboard-container {
    background: rgba(255, 255, 255, 0.3);
    padding: 1rem;
    border-radius: 15px;
    margin: 1.5rem 0;
    width: 80%;
    max-width: 400px;
}

#leaderboard-container h3 {
    margin-bottom: 1rem;
    color: #ffe66d;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 1.5rem;
}

#leaderboard-list {
    list-style: none;
    padding: 0;
}

#leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    border-radius: 10px;
    font-weight: bold;
    color: #444;
}

#leaderboard-list li:first-child {
    background: linear-gradient(90deg, #ffd700, #f1c40f);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(241, 196, 15, 0.4);
}

.settings-panel {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    width: 80%;
    max-width: 500px;
}

.setting-item {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.setting-item label {
    font-size: 1.2rem;
    font-weight: bold;
}

input[type=range] {
    width: 100%;
    cursor: pointer;
}

button {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

#start-btn,
#restart-btn {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

#start-btn:hover,
#restart-btn:hover {
    transform: scale(1.1);
    background-color: #ff5252;
}

.mode-selector button {
    background: var(--glass-bg);
    color: #444;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.mode-selector button.active {
    background: var(--secondary-color);
    color: white;
}

#game-hud {
    position: relative;
    /* Changed from absolute to relative */
    width: 100%;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    background: rgba(255, 255, 255, 0.6);
    /* Semi-transparent bar */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    /* Prevent shrinking */
}

.hud-center {
    display: flex;
    gap: 20px;
    /* Space between Mode and Player Name */
    align-items: center;
}

.hud-left,
.hud-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 200px;
    /* Fixed width to ensure center is truly centered */
}

.hud-right {
    justify-content: flex-end;
}

.mini-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: var(--glass-bg);
    color: #333;
    border-radius: 10px;
}

.mini-btn:hover {
    background: var(--primary-color);
    color: white;
}

.hud-item {
    background: rgba(255, 255, 255, 0.9);
    /* More opaque */
    padding: 0.8rem 1.5rem;
    border-radius: 15px;
    font-size: 1.5rem;
    /* Larger font */
    font-weight: bold;
    color: #333;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Stronger shadow */
    border: 2px solid white;
    /* Pop out more */
}

.hearts {
    font-size: 1.5rem;
}

#learning-stage {
    position: relative;
    /* Changed from absolute */
    width: 100%;
    height: auto;
    flex: 1;
    /* Fill remaining vertical space */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    overflow: hidden;
    /* Keep effects inside */
}

#learning-card {
    background: var(--glass-bg);
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#target-char {
    font-size: clamp(6rem, 20vw, 15rem);
    font-weight: bold;
    color: #ff6b81;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

#feedback-hint {
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    color: #444;
    text-align: center;
}

.success-bounce {
    animation: successBounce 0.6s ease;
}

@keyframes successBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        background-color: #f7d794;
    }
}

.retry-shake {
    animation: retryShake 0.4s ease;
}

@keyframes retryShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-20px);
    }

    75% {
        transform: translateX(20px);
    }
}

#game-stage {
    position: relative;
    width: 100%;
    height: auto;
    flex: 1;
    /* Fill remaining space */
    overflow: hidden;
}

.letter {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
    user-select: none;
    transition: transform 0.1s;
}

/* Character individual styles - rainbow colors */
.letter:nth-child(5n+1) {
    border-bottom: 5px solid #ff6b6b;
    color: #ff6b6b;
}

.letter:nth-child(5n+2) {
    border-bottom: 5px solid #4ecdc4;
    color: #4ecdc4;
}

.letter:nth-child(5n+3) {
    border-bottom: 5px solid #ffe66d;
    color: #b5a100;
}

.letter:nth-child(5n+4) {
    border-bottom: 5px solid #6c5ce7;
    color: #6c5ce7;
}

.letter:nth-child(5n+5) {
    border-bottom: 5px solid #a29bfe;
    color: #6c5ce7;
}

.pop-out {
    animation: popOut 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes popOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        color: #fff;
        background: var(--secondary-color);
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
}

@keyframes particle-fade {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.combo-text {
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    animation: floatUp 0.6s ease-out forwards;
    z-index: 6;
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

#im-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #fff9c4;
    /* Warning yellow */
    padding: 1.5rem 2rem;
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 4px solid #fbc02d;
    /* Strong amber border */
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: slideUp 0.4s ease-out, warningPulse 2s infinite;
}

#im-hint.hidden {
    display: none !important;
}

.hint-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hint-icon {
    font-size: 2rem;
}

#im-hint p {
    font-size: 1.4rem !important;
    font-weight: 800;
    color: #5d4037;
    margin: 0;
}

@keyframes warningPulse {
    0% {
        transform: translate(-50%, 0) scale(1);
    }

    50% {
        transform: translate(-50%, -5px) scale(1.02);
        box-shadow: 0 20px 50px rgba(251, 192, 45, 0.4);
    }

    100% {
        transform: translate(-50%, 0) scale(1);
    }
}

#close-hint-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
}

@keyframes slideUp {
    0% {
        transform: translate(-50%, 50px);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Shadow Mode */
#learning-card.shadow-mode #target-char {
    filter: brightness(0);
    text-shadow: none;
}

#target-char.reveal {
    animation: revealChar 0.5s forwards;
}

@keyframes revealChar {
    0% {
        filter: brightness(0);
    }

    100% {
        filter: brightness(1);
    }
}

/* Boss Mode HP */
#boss-hp {
    width: 200px;
    height: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    margin-top: 10px;
}

#hp-bar {
    width: 100%;
    height: 100%;
    background: #ff4757;
    border-radius: 5px;
    transition: width 0.3s;
}

/* Flower Mode */
#flower-garden {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 50px;
}

.flower {
    font-size: 2rem;
    animation: growFlower 0.5s ease-out;
}

.flower.big-flower {
    font-size: 3rem;
}

@keyframes growFlower {
    0% {
        transform: scale(0);
    }

    80% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Ghost Mode */
#ghost-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 1;
    /* Behind the card usually, but card is z-index auto/0? learning-stage is z-5. */
}

.ghost {
    position: absolute;
    font-size: 3rem;
    opacity: 0.6;
    animation: ghostFloat 3s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    transition: transform 0.3s;
}

@keyframes ghostFloat {
    0% {
        transform: translate(0, 0) rotate(5deg);
    }

    100% {
        transform: translate(20px, -30px) rotate(-5deg);
    }
}

/* Collection Bar */
#collected-chars-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    overflow-x: auto;
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 10;
    scrollbar-width: none;
    /* Firefox */
}

#collected-chars-container.top-bar {
    bottom: auto;
    top: 85px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#collected-chars-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.collected-char {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ghostHurry {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(50px, -40px) rotate(15deg) scale(1.1);
    }

    50% {
        transform: translate(-30px, -80px) rotate(-10deg) scale(0.9);
    }

    75% {
        transform: translate(40px, -20px) rotate(20deg) scale(1.2);
    }

    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
}

@keyframes spookyFlicker {

    0%,
    100% {
        opacity: 1;
        filter: brightness(0) blur(0px);
    }

    50% {
        opacity: 0.7;
        filter: brightness(0) blur(2px) contrast(1.5);
    }

    70% {
        opacity: 0.9;
        filter: brightness(0) blur(1px);
    }
}

.ghost.hurry {
    animation: ghostHurry 1.5s infinite linear;
    opacity: 0.8;
}

#learning-card.shadow-mode #target-char {
    filter: brightness(0);
    text-shadow: none;
    animation: spookyFlicker 2s infinite ease-in-out;
}

#learning-card.shadow-mode.hurry-mode {
    background: rgba(44, 62, 80, 0.7);
    border: 3px solid #9b59b6;
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
}



.flower.sprout {
    font-size: 1.8rem;
    filter: grayscale(0.2);
}

.flower.big-flower {
    font-size: 4rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    animation: merge-scale 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    z-index: 10;
}

@keyframes grow {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes merge-scale {
    0% {
        transform: scale(0.5) rotate(-10deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.3) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Train Mode */
#train-track {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 100px;
    /* Increased height for big trains */
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 20px;
    overflow-x: auto;
    border-top: 4px dashed rgba(255, 255, 255, 0.3);
}

.carriage {
    min-width: 60px;
    height: 50px;
    background: var(--secondary-color);
    margin-right: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
    transition: all 0.5s ease;
}

.carriage.cargo {
    background: #95a5a6;
    /* Grey box */
    min-width: 50px;
    height: 40px;
    font-size: 1.2rem;
}

.carriage.special {
    background: linear-gradient(to right, #f1c40f, #e67e22);
    /* Gold train */
    min-width: 100px;
    height: 70px;
    font-size: 2.5rem;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
    border: 2px solid #fff;
    z-index: 10;
    animation: merge-scale 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes slideIn {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Free Typing Feedback */
.free-typing-feedback {
    position: absolute;
    font-size: 8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 100;
    animation: freeTypingPop 1s ease-out forwards;
    transform: translate(-50%, -50%);
}

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

    20% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Combo & Fever System */
#combo-display {
    position: absolute;
    top: 150px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    pointer-events: none;
    animation: comboPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.combo-count {
    font-size: 5rem;
    font-weight: 900;
    color: #ffeb3b;
    text-shadow: 0 4px 0 #f57f17, 0 8px 15px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.combo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    background: #ff6b6b;
    padding: 2px 15px;
    border-radius: 20px;
    margin-top: -10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@keyframes comboPop {
    0% {
        transform: scale(0.5) rotate(-10deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Character Cheer */
#cheer-container {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 100;
    pointer-events: none;
    animation: slideInRight 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.cheer-bubble {
    background: white;
    padding: 15px 25px;
    border-radius: 50px 50px 0 50px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 3px solid #b3e5fc;
}

#cheer-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0277bd;
}

.cheer-char {
    font-size: 3rem;
}

@keyframes slideInRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fever Mode Background Effect */
.fever-mode #game-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(255, 235, 59, 0.1) 100%);
    box-shadow: inset 0 0 100px rgba(255, 235, 59, 0.3);
    pointer-events: none;
    z-index: 15;
    animation: feverPulse 1s infinite alternate;
}

@keyframes feverPulse {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

.fever-active {
    color: #ffeb3b !important;
    text-shadow: 0 0 20px #ffeb3b !important;
    transform: scale(1.1);
}