* {
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    cursor: url('./images/pointer.png'), auto;
}

canvas {
    width: 100%;
    height: auto;
    background: #111;
}

/* valentinesButton removed */

/* speech image styles */
#speech-image-wrap {
    position: absolute;
    top: calc(50% + 70px); /* below the center text */
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none; /* clicks pass through to the button if overlapping */
    display: flex;
    justify-content: center;
    align-items: center;
}

#speechImage {
    max-width: 220px;
    max-height: 180px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    transition: opacity 200ms ease, transform 300ms cubic-bezier(.2,.9,.2,1);
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}

#speechImage.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Screen lock overlay */
#screenLock {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lock-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.06);
    padding: 28px;
    width: 320px;
    max-width: calc(100% - 40px);
    text-align: center;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
    font-family: "Comic Sans MS", cursive, sans-serif;
}

.lock-card h2 { margin: 0 0 8px 0; font-size: 20px }
.lock-card .hint { margin: 0 0 12px 0; opacity: 0.9; color: #dfe9ff }
.lock-card input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    color: #fff;
    margin-bottom: 12px;
}
.lock-actions { display: flex; justify-content: center }
.lock-actions button {
    background: #ff5d8f;
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}
.lock-message { color: #ffd1e6; margin-top: 8px; min-height: 20px }

/* manual audio start button (shown if autoplay blocked) */
#audioStartBtn {
    position: absolute;
    top: calc(50% + 210px);
    left: 50%;
    transform: translateX(-50%);
    background: #ff9bb3;
    color: #111;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-family: "Comic Sans MS", cursive, sans-serif;
    cursor: pointer;
    display: none;
    z-index: 1000;
}

#audioStartBtn.visible { display: block; }