@font-face {
    font-family: 'Px437';
    src: url('fonts/Perfect DOS VGA 437 Win.ttf') format('truetype');
}

body {
    margin: 0;
    padding: 0;
    background: #001;
    color: #00ff00;
    font-family: 'Px437', monospace;
    font-size: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    flex-direction: column;
}

.cartridge-container {
    width: 100%;
    height: 0%;
    transition: height 0.6s ease;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.cartridge-container.active {
    height: 40%;
}

.monitor {
    width: 50%;
    height: 40%;
    max-height: 40%;
    aspect-ratio: 4 / 3;
    background: #928e71;
    border: 40px solid #e7e7bc;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px #fff;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: height 0.3s ease;
}
.crt {
    width: 100%;
    height: 100%;
    background: #000;
    border: 5px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 30px #00ff00, inset 0 0 10px #00ff00;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.crt:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 255, 0, 0.1),
        rgba(0, 255, 0, 0.1) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    mix-blend-mode: normal;
    z-index: 10;
    animation: scanline 0.1s infinite;
}

.dongle {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 90%;
    left: 0%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}


.cable {
    width: 4px;
    height: 50px;
    background: black;
    margin: 0 auto;
    position: relative;
}

.slot {
    position: absolute;
    bottom: 0px;
    left: 14px;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: black;
    border: 3px solid #555;
    border-radius: 5px;
    text-align: center;
    display: flex;
    vertical-align: text-top;
    justify-content: center;
    align-items: flex-end;
    line-height: 20px;
    font-size: 12px;
    border: 10px solid #e7e7bc;
    padding: 10px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.cartridge-container {
    margin-top: 50px;
    opacity: 0;
    pointer-events: none;
}

.cartridge-container .cartridge {
    width: 180px;
    height: 200px;
    background-size: cover;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float 3s ease-in-out infinite; 
}

.cartridge-container .cartridge:hover {
    transform: rotateY(360deg) scale(1.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    animation: none;
}

.cartridge-container .cartridge::after {
    content: attr(data-name);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cartridge-container .cartridge:hover::after {
    opacity: 1;
    visibility: visible;
}


.cartridge-container.active {
    height: 40%;
    opacity: 1;
    transition: height 0.6s ease;
    pointer-events: all;
}

.dongle.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.clickable {
    color: #00ff00;
    cursor: pointer;
    text-decoration: underline;
}

.clickable:hover {
    color: #ff00ff;
}


.slot-text {
    position: absolute;
    bottom: -50px;
    left: 24px;
    text-align: center;
    margin-bottom: 10px; 
    transform: translateX(-50%);
}

.slot.glow {
    box-shadow: 0 0 20px #00ff00;
    animation: glow 1s infinite;
}

@keyframes scanline {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.screen {
    padding: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.terminal {
    padding-bottom: 20px;
    overflow-x: hidden;
    width: 100%;
    scrollbar-width: none;
}

.terminal::-webkit-scrollbar {
    display: none;
}

.input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.input-line span {
    margin-right: 5px;
}

input {
    background: transparent;
    border: none;
    outline: none;
    color: #00ff00;
    font-family: 'Px437', monospace;
    font-size: 25px;
    caret-color: #00ff00;
}

footer {
    width: 100%;
    background: #111; 
    color: #00ff00;
    text-align: center;
    padding: 20px 0;
    position: fixed; 
    bottom: 0;
    left: 0;
}

footer .footer-content a {
    color: #00ff00;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer .footer-content a:hover {
    color: #ff00ff;
}

