body {
    margin: 0;
    overflow: hidden;
    background-color: #e0f7fa;
    background-image: radial-gradient(circle at center, #e1f5fe 0%, #b3e5fc 100%);
    font-family: 'M PLUS Rounded 1c', sans-serif;
    color: #4a3320;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.home-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #4a3320;
    opacity: 0.8;
    z-index: 1000;
    transition: transform 0.2s, opacity 0.2s;
}

.home-link:hover {
    transform: scale(1.1);
    opacity: 1;
}

.game-container {
    display: flex;
    gap: 30px;
}

.hud {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    border: 4px solid #fff3e0;
    min-width: 150px;
    height: max-content;
}

#score {
    color: #ff9800;
    display: block;
    font-size: 2.5rem;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
}

.board-wrapper {
    position: relative;
    background: #fffdf5;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 6px solid #e0c8b0;
    overflow: hidden;
    /* Canvas extends to the edges internally */
}

#game-canvas {
    display: block;
    cursor: none;
    background: linear-gradient(to bottom, #ffffff 0%, #fff9f0 100%);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    z-index: 30;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background: #fff;
    padding: 40px 60px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 4px solid #ffcc80;
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

h2 {
    margin: 0 0 10px 0;
    font-size: 3rem;
    color: #ff5722;
}

.modal p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: bold;
}

button {
    background: #ff9800;
    border: none;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

button:hover {
    transform: translateY(-3px) scale(1.05);
    background: #f57c00;
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.6);
}

.guide-panel {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 4px solid #fff3e0;
    text-align: center;
    max-height: 650px;
    overflow-y: auto;
}

.guide-panel h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: #ff9800;
}

.evolution-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.evo-label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #8d6e63;
    background: #efebe9;
    padding: 3px 10px;
    border-radius: 10px;
    margin: 5px 0;
}

.evo-items {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.evo-items span {
    font-size: 1.8rem;
    line-height: 1.1;
}

.arrow {
    font-size: 1rem;
    color: #ffb74d;
    font-weight: bold;
}