@font-face {
    font-family: 'Termina';
    src: url('assets/TERMINA0.TTF') format('truetype');
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    background-image: url('assets/textura_oxido.jpg');
    background-size: cover;
    background-position: center;
    color: #33FF00;
    font-family: 'Termina', monospace;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Pantalla de Inicio */
#start-screen {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

#btn-start {
    background: transparent;
    border: 2px solid #33FF00;
    color: #33FF00;
    font-family: 'Termina', monospace;
    font-size: 2rem;
    padding: 20px 40px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(51, 255, 0, 0.5);
    transition: all 0.2s;
    animation: blinker 2s infinite;
}

#btn-start:hover {
    background: #33FF00;
    color: #000;
}

@keyframes blinker {
    50% { opacity: 0.5; }
}

/* Boot Interface */
#boot-interface {
    width: 100%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#terminal-container {
    width: 80%;
    max-width: 800px;
    background-color: rgba(0, 0, 0, 0.85);
    border: 2px solid #1a8000;
    padding: 30px;
    font-size: 1.5rem;
    line-height: 1.6;
    box-shadow: inset 0 0 20px rgba(51, 255, 0, 0.2);
    min-height: 400px;
    text-shadow: 0 0 5px #33FF00;
}

#terminal-output {
    display: inline;
}

.cursor {
    display: inline-block;
    width: 15px;
    background-color: #33FF00;
    animation: blink-cursor 0.8s infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

#logo-container {
    margin-top: 50px;
    text-align: center;
}

#crom-logo {
    max-width: 400px;
    border: 2px solid #33FF00;
    box-shadow: 0 0 20px #33FF00;
}

.system-ready {
    margin-top: 20px;
    font-size: 2rem;
    color: #33FF00;
    text-shadow: 0 0 10px #33FF00;
}

.blink {
    animation: fast-blink 1s infinite;
}

@keyframes fast-blink {
    50% { opacity: 0; }
}

/* ESCRITORIO CROM */
#desktop-interface {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.desktop-header {
    background: rgba(0, 50, 0, 0.8);
    border-bottom: 2px solid #33FF00;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(51, 255, 0, 0.3);
}

.desktop-header h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.desktop-grid {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 40px;
    gap: 30px;
}

.desktop-icon {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid transparent;
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #33FF00;
    font-family: 'Termina', monospace;
    font-size: 0.9rem;
    text-align: center;
}

.desktop-icon img {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
    image-rendering: pixelated; /* Para que los .ico se vean retro */
}

.desktop-icon:hover {
    border-color: #33FF00;
    background: rgba(51, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(51, 255, 0, 0.4);
}

/* MODAL WINDOW */
#modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#modal-window {
    background: #c0c0c0; /* Gris clásico Windows 95/VB6 */
    border: 3px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    width: 80%;
    max-width: 900px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: #000080; /* Azul oscuro clásico */
    color: white;
    font-family: sans-serif;
    font-weight: bold;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#modal-title {
    font-size: 1.1rem;
}

#modal-close {
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    font-weight: bold;
    padding: 2px 8px;
    cursor: pointer;
}

#modal-close:active {
    border: 2px solid #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
}

#modal-content {
    padding: 10px;
    background: #000;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#modal-content iframe,
#modal-content ruffle-player {
    width: 100%;
    height: 100%;
}
