/* css/crt-phosphor.css */

@font-face {
    font-family: "Eagle SpCGA Alt3";
    src: url("../assets/fonts/Web437_EagleSpCGA_Alt3.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-variant: small-caps;
}
@font-face {
    font-family: "Web437_EagleSpCGA_Alt2";
    src: url("../assets/fonts/Web437_EagleSpCGA_Alt2.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "WebPlus_IBM_VGA_8x16";
    src: url("../assets/fonts/WebPlus_IBM_VGA_8x16.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'VT323';
    src: url('../assets/fonts/VT323-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: "WebPlus_IBM_VGA_8x16", Inconsolata, monospace;
}

@keyframes textShadowAmber {
    0%, 100% { text-shadow: 0 0 2px rgba(255, 176, 0, 0.4), 0 0 5px rgba(255, 176, 0, 0.2); }
    50% { text-shadow: 0 0 1px rgba(255, 176, 0, 0.3), 0 0 4px rgba(255, 176, 0, 0.1); }
}

@keyframes textShadowGreen {
    0%, 100% { text-shadow: 0 0 2px rgba(0, 255, 136, 0.4), 0 0 5px rgba(0, 255, 136, 0.2); }
    50% { text-shadow: 0 0 1px rgba(0, 255, 136, 0.3), 0 0 4px rgba(0, 255, 136, 0.1); }
}

.phosphor-amber {
    color: #FFB000;
    text-shadow: 0 0 2px rgba(255, 176, 0, 0.4);
}

.phosphor-green-primary {
    color: #00ff88;
    text-shadow: 0 0 2px rgba(0, 255, 136, 0.4);
}

.phosphor-green-dim {
    color: #00aa55;
    text-shadow: 0 0 2px rgba(0, 170, 85, 0.4);
}

.phosphor-highlight {
    color: #050505;
    background: #FFB000; /* Use Amber for selection background to match primary theme */
    text-shadow: none;
}

/* Phosphor Persistence (Fade in) */
.phosphor-fade-in {
    animation: phosphorPersistence 120ms ease-out forwards;
    opacity: 0;
}

@keyframes phosphorPersistence {
    0% { opacity: 0; filter: brightness(0); }
    50% { opacity: 0.8; filter: brightness(1.5); }
    100% { opacity: 1; filter: brightness(1); }
}

/* The prompt cursor blink */
.cursor {
    display: inline-block;
    width: 0.6em;
    height: 1em;
    background-color: #009900;
    vertical-align: bottom;
    animation: cursorBlink 1.05s steps(2, start) infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Screen Wipe Transition */
.screen-wipe-enter {
    animation: wipeEnter 200ms linear forwards; 
}

.screen-wipe-exit {
    animation: wipeExit 150ms linear forwards;
}

@keyframes wipeEnter {
    0% { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); opacity: 0; filter: contrast(3); }
    50% { opacity: 1; filter: brightness(1.5) contrast(2) hue-rotate(-10deg); }
    100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); filter: brightness(1) contrast(1); }
}

@keyframes wipeExit {
    0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); filter: brightness(1); opacity: 1; }
    50% { filter: brightness(2) contrast(2) hue-rotate(10deg); }
    100% { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); opacity: 0; }
}

::selection {
    color: #00f0f0;
    background: #008008;
    text-shadow: none;
}
