@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;800&display=swap');

* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    user-select: none; -webkit-touch-callout: none;
    touch-action: none; 
}

body {
    font-family: 'Nunito', sans-serif;
    background: #ffe4e1; 
    height: 100dvh;
    display: flex;
    flex-direction: column;
    color: #4a4a4a;
    overflow: hidden;
}

.topbar { 
    height: 60px; display: flex; align-items: center; 
    justify-content: space-between; padding: 0 15px; 
    background: #ffb6c1; 
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.2);
    z-index: 5;
}

.title { font-size: 20px; color: #fff; font-weight: 800; letter-spacing: 1px; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
.back-btn { color: #fff; font-size: 12px; text-decoration: none; background: rgba(255,255,255,0.3); padding: 6px 12px; border-radius: 20px; font-weight: bold; }
.music-btn { font-size: 20px; cursor: pointer; width: 40px; text-align: center; }

.game-container { 
    flex: 1; display: flex; justify-content: center; 
    align-items: center; position: relative;
    padding: 15px;
}

#gameCanvas {
    background: #fff0f5; 
    border: 4px solid #ff69b4; 
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
    max-width: 100%;
    max-height: 100%;
}

.instruction {
    text-align: center;
    padding: 15px;
    font-size: 14px;
    color: #d81b60;
    font-weight: bold;
    background: #ffe4e1;
}

.overlay { 
    position: absolute; top:0; left:0; width:100%; height:100%; 
    background: rgba(255, 228, 225, 0.95); z-index: 10;
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    text-align: center; border-radius: 15px; padding: 20px;
}

#msgTitle { color: #ff1493; font-size: 28px; margin-bottom: 10px; }
#msgText { color: #d81b60; font-size: 16px; margin-bottom: 25px; line-height: 1.5; }

.btn-group { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 250px; }

.start-btn { 
    background: #ff69b4; color: #fff; padding: 12px 20px; border: none; 
    border-radius: 25px; font-weight: 800; font-size: 16px;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
    transition: 0.2s; width: 100%; cursor: pointer;
}

.start-btn:active { transform: scale(0.95); }

.start-btn.secondary {
    background: #fff;
    color: #ff69b4;
    border: 2px solid #ff69b4;
    box-shadow: none;
}