/* Make sure to use the correct paths for your font files */
@font-face {
    font-family: 'FCondensed'; /* A unique name for your font */
    src: url('/assets/bf/assets/fonts/PPFormula-CondensedExtralight.woff2') format('woff2'), /* Preferred format */
    url('/assets/bf/assets/fonts/PPFormula-CondensedExtralight.woff') format('woff');   /* Fallback format */
    font-weight: normal; /* Define the weight of this specific font file */
    font-style: normal;  /* Define the style (normal, italic, oblique) */
    font-display: swap;  /* Controls font loading behavior */
}

@font-face {
    font-family: 'FNarrow';
    src: url('/assets/bf/assets/fonts/PPFormula-NarrowRegular.woff2') format('woff2'),
    url('/assets/bf/assets/fonts/PPFormula-NarrowRegular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NMachina';
    src: url('/assets/bf/assets/fonts/PPNeueMachina-InktrapRegular.woff2') format('woff2'),
    url('/assets/bf/assets/fonts/PPNeueMachina-InktrapRegular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --black: #00150B;
    --white: #D6FFE0;
    --green: #00FF3E;
    --green-mid: #279C44;
    --red-fail: #ff0000; /* Added a red for failure states */
}

* {
    position: relative;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* MODIFICATION: Changed font stack for "hacker" feel */
    font-family: "NMachina", "Courier New", Courier, monospace;
    font-weight: 300;
}

body {
    width: 100vw;
    height: 100vh;
    color: var(--white);
    background-color: var(--black);
    overflow: hidden;
    /* MODIFICATION: Added phosphor glow and CRT flicker */
    text-shadow: 0 0 5px rgba(0, 255, 62, 0.4), 0 0 2px rgba(0, 255, 62, 0.6);
    animation: crtFlicker 0.1s infinite alternate;
}

ul, li {
    list-style: none;
}

/* ////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////// */
/* Components */

/* ////////////////////////////////////////////////////////////// */
/* Header */
#header-container {
    z-index: 1;
    position: absolute;
    top: 11.5vh;
    left: 0; right: 0;
    margin: auto;
    width: 275px;
    text-align: center;
}

#header-container img {
    width: 267px;
    margin-left: -11px;
}

#header-container .text-wrapper {
    margin-top: -12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#header-container h1 {
    font-size: 28px;
    font-weight: lighter;
    font-family: "NMachina", "Courier New", Courier, monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative; /* Required for the glitch effect */
}


#header-container h2 {
    font-size: 18px;
    font-weight: lig;
    font-family: "FCondensed", "Courier New", Courier, monospace;
    color: var(--green);
}

#linkout {
    z-index: 1;
    position: absolute;
    top: 40px; right: 40px;
}

#linkout a {
    cursor: pointer;
    text-decoration: none;
    padding: 8px 14px 5px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    border: 1px solid var(--green);
    background-color: var(--black);
}

#linkout a:hover {
    background-color: var(--green-mid);
}

.linkout__label {
    font-size: 14px;
    font-weight: 300;
    font-family: "NMachina", "Courier New", Courier, monospace;
    color: var(--white);
}



#countdown-container {
    position: absolute;
    width: 104vh;
    height: 187px;
    margin: auto;
    top: 2vh;
    bottom: 0;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    /* MODIFICATION: Force monospaced font */
    font-family: "Courier New", Courier, monospace;
}

.time-wrap {
    width: 19vh;
}

.time-wrap .countdown__number {
    font-size: 17.75vh;
    line-height: 1.2em;
    font-weight: 300;
    font-family: "Courier New", Courier, monospace;
    color: var(--white);
    /* MODIFICATION: Updated text-shadow for consistency */
    text-shadow: 0px 0px 10px #65F689;

    /* Glitch flicker animation */
    animation: glitchFlicker 2.5s infinite linear;
}

/* Add slight random delays to each counter */
#hoursCounter {
    animation-delay: 0.3s;
}
#minutesCounter {
    animation-delay: 0.7s;
}
#secondsCounter {
    animation-delay: 0.2s;
}


.dots-wrap {
    top: -0.12em;
    font-size: 15vh;
    line-height: 1.2em;
    font-weight: 300;
    font-family: "Courier New", Courier, monospace;
    color: var(--green);
    text-shadow: 0px 0px 10px #65F689;
}

.time-wrap .countdown__label {
    margin-top: -3.6vh;
    font-size: 2.9vh;
    line-height: 1.2em;
    font-weight: 300;
    font-family: "NMachina", "Courier New", Courier, monospace;
    color: var(--white);
    text-shadow: 0px 0px 10px #65F689;
}


#deals-container {
    position: absolute;
    width: 810px;
    left: 0; right: 0;
    bottom: 11.5vh;
    margin: auto;
    text-align: center;
}

.deals__header {
    width: 100%;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--green);
}

.deals__headline {
    font-size: 18px;
    font-family: "FCondensed", "Courier New", Courier, monospace;
    color: var(--green);
    text-transform: uppercase;
}

.deals__body {
    margin-top: 20px;
    /* Set a min-height to prevent layout jump as text appears */
    min-height: 100px;
    /* MODIFICATION: Force monospaced font */
    font-family: "Courier New", Courier, monospace;
}

.deals__top-line {
    font-size: 40px;
    font-family: "NMachina", "Courier New", Courier, monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 0 0 10px var(--black);
    /* Set a min-height to prevent layout jump */
    min-height: 48px;
    /* Add a transition for the color change */
    transition: color 0.1s linear;
}

.deals__bottom-line {
    font-size: 24px;
    font-family: "NMachina", "Courier New", Courier, monospace;
    opacity: 0.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Set a min-height to prevent layout jump */
    min-height: 29px;
}


#footer-container {
    position: absolute;
    width: 100%;
    padding: 0 40px;
    bottom: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    text-align: center;
}

/* MODIFICATION: Updated styles for the hacker console */
#hacker-console {
    width: 100%;
    height: 150px;
    text-align: left;
    /* REMOVED: border, background-color */
    overflow: hidden; /* This will hide old lines as new ones are added */
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Anchors content to the bottom */
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#console-output {
    overflow: hidden; /* Lines will be pushed out of view */
    color: var(--white);
    opacity: 0.8;
}

#console-output .console-line {
    line-height: 1.4em;
    white-space: nowrap;
}

.console-prompt {
    color: var(--green);
}

.prompt-cursor {
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}
/* End of hacker console styles */


.footer__label {
    bottom: -7px;
}

.footer__label:before {
    content: '';
    position: absolute;
    top: -3px;
    left: -12px;
    width: 1px;
    height: 120%;
    background-color: var(--green);
}

.footer__text {
    font-family: "FCondensed", "Courier New", Courier, monospace;
    font-size: 14px;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.footer__text .highlighted {
    font-family: "FCondensed", "Courier New", Courier, monospace;
    text-transform: uppercase;
}



/* ////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////// */
/* Background Graphics */
#bg-graphics {
    z-index: -1;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    /* Removed flicker from here, moved to body */
}

/* REMOVED: All old #grid-overlay, .radar-gradient,
  .radar-outest-circle, .radar-cross, and
  .radar-black-gradient styles have been deleted.
*/

/* ////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////// */
/* ADDED: New CRT Screen Effects */

#scanlines-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.3) 0px,
            rgba(0, 0, 0, 0.3) 1px,
            transparent 1px,
            transparent 3px
    );
    opacity: 0.3;
}

#vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    /* Creates the curved/dark-edge effect of a CRT */
    background: radial-gradient(
            ellipse at center,
            rgba(0, 0, 0, 0) 50%,
            rgba(0, 0, 0, 0.9) 100%
    );
    opacity: 0.8;
}

/* ////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////// */
/* Helpers */
.highlighted {
    color: var(--green);
}

.dashed {
    border: 1px dashed var(--green);
}


/* ////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////// */
/* Title Glitch Effect (Outer) */

#header-container h1::before,
#header-container h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Background removed so main text is always visible */
}

#header-container h1::before {
    left: 2px;
    text-shadow: -1.5px 0 var(--green);
    /* Slicing animation */
    clip-path: inset(25% 0 25% 0);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

#header-container h1::after {
    left: -2px;
    text-shadow: -1.5px 0 var(--white);
    /* Slicing animation */
    clip-path: inset(50% 0 10% 0);
    animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(10% 0 90% 0); }
    20% { clip-path: inset(80% 0 5% 0); }
    40% { clip-path: inset(40% 0 40% 0); }
    60% { clip-path: inset(70% 0 10% 0); }
    80% { clip-path: inset(30% 0 60% 0); }
    100% { clip-path: inset(90% 0 1% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(80% 0 5% 0); }
    20% { clip-path: inset(20% 0 70% 0); }
    40% { clip-path: inset(60% 0 30% 0); }
    60% { clip-path: inset(40% 0 40% 0); }
    80% { clip-path: inset(90% 0 5% 0); }
    100% { clip-path: inset(70% 0 10% 0); }
}


/* ////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////// */
/* MODIFICATION: Renamed to crtFlicker and applied to body */

@keyframes crtFlicker {
    0% { opacity: 0.95; }
    100% { opacity: 1; }
}

/* ////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////// */
/* Countdown Glitch Flicker */

@keyframes glitchFlicker {
    0% {
        text-shadow: 0 0 10px #65F689;
    }
    /* Hold normal shadow for 90% of the animation */
    90% {
        text-shadow: 0 0 10px #65F689;
    }
    /* Glitch frames */
    91% {
        text-shadow: 2px 2px 10px var(--green), -2px -2px 10px var(--white);
    }
    92% {
        text-shadow: 0 0 10px #65F689;
    }
    93% {
        text-shadow: -3px 1px 10px var(--white), 3px -1px 10px var(--green);
    }
    94% {
        text-shadow: 0 0 10px #65F689;
    }
    95% {
        text-shadow: 1px -2px 10px var(--green), -1px 2px 10px var(--white);
    }
    100% {
        text-shadow: 0 0 10px #65F689;
    }
}

/* ////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////// */
/* "FAIL" Animation Overlay */

#fail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--red-fail); /* Red flash */
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
}
/* This class is added by JS to trigger the animation */
#fail-overlay.active {
    animation: fail-flash 0.3s linear;
}
@keyframes fail-flash {
    0% { opacity: 0; }
    25% { opacity: 0.7; }
    50% { opacity: 0.2; }
    75% { opacity: 0.5; }
    100% { opacity: 0; }
}