/* Monitor Ghosting Test Stylesheet */

.monitor-ghosting-test-page .apple-glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .monitor-ghosting-test-page .apple-glass {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Motion Stage Viewport */
.motion-viewport-container {
    position: relative;
    width: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
    user-select: none;
    -webkit-user-select: none;
}

.dark .motion-viewport-container {
    background-color: #090d16;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

#ghosting-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Floating overlay inside motion stage */
.motion-overlay-banner,
#motion-start-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 20;
    color: #0f172a;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.dark .motion-overlay-banner,
.dark #motion-start-overlay {
    background: rgba(9, 13, 22, 0.92) !important;
    color: #ffffff !important;
}

.motion-overlay-banner h3,
#motion-start-overlay h3 {
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 800;
}

.dark .motion-overlay-banner h3,
.dark #motion-start-overlay h3 {
    color: #ffffff !important;
}

.motion-overlay-banner p,
#motion-start-overlay p {
    color: #475569;
}

.dark .motion-overlay-banner p,
.dark #motion-start-overlay p {
    color: #cbd5e1 !important;
}

.motion-overlay-banner.hidden,
#motion-start-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Fullscreen Mode Styling */
#ghosting-canvas-wrapper:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #090d16 !important;
    z-index: 999999 !important;
}

#ghosting-canvas-wrapper:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #090d16 !important;
    z-index: 999999 !important;
}

#ghosting-canvas-wrapper:fullscreen #ghosting-canvas,
#ghosting-canvas-wrapper:-webkit-full-screen #ghosting-canvas {
    width: 100vw !important;
    height: 100vh !important;
}

/* Floating Header/Controls Toolbar */
.motion-toolbar {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#ghosting-canvas-wrapper:fullscreen .motion-toolbar {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dark #ghosting-canvas-wrapper:fullscreen .motion-toolbar {
    background: rgba(15, 23, 42, 0.85) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

#ghosting-canvas-wrapper.controls-hidden .motion-toolbar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

#ghosting-canvas-wrapper:fullscreen.controls-hidden .motion-toolbar {
    transform: translate(-50%, -20px);
}

/* Mode Buttons */
.motion-mode-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .motion-mode-btn {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.motion-mode-btn:hover {
    border-color: rgba(14, 165, 233, 0.5);
    background: rgba(14, 165, 233, 0.08);
}

.motion-mode-btn.active {
    border-color: rgba(14, 165, 233, 0.9) !important;
    background: rgba(14, 165, 233, 0.15) !important;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.15);
}

/* Speed Presets */
.btn-speed-preset {
    transition: all 0.15s ease-in-out;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-speed-preset.active {
    background: #0ea5e9 !important;
    color: #ffffff !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

/* Background Color Chips */
.btn-bg-color {
    cursor: pointer;
    min-width: 36px;
    min-height: 36px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-bg-color:hover {
    transform: scale(1.1);
}

.btn-bg-color.active {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

/* Observation Chip Buttons */
.obs-choice-btn {
    transition: all 0.2s ease;
    min-height: 44px;
}

.obs-choice-btn:hover {
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.06);
}

.obs-choice-btn.active {
    border-color: #0ea5e9 !important;
    background: rgba(14, 165, 233, 0.15) !important;
    color: #0284c7 !important;
}

.dark .obs-choice-btn.active {
    color: #38bdf8 !important;
}

/* Reduced motion support notice */
@media (prefers-reduced-motion: reduce) {
    .motion-mode-btn,
    .btn-speed-preset,
    .obs-choice-btn {
        transition: none !important;
    }
}
