/* 基本頁面設定 */
body {
    margin: 0;
    overflow: hidden; /* 防止滾動條 */
    background-color: #000;
    font-family: 'Inter', sans-serif; /* 設定全站字體 */
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

video {
    display: none; /* 隱藏視訊元素 */
}

/* 中央十字按鈕 */
.central-blessing-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 231px;
    height: 231px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    /* Circular glass morphism */
    background: linear-gradient(135deg, rgba(17, 25, 40, 0.28), rgba(17, 25, 40, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.10) inset, 0 -8px 22px rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    isolation: isolate;
    /* Theme color for cross */
    color: #01ADF1;
    overflow: hidden;
    transition: opacity 1s ease-out, transform 0.3s ease;
}

/* Ambient glow halo */
.central-blessing-btn::before {
    content: '';
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(1, 173, 241, 0.30), rgba(1, 173, 241, 0.12) 46%, rgba(1, 173, 241, 0) 72%);
    filter: blur(10px);
    animation: glowPulse 3.2s ease-in-out infinite;
}

/* Dynamic sheen sweep */
.central-blessing-btn::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(60deg, rgba(255,255,255,0.00) 44%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0.00) 56%);
    transform: rotate(18deg) translateX(-120%);
    animation: sheenSweep 4.6s ease-in-out infinite;
    pointer-events: none;
}

/* Safari tuning for circular glass */
body.is-safari .central-blessing-btn {
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    background: linear-gradient(135deg, rgba(17, 25, 40, 0.30), rgba(17, 25, 40, 0.22));
}

.central-blessing-btn .icon-cross {
    width: 120px;
    height: 120px;
    stroke: currentColor;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 10px rgba(1, 173, 241, 0.55)) drop-shadow(0 0 20px rgba(1, 173, 241, 0.35));
    position: relative;
    z-index: 1; /* keep icon above glass bars */
}

.central-blessing-btn.fade-out {
    opacity: 0;
    pointer-events: none; /* 淡出後不可點擊 */
}

@keyframes glowPulse {
    0% { opacity: 0.50; }
    50% { opacity: 0.90; }
    100% { opacity: 0.50; }
}

@keyframes sheenSweep {
    0%   { transform: rotate(18deg) translateX(-130%); }
    60%  { transform: rotate(18deg) translateX(18%); }
    100% { transform: rotate(18deg) translateX(130%); }
}

/* --- Text Displays --- */
#timeDisplay, #fpsDisplay, #screensDisplay, #passesDisplay {
    flex: 0 0 auto; 
    font-size: 0.9em; 
    min-width: 50px; 
    color: #ccc; 
    white-space: nowrap; 
    text-align: center;
}

#screensDisplay span, #passesDisplay span { 
    display: inline-block; 
}

/* --- Number Input Styles --- */
.floating-controls input[type="number"] {
    background: rgba(40, 45, 65, 0.7); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white; 
    border-radius: 5px; 
    padding: 2px 4px; 
    text-align: center;
    -moz-appearance: textfield;
}

.floating-controls input[type="number"]::-webkit-inner-spin-button,
.floating-controls input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none; 
    margin: 0;
}
