/* Basic reset for a clean, full-screen canvas */
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden; 
    /* Soft, warm off-white background to match the aesthetic */
    background-color: #F4F4F0; 
    font-family: 'Inter', sans-serif;
    color: #333333;
}

canvas {
    display: block;
}

/* =========================================
   MOBILE LANDSCAPE ORIENTATION OVERLAY
   ========================================= */

#orientation-warning {
    display: none;
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #28282D; color: #FFFFFF; z-index: 99999;
    align-items: center; justify-content: center; text-align: center;
    flex-direction: column; padding: 20px; box-sizing: border-box;
}

.rotate-icon {
    font-size: 60px;
    margin-bottom: 10px;
}

#orientation-warning p {
    font-size: 20px; font-weight: 600; line-height: 1.5; margin: 0;
}

/* Only display if it's a mobile screen held in portrait orientation */
@media screen and (orientation: portrait) and (max-width: 900px) {
    #orientation-warning {
        display: flex;
    }
}

/* =========================================
   HTML UI OVERLAYS (Hidden from Video Capture)
   ========================================= */

#recording-indicator {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

#recording-indicator.hidden {
    display: none;
}

.rec-dot {
    width: 14px;
    height: 14px;
    background-color: #FF3232;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1s infinite;
}

.rec-text {
    color: #404040;
    font-size: 18px;
    font-weight: 800;
}

#replay-ui {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

#replay-ui.hidden {
    display: none;
}

.replay-text {
    color: #404040;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0px 4px 12px rgba(0,0,0,0.1);
}

.progress-bar-container {
    width: 400px;
    height: 12px;
    background-color: #C8C8C8;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #64C864; 
    transition: width 0.1s linear;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}