@charset "UTF-8";

/* ============================================================================
 * Private Sun Yat-sen Memorial Hall — Orientation Guard (orientation-guard.css)
 * ============================================================================
 * COMMENTING STANDARDS
 * 1. Block comments only. Inline comments are strictly prohibited.
 * 2. Section dividers use the === banner format.
 * 3. All prose is written in English.
 * ============================================================================ */

@layer components {
    /* ========================================================================
     * Fullscreen Frosted Glass Blocker Container
     * ======================================================================== */
    .sys-orientation-guard {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        z-index: 999999;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(28px) saturate(190%);
        -webkit-backdrop-filter: blur(28px) saturate(190%);
        color: #f5f5f7;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        box-sizing: border-box;
        padding: 24px;
    }

    /* Active State: Fully blocks user interaction until rotated */
    .sys-orientation-guard.is-active {
        opacity: 1;
        pointer-events: auto;
    }

    /* ========================================================================
     * Apple Native Card Container
     * ======================================================================== */
    .sys-orientation-guard .guard-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        max-width: 420px;
        width: 100%;
        padding: 32px 28px;
        border-radius: 24px;
        background: rgba(28, 28, 30, 0.78);
        border: 0.5px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    }

    /* ========================================================================
     * Device Rotation Animation Glyph
     * ======================================================================== */
    .sys-orientation-guard .guard-icon-box {
        width: 88px;
        height: 88px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px;
        color: #ff453a;
    }

    .sys-orientation-guard .guard-phone-icon {
        width: 80px;
        height: 80px;
        overflow: visible;
    }

    .sys-orientation-guard .phone-device-group {
        transform-box: view-box;
        transform-origin: 40px 40px;
        animation: phoneRotateAnim 2.8s cubic-bezier(0.32, 0.72, 0, 1) infinite;
    }

    .sys-orientation-guard .guidance-arrow {
        animation: arrowPulseAnim 2.8s ease-in-out infinite;
    }

    @keyframes phoneRotateAnim {
        0%, 18% {
            transform: rotate(-90deg);
        }
        48%, 78% {
            transform: rotate(0deg);
        }
        92%, 100% {
            transform: rotate(-90deg);
        }
    }

    @keyframes arrowPulseAnim {
        0%, 18% {
            opacity: 0.55;
        }
        45%, 78% {
            opacity: 1;
        }
        92%, 100% {
            opacity: 0.55;
        }
    }

    /* ========================================================================
     * Typography
     * ======================================================================== */
    .sys-orientation-guard .guard-title {
        margin: 0 0 10px 0;
        font-size: 19px;
        font-weight: 600;
        letter-spacing: -0.4px;
        color: #f5f5f7;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "PingFang TC", "Microsoft YaHei", sans-serif;
    }

    .sys-orientation-guard .guard-desc {
        margin: 0;
        font-size: 14px;
        line-height: 1.55;
        color: rgba(245, 245, 247, 0.72);
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "PingFang TC", "Microsoft YaHei", sans-serif;
    }

    /* ========================================================================
     * Light Mode Theme Support
     * ======================================================================== */
    @media (prefers-color-scheme: light) {
        .sys-orientation-guard {
            background: rgba(242, 242, 247, 0.94);
            color: #1d1d1f;
        }

        .sys-orientation-guard .guard-card {
            background: rgba(255, 255, 255, 0.85);
            border: 0.5px solid rgba(0, 0, 0, 0.10);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
        }

        .sys-orientation-guard .guard-icon-box {
            color: #d70015;
        }

        .sys-orientation-guard .guard-title {
            color: #1d1d1f;
        }

        .sys-orientation-guard .guard-desc {
            color: #6e6e73;
        }
    }
}

@layer overrides {
    /* Global scroll & touch lock when blocked */
    html.is-orientation-blocked,
    body.is-orientation-blocked {
        overflow: hidden;
        touch-action: none;
    }
}
