/* Toyman Rater Mock UI - LCD Display Styles */

.lcd-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
}

.lcd-frame {
    background: linear-gradient(145deg, #1a2a1a, #0a150a);
    padding: 24px;
    border-radius: 12px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    border: 3px solid #2a3a2a;
}

.lcd-screen {
    background: #001a00;
    padding: 20px 24px;
    border-radius: 4px;
    box-shadow:
        inset 0 0 20px rgba(0, 255, 0, 0.1),
        inset 0 0 4px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* CRT scanline effect */
.lcd-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
}

/* Screen glow effect */
.lcd-screen::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 255, 100, 0.03) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.lcd-line {
    font-family: 'Courier New', 'Lucida Console', 'Consolas', monospace;
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 0.1em;
    color: #33ff33;
    text-shadow:
        0 0 5px rgba(51, 255, 51, 0.8),
        0 0 10px rgba(51, 255, 51, 0.5),
        0 0 20px rgba(51, 255, 51, 0.3);
    white-space: pre;
    line-height: 1.5;
    min-width: 20ch;
    position: relative;
    z-index: 1;
}

/* Character highlighting for cursor */
.lcd-char {
    display: inline-block;
    min-width: 1ch;
}

.lcd-char.cursor {
    background: #33ff33;
    color: #001a00;
    animation: cursor-blink 500ms infinite;
}

.lcd-char.selected {
    background: rgba(51, 255, 51, 0.3);
}

@keyframes cursor-blink {
    0%, 49% {
        background: #33ff33;
        color: #001a00;
    }
    50%, 100% {
        background: transparent;
        color: #33ff33;
    }
}

/* Blinking text for alarms */
.lcd-blink {
    animation: text-blink 500ms infinite;
}

@keyframes text-blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* LCD pixel effect (optional, can be toggled) */
.lcd-screen.pixelated .lcd-line {
    font-family: 'LCD', 'Courier New', monospace;
    image-rendering: pixelated;
}

/* Custom LCD characters */
.lcd-char-progress-empty::before { content: '░'; }
.lcd-char-progress-full::before { content: '▓'; }
.lcd-char-arrow-up::before { content: '▲'; }
.lcd-char-arrow-down::before { content: '▼'; }
.lcd-char-play::before { content: '►'; }
.lcd-char-stop::before { content: '■'; }
.lcd-char-filled::before { content: '●'; }
.lcd-char-empty::before { content: '○'; }

/* Spinner animation characters */
.lcd-spinner {
    display: inline-block;
}

.lcd-spinner::after {
    content: '-';
    animation: spinner 400ms steps(4, end) infinite;
}

@keyframes spinner {
    0% { content: '-'; }
    25% { content: '\\'; }
    50% { content: '|'; }
    75% { content: '/'; }
    100% { content: '-'; }
}

/* Amber LCD variant */
.lcd-screen.amber .lcd-line {
    color: #ffaa00;
    text-shadow:
        0 0 5px rgba(255, 170, 0, 0.8),
        0 0 10px rgba(255, 170, 0, 0.5),
        0 0 20px rgba(255, 170, 0, 0.3);
}

.lcd-screen.amber .lcd-char.cursor {
    background: #ffaa00;
}

/* Blue LCD variant */
.lcd-screen.blue .lcd-line {
    color: #00aaff;
    text-shadow:
        0 0 5px rgba(0, 170, 255, 0.8),
        0 0 10px rgba(0, 170, 255, 0.5),
        0 0 20px rgba(0, 170, 255, 0.3);
}

.lcd-screen.blue .lcd-char.cursor {
    background: #00aaff;
}

/* Alarm state - red tint */
.lcd-screen.alarm {
    background: #1a0000;
    box-shadow:
        inset 0 0 20px rgba(255, 0, 0, 0.2),
        inset 0 0 4px rgba(0, 0, 0, 0.5);
}

.lcd-screen.alarm .lcd-line {
    color: #ff3333;
    text-shadow:
        0 0 5px rgba(255, 51, 51, 0.8),
        0 0 10px rgba(255, 51, 51, 0.5),
        0 0 20px rgba(255, 51, 51, 0.3);
}
