/* --- CSS --- */
body {
    font-family: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Meiryo', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: #fdfcfa;
    color: #5D4037;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-image: 
        linear-gradient(135deg, #ffc107 25%, transparent 25%),
        linear-gradient(225deg, #ffc107 25%, transparent 25%),
        linear-gradient(135deg, #8bc34a 25%, transparent 25%),
        linear-gradient(225deg, #8bc34a 25%, transparent 25%),
        linear-gradient(135deg, #03a9f4 25%, transparent 25%),
        linear-gradient(225deg, #03a9f4 25%, transparent 25%),
        linear-gradient(135deg, #e91e63 25%, transparent 25%),
        linear-gradient(225deg, #e91e63 25%, transparent 25%);
    background-position: 0 0, 0 0, 40px 0, 40px 0, 80px 0, 80px 0, 120px 0, 120px 0;
    background-size: 80px 40px;
    background-repeat: repeat-x;
    opacity: 0.8;
    z-index: -1;
}

h1 {
    color: #e91e63;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-top: 50px;
    margin-bottom: 20px;
}

#game-container {
    position: relative;
    width: 90vw;
    max-width: 800px;
}

#game-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: bold;
}

#game-info > span {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#combo-display {
    color: #ff4500;
    transition: transform 0.1s;
    font-weight: 700;
}

#lake {
    position: relative;
    width: 100%;
    height: 60vh;
    max-height: 600px;
    background-color: #a0e9ff;
    border: 5px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 25px;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.5s ease-in-out;
}

#lake.fever {
    background: linear-gradient(45deg, #ffd6e7, #c9d6ff, #b3ffb3);
    animation: fever-bg 5s infinite linear;
}

@keyframes fever-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.character {
    position: absolute;
    font-size: 2.8em;
    user-select: none;
    animation: pop-in 0.3s ease-out;
    transition: transform 0.2s ease;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.character:hover { transform: scale(1.2); }

@keyframes pop-in {
    from { transform: scale(0) rotate(-180deg); }
    to { transform: scale(1) rotate(0deg); }
}

.shake-effect { animation: shake 0.5s; }

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.popup-text {
    position: absolute;
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px #5D4037;
    pointer-events: none;
    animation: fade-out-up 1.5s forwards ease-out;
}

@keyframes fade-out-up {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-60px) scale(1.2); }
}

.overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    color: #5D4037;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; z-index: 10; padding: 20px; box-sizing: border-box;
}

.overlay h2 {
    font-size: 2.5em; font-weight: 800; color: #03a9f4; margin-bottom: 20px;
}

.overlay p { font-size: 1.2em; line-height: 1.8; max-width: 400px; }

.overlay button {
    padding: 15px 40px; font-size: 1.2em; font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 700;
    cursor: pointer; border: none; border-radius: 50px;
    background-color: #e53935; color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease; margin-top: 20px;
}

.overlay button:hover {
    background-color: #c62828; transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

#start-screen { visibility: visible; }
#gameover-screen { visibility: hidden; }

#coupon-area {
    margin-top: 15px;
    padding: 20px;
    background-color: #fffde7;
    border: 3px dashed #ffb300;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
}

#coupon-area h3 {
    color: #e91e63;
    font-size: 1.5em;
    margin: 0 0 10px 0;
}

#coupon-code-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

#coupon-code {
    background-color: #ffffff;
    border: 1px solid #ccc;
    padding: 10px 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    border-radius: 5px;
    user-select: all;
}

#copy-button {
    padding: 10px 15px;
    font-size: 1em;
    margin-top: 0;
    background-color: #03a9f4;
    color: white;
    border-radius: 5px;
}

.coupon-note {
    font-size: 0.9em !important;
    color: #777;
    margin-top: 10px;
}

#failure-message {
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: bold;
}