/* Monitor / Display Tester - tool-specific styles (scoped with the mo- prefix) */

.mo-card { padding: 28px 32px 34px; }

.mo-title-bar { text-align: center; margin-bottom: 6px; }
.mo-title-bar h1 { font-size: 1.6em; font-weight: 800; margin: 0; color: #23272f; }

.mo-intro { text-align: center; color: #6b7280; font-size: .95em; line-height: 1.6; max-width: 720px; margin: 8px auto 26px; }

/* ===== Pattern switch buttons ===== */
.mo-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.mo-btn-group { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.mo-pattern-btn { display: inline-flex; align-items: center; gap: 8px; background: #f7f8fa; border: 1px solid #e2e4e9; color: #3d4148; font-weight: 600; font-size: .86em; padding: 9px 16px; border-radius: 8px; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.mo-pattern-btn:hover { background: #eef0f3; border-color: #c4c8d1; }
.mo-pattern-btn.active { background: var(--site-dark); border-color: var(--site-dark); color: #fff; }
.mo-pattern-btn i { font-size: 1em; }

.mo-swatch-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mo-swatch-btn { width: 40px; height: 40px; border-radius: 8px; border: 2px solid #e2e4e9; cursor: pointer; transition: transform .12s ease, border-color .2s ease; padding: 0; }
.mo-swatch-btn:hover { transform: scale(1.08); }
.mo-swatch-btn.active { border-color: var(--site-accent); box-shadow: 0 0 0 2px rgba(245,158,11,.35); }

.mo-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.mo-action-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--site-accent); color: #fff; border: none; font-weight: 700; font-size: .86em; padding: 10px 18px; border-radius: 8px; cursor: pointer; transition: background .2s ease; white-space: nowrap; }
.mo-action-btn:hover { background: #d97f06; }
.mo-action-btn.mo-secondary { background: #fff; border: 1px solid #d8dbe2; color: #3d4148; }
.mo-action-btn.mo-secondary:hover { background: #f0f1f4; border-color: #c4c8d1; }

/* ===== Test stage ===== */
.mo-stage-wrap { position: relative; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 8px; box-shadow: 0 4px 18px rgba(20,22,31,.16); }
.mo-stage { position: relative; width: 100%; height: 62vh; min-height: 340px; max-height: 720px; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; overflow: hidden; }

/* Fullscreen state fills the entire viewport */
.mo-stage-wrap:fullscreen { border-radius: 0; }
.mo-stage-wrap:fullscreen .mo-stage { height: 100vh; max-height: none; }
.mo-stage-wrap:-webkit-full-screen { border-radius: 0; }
.mo-stage-wrap:-webkit-full-screen .mo-stage { height: 100vh; max-height: none; }

/* Sharpness / text pattern */
.mo-text-pattern { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; }
.mo-text-pattern p { margin: 0; font-family: Georgia, 'Times New Roman', serif; color: #000; text-align: center; line-height: 1.3; }
.mo-text-pattern .mo-t1 { font-size: clamp(10px, 1.4vw, 20px); }
.mo-text-pattern .mo-t2 { font-size: clamp(14px, 2vw, 28px); }
.mo-text-pattern .mo-t3 { font-size: clamp(20px, 3vw, 42px); font-weight: 700; }
.mo-text-pattern .mo-t4 { font-size: clamp(28px, 4.5vw, 64px); font-weight: 800; }
.mo-text-pattern .mo-thin { font-weight: 300; font-family: Arial, Helvetica, sans-serif; }

/* Gradient banding test */
.mo-gradient-pattern { position: absolute; inset: 0; display: flex; flex-direction: column; }
.mo-gradient-bar { flex: 1 1 auto; }
.mo-gradient-bar.mo-gray { background: linear-gradient(90deg, #000000, #ffffff); }
.mo-gradient-bar.mo-red { background: linear-gradient(90deg, #000000, #ff0000); }
.mo-gradient-bar.mo-green { background: linear-gradient(90deg, #000000, #00ff00); }
.mo-gradient-bar.mo-blue { background: linear-gradient(90deg, #000000, #0000ff); }

/* Geometry / grid pattern */
.mo-grid-pattern { position: absolute; inset: 0; background: #fff;
    background-image:
        repeating-linear-gradient(0deg, rgba(0,0,0,.55) 0, rgba(0,0,0,.55) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, rgba(0,0,0,.55) 0, rgba(0,0,0,.55) 1px, transparent 1px, transparent 40px);
}
.mo-grid-pattern::before { content: ''; position: absolute; inset: 0; border: 3px solid #000; }
.mo-grid-pattern::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: rgba(220,38,38,.85); transform: translateY(-1px); }
.mo-grid-vline { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgba(220,38,38,.85); transform: translateX(-1px); }

/* Touch screen test */
.mo-touch-pattern { position: absolute; inset: 0; background: #14161c; }
.mo-touch-pattern canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.mo-touch-info { position: absolute; top: 14px; left: 14px; right: 100px; z-index: 4; background: rgba(0,0,0,.55); color: #e8eaf0; font-size: .82em; padding: 8px 14px; border-radius: 8px; line-height: 1.5; pointer-events: none; }
.mo-touch-info strong { color: #fff; }
.mo-touch-warn { color: #fbbf24; }
.mo-touch-reset-btn { position: absolute; bottom: 16px; right: 16px; z-index: 6; background: rgba(255,255,255,.92); color: #23272f; border: none; border-radius: 8px; padding: 9px 16px; font-size: .82em; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: background .2s ease; }
.mo-touch-reset-btn:hover { background: #fff; }

/* Legend / instructions overlay (fades out) */
.mo-legend { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.72); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: .86em; text-align: center; max-width: 90%; line-height: 1.5; opacity: 1; transition: opacity .6s ease; pointer-events: none; z-index: 5; }
.mo-legend.mo-hide { opacity: 0; }
.mo-legend strong { color: var(--site-accent); }

.mo-fs-btn { position: absolute; top: 14px; right: 14px; z-index: 6; background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 9px 14px; font-size: .82em; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: background .2s ease; }
.mo-fs-btn:hover { background: rgba(0,0,0,.75); }

.mo-hint-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .82em; color: #6b7280; margin-top: 10px; }
.mo-hint-bar i { color: var(--site-accent); margin-right: 4px; }

@media (max-width: 600px) {
    .mo-card { padding: 22px 18px 26px; }
    .mo-controls { flex-direction: column; align-items: stretch; }
    .mo-action-row { margin-left: 0; }
    .mo-stage { height: 50vh; min-height: 260px; }
}
