/**
 * CRT & Retro Screen Effects
 * Giả lập màn hình bóng hình CRT của tủ game thùng thập niên 80-90:
 * Đường quét Scanlines, quầng sáng Phosphor, vệt cong thủy tinh và viền Bezel.
 */

/* Lớp phủ màn hình CRT */
.crt-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
    border-radius: 12px;
}

/* Đường quét scanlines ngang */
.crt-overlay.scanlines-on::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.45) 50%
    );
    background-size: 100% 4px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.85;
}

/* Ánh sáng lóa gương và quầng sáng viền (Vignette & Bezel Reflection) */
.crt-overlay.scanlines-on::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(18, 25, 36, 0) 65%,
        rgba(0, 0, 0, 0.75) 100%
    );
    box-shadow: inset 0 0 25px rgba(0, 240, 255, 0.15),
                inset 0 0 60px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 3;
}

/* Hiệu ứng chớp nhẹ của ống phóng điện tử (CRT Subtle Flicker) */
@keyframes crtFlicker {
    0% { opacity: 0.985; }
    50% { opacity: 1; }
    100% { opacity: 0.988; }
}

.crt-flicker {
    animation: crtFlicker 0.12s infinite;
}

/* Khung viền tủ máy Arcade (Cabinet Bezel) */
.arcade-bezel {
    position: relative;
    background: #080a0f;
    border: 4px solid #1a2233;
    border-radius: 14px;
    box-shadow: 
        0 0 0 2px #0a0e17,
        0 10px 30px rgba(0, 0, 0, 0.85),
        inset 0 2px 4px rgba(255, 255, 255, 0.08),
        inset 0 -2px 4px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Nhãn hiệu tem vàng góc màn hình kiểu đồ họa xưa */
.arcade-badge {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-family: monospace;
    font-size: 9px;
    letter-spacing: 1px;
    color: #ffb700;
    text-shadow: 0 0 4px rgba(255, 183, 0, 0.6);
    opacity: 0.75;
    pointer-events: none;
    z-index: 12;
}

