/* Reset CSS básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de color - Paleta pixel art */
:root {
    --bg-dark: #101018;
    --accent-primary: #2F4CEE;
    --accent-secondary: #F5D76E;
    --text-light: #F4F4F4;
    --error-color: #EE2F2F;
    --success-color: #2FEE4C;
    --border-color: #3A3A4A;
}

body {
    font-family: 'VT323', monospace;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow: hidden;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* ===== HEADER DE INTERACCIÓN PRINCIPAL ===== */
.interaction-header {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10001;
    flex-wrap: wrap;
    gap: 15px;
}

/* ===== CONTROL DE VOLUMEN ===== */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(26, 26, 42, 0.9);
    padding: 10px 15px;
    border: 2px solid var(--accent-secondary);
    border-radius: 5px;
}

.volume-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.volume-btn:hover {
    transform: scale(1.2);
}

.volume-slider {
    width: 120px;
    height: 5px;
    background: var(--bg-dark);
    border: 1px solid var(--accent-secondary);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    background: var(--accent-secondary);
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: var(--accent-secondary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.volume-value {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

/* Sistema de pantallas */
.screen {
    display: none;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1; /* Z-index bajo para las pantallas base */
}

#pc-loading-screen {
    z-index: 1000; /* Z-index más alto para la pantalla de carga */
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Asegurar que level2-screen se muestre correctamente */
#level2-screen.active {
    display: flex !important;
}

/* ===== PANTALLA DE INICIO ===== */
#start-screen {
    background-image: url('../assets/images/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.start-container {
    text-align: center;
    padding: 2rem;
    background-color: rgba(16, 16, 24, 0.7);
    border-radius: 10px;
}

.game-title {
    font-size: 4rem;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 3px 3px 0px var(--bg-dark);
    margin-bottom: 1rem;
    letter-spacing: 0.2rem;
}

.game-subtitle {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    margin-bottom: 3rem;
}

/* ===== GRID DE OVAs ===== */
.ovas-grid {
    margin: 1.5rem 0;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.ovas-title {
    font-size: 2rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
    font-family: 'VT323', monospace;
    text-align: center;
}

.ovas-description {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-family: 'VT323', monospace;
    text-align: center;
    opacity: 0.8;
}

.ovas-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.ova-card {
    background: linear-gradient(135deg, rgba(26, 26, 42, 0.95), rgba(16, 16, 24, 0.95));
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1rem;
    transition: all 0.3s ease;
    font-family: 'VT323', monospace;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ova-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(245, 215, 110, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ova-card:hover:not(.disabled)::before {
    opacity: 1;
}

.ova-card-featured {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 20px rgba(245, 215, 110, 0.2);
}

.ova-card-featured:hover {
    box-shadow: 0 8px 24px rgba(245, 215, 110, 0.4);
    transform: translateY(-4px);
}

.ova-card-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.ova-card.disabled {
    cursor: not-allowed;
}

.ova-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid rgba(245, 215, 110, 0.2);
}

.ova-number {
    font-size: 1.1rem;
    color: var(--accent-secondary);
    font-weight: bold;
    letter-spacing: 0.1rem;
}

.ova-status {
    font-size: 1.4rem;
}

.ova-card-title {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.ova-card-description {
    font-size: 0.95rem;
    color: rgba(244, 244, 244, 0.7);
    margin-bottom: 0.6rem;
    line-height: 1.4;
    min-height: 2.5em;
}

.ova-card-stats {
    font-size: 1rem;
    color: var(--accent-secondary);
    margin-bottom: 0.6rem;
    padding: 0.4rem;
    background-color: rgba(245, 215, 110, 0.1);
    border-radius: 5px;
}

.ova-card-stats span {
    font-weight: bold;
    color: var(--accent-secondary);
}

.btn-ova {
    width: 100%;
    margin-top: 0.4rem;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
}

.btn-ova-primary {
    background-color: var(--accent-secondary);
    color: var(--bg-dark);
    border-color: var(--accent-secondary);
}

.btn-ova-primary:hover:not(:disabled) {
    background-color: #F5D76E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 215, 110, 0.5);
}

.btn-ova:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== LISTA DE NIVELES ===== */
.levels-list {
    margin: 1.5rem 0;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.levels-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-back {
    background-color: rgba(26, 26, 42, 0.8);
    border: 2px solid var(--border-color);
    color: var(--text-light);
    font-size: 1.2rem;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-family: 'VT323', monospace;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.btn-back:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    background-color: rgba(245, 215, 110, 0.1);
    transform: translateX(-5px);
}

.levels-title {
    font-size: 1.8rem;
    color: var(--accent-secondary);
    font-family: 'VT323', monospace;
    flex: 1;
}

.levels-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 100%;
}

.level-card {
    background: linear-gradient(135deg, rgba(26, 26, 42, 0.95), rgba(16, 16, 24, 0.95));
    border: 3px solid var(--accent-secondary);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    font-family: 'VT323', monospace;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(245, 215, 110, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.level-card:hover::before {
    opacity: 1;
}

.level-card:hover {
    box-shadow: 0 6px 16px rgba(245, 215, 110, 0.3);
    transform: translateY(-3px);
}

.level-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(245, 215, 110, 0.2);
}

.level-number {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    font-weight: bold;
    letter-spacing: 0.05rem;
}

.level-status {
    font-size: 1.5rem;
}

.level-card-title {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.level-card-progress {
    font-size: 1.1rem;
    color: rgba(244, 244, 244, 0.7);
    margin-bottom: 1rem;
    padding: 0.3rem 0.6rem;
    background-color: rgba(245, 215, 110, 0.1);
    border-radius: 4px;
    display: inline-block;
    flex: 1;
}

.btn-level {
    width: 100%;
    margin-top: auto;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
}

.btn-level:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== BOTONES ===== */
.btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-family: 'VT323', monospace;
    font-weight: bold;
    border: 3px solid var(--accent-secondary);
    background-color: var(--bg-dark);
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    image-rendering: pixelated;
}

.btn:hover:not(:disabled) {
    background-color: var(--accent-secondary);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 215, 110, 0.5);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border-color);
    color: var(--border-color);
}

.btn-primary {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-secondary {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--accent-secondary);
    color: var(--bg-dark);
}

.btn-close {
    background-color: #C0C0C0;
    border: 2px outset #C0C0C0; /* Efecto 3D de los 90s */
    color: #000000;
    width: 20px;
    height: 20px;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background-color: #C0C0C0;
    border: 2px inset #C0C0C0; /* Efecto presionado */
}

.btn-close:active {
    border: 2px inset #808080;
    background-color: #A0A0A0;
}

/* ===== PANTALLA DE CONTEXTO (NOVELA VISUAL) ===== */
.novel-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.novel-character {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--bg-dark);
    min-height: 0;
    overflow: hidden;
}

.character-img {
    max-width: 100%;
    max-height: 70vh;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    object-fit: contain;
}

.novel-text-area {
    background-color: rgba(26, 26, 42, 0.95);
    border-top: 4px solid var(--accent-secondary);
    padding: 1.5rem;
    min-height: 200px;
    max-height: 40vh;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.novel-time {
    color: var(--accent-secondary);
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.novel-text {
    color: var(--text-light);
    font-size: 1.3rem;
    line-height: 1.8;
    min-height: 80px;
    max-height: 200px;
    padding: 1rem;
    background-color: rgba(16, 16, 24, 0.5);
    border: 2px solid var(--accent-secondary);
    border-radius: 5px;
    overflow-y: auto;
    flex: 1;
    margin-bottom: 1rem;
}

.novel-text::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--accent-secondary);
}

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

.novel-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    flex-shrink: 0;
    min-height: 50px;
}

.btn-continue {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-family: 'VT323', monospace;
    font-weight: bold;
    border: 2px solid var(--accent-secondary);
    background-color: var(--bg-dark);
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.btn-continue:hover {
    background-color: var(--accent-secondary);
    color: var(--bg-dark);
    transform: translateX(5px);
}

.btn-skip {
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
    font-family: 'VT323', monospace;
    border: 2px solid var(--accent-secondary);
    background-color: var(--bg-dark);
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
    min-width: 40px;
}

.btn-skip:hover {
    background-color: var(--accent-secondary);
    color: var(--bg-dark);
    transform: scale(1.1);
}

.btn-skip:active {
    transform: scale(0.95);
}

/* ===== PANTALLA DE PC VIRTUAL (Estilo años 90) ===== */
.pc-container {
    width: 98%;
    max-width: 1400px;
    position: relative;
}

.pc-window {
    background-color: #C0C0C0; /* Gris típico de Windows 95 */
    border: 3px outset #C0C0C0; /* Efecto 3D de los 90s */
    box-shadow: 
        inset -2px -2px 0px #808080,
        inset 2px 2px 0px #FFFFFF,
        4px 4px 8px rgba(0, 0, 0, 0.3);
}

.pc-header {
    background: linear-gradient(to bottom, #000080, #0000C0); /* Azul oscuro de Windows 95 */
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 2px solid #000060;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.pc-desktop {
    padding: 2rem;
    min-height: 400px;
    background-color: #C0C0C0; /* Fondo gris de escritorio */
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pc-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 1rem;
    transition: transform 0.2s;
    text-align: center;
}

.pc-icon:hover {
    transform: scale(1.1);
}

.icon-image {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    image-rendering: pixelated;
}

.icon-label {
    font-size: 1.2rem;
    color: #000000; /* Texto negro típico de los 90s */
    max-width: 140px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.3;
    text-align: center;
    hyphens: auto;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.3);
    padding: 2px 4px;
    border-radius: 2px;
}

.pc-icon:hover .icon-label {
    background-color: rgba(0, 0, 255, 0.2); /* Azul al hacer hover */
    color: #000080;
}

/* ===== PANELES DE INFORMACIÓN (Estilo años 90) ===== */
.info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #C0C0C0; /* Gris típico de Windows 95 */
    border: 3px outset #C0C0C0; /* Efecto 3D de los 90s */
    width: 95%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 
        inset -2px -2px 0px #808080,
        inset 2px 2px 0px #FFFFFF,
        4px 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.info-panel.hidden {
    display: none;
}

.panel-header {
    background: linear-gradient(to bottom, #000080, #0000C0); /* Azul oscuro de Windows 95 */
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 2px solid #000060;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.panel-content {
    padding: 2.5rem;
    line-height: 2;
    background-color: #C0C0C0;
    color: #000000; /* Texto negro típico de los 90s */
    font-size: 1.2rem; /* Tamaño de fuente legible */
    max-height: 75vh;
    overflow-y: auto;
}

.panel-content h4 {
    color: #000080; /* Azul oscuro para títulos */
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem; /* Título más grande */
    font-weight: bold;
    border-bottom: 2px solid #808080;
    padding-bottom: 0.5rem;
}

.panel-content h4:first-child {
    margin-top: 0;
}

.panel-content p {
    font-size: 1.2rem; /* Texto más grande */
    margin-bottom: 1.2rem;
    text-align: justify;
}

.panel-content ul {
    margin-bottom: 1.5rem;
}

.panel-content li {
    font-size: 1.2rem; /* Texto más grande */
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.panel-content strong {
    color: #000080;
    font-weight: bold;
}

.panel-content ul {
    list-style: none;
    padding-left: 0;
}

.panel-content li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.panel-content li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.video-panel-content {
    color: #FFFFFF !important; /* Texto blanco para TubeSegur */
}

.video-frame {
    width: 100%;
    max-width: 100%;
    background-color: #000000;
    border: 3px inset #808080; /* Frame estilo años 90 */
    box-shadow: 
        inset 2px 2px 0px #000000,
        inset -2px -2px 0px #C0C0C0;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.video-frame > div {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.video-placeholder {
    text-align: center;
    padding: 2rem;
    color: #FFFFFF;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-placeholder p {
    color: #FFFFFF;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.video-note {
    margin-top: 1rem;
    font-style: italic;
    color: #CCCCCC;
    font-size: 1rem;
}

/* ===== NAVEGACIÓN DE VIDEOS MÚLTIPLES ===== */
.multi-video-container {
    width: 100%;
}

.video-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #808080;
    border: 2px inset #808080;
    margin-bottom: 1rem;
    gap: 1rem;
}

.video-nav-btn {
    background-color: #C0C0C0;
    border: 2px outset #C0C0C0;
    color: #000000;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-family: 'VT323', monospace;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.video-nav-btn:hover:not(:disabled) {
    background-color: #D0D0D0;
    border: 2px inset #C0C0C0;
    transform: translate(1px, 1px);
}

.video-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #A0A0A0;
}

.video-indicator {
    flex: 1;
    text-align: center;
    color: #000000;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
}

.videos-wrapper {
    position: relative;
    width: 100%;
}

.videos-wrapper .video-frame {
    display: none;
}

.videos-wrapper .video-frame.active-video {
    display: block;
}

/* ===== PANTALLA DE CARGA DEL PC ===== */
.pc-loading-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    font-family: 'VT323', monospace;
    position: relative;
    z-index: 1;
}

.pc-loading-content {
    pointer-events: auto;
    z-index: 1;
}

/* Botón para saltar la carga */
.btn-skip-loading {
    position: fixed !important; /* Cambiar a fixed para asegurar que esté por encima */
    bottom: 20px !important; /* Mover a la parte inferior */
    right: 20px !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    border: 2px solid #00FF00 !important;
    color: #00FF00 !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 1.1rem !important;
    font-family: 'VT323', monospace !important;
    cursor: pointer !important;
    transition: all 0.3s;
    z-index: 99999 !important; /* Z-index muy alto para estar por encima de todo */
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    pointer-events: auto !important; /* Asegurar que sea clickeable */
    user-select: none !important; /* Evitar selección de texto */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    touch-action: manipulation; /* Mejorar respuesta táctil */
}

.btn-skip-loading:hover {
    background-color: rgba(0, 255, 0, 0.3) !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8) !important;
    transform: scale(1.1) !important;
    cursor: pointer !important;
    border-color: #00FF00 !important;
}

.btn-skip-loading:active {
    background-color: rgba(0, 255, 0, 0.4) !important;
    transform: scale(0.95) !important;
}

/* Debug: mostrar claramente cuando el mouse está sobre el botón */
.btn-skip-loading:hover::after {
    content: " ← CLICKEABLE";
    color: #00FF00;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    animation: blink 1s infinite;
}

.btn-skip-loading:active {
    transform: scale(0.95);
}

.pc-loading-content {
    text-align: center;
    color: #00FF00; /* Verde típico de terminal */
}

.pc-loading-logo {
    font-size: 6rem;
    margin-bottom: 2rem;
    animation: blink 1s infinite;
}

.pc-loading-text {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #00FF00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.pc-loading-bar {
    width: 300px;
    height: 20px;
    background-color: #333333;
    border: 2px solid #00FF00;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.pc-loading-progress {
    height: 100%;
    background-color: #00FF00;
    width: 0%;
    animation: loadingProgress 10s ease-in-out forwards;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

@keyframes loadingProgress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

/* ===== BARRA DE VIDAS ===== */
.lives-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background-color: rgba(26, 26, 42, 0.9);
    border: 3px solid var(--accent-secondary);
    padding: 0.8rem 1.2rem;
    font-family: 'VT323', monospace;
    border-radius: 5px;
}

.lives-label {
    color: var(--accent-secondary);
    font-size: 1.3rem;
    font-weight: bold;
}

.lives-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.life-heart {
    font-size: 1.8rem;
    transition: all 0.3s;
    display: inline-block;
}

.life-heart.active {
    animation: heartbeat 1s ease-in-out infinite;
}

.life-heart.lost {
    opacity: 0.3;
    transform: scale(0.8);
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== PANTALLA DE NIVEL 1 ===== */
.level-container {
    width: 95%;
    max-width: 1200px;
    padding: 1rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'VT323', monospace;
}

/* ===== NIVEL 2 ===== */
.level2-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    font-family: 'VT323', monospace;
    background-color: var(--bg-dark);
}

.level2-image-container {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.level2-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border: 3px solid var(--accent-secondary);
    box-shadow: 0 0 20px rgba(245, 215, 110, 0.3);
    image-rendering: pixelated;
}

.level2-text-container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    padding: 2rem;
    background-color: rgba(26, 26, 42, 0.8);
    border: 3px solid var(--accent-secondary);
}

.level2-text {
    font-size: 2rem;
    color: var(--accent-secondary);
    font-family: 'VT323', monospace;
    line-height: 1.6;
    text-shadow: 0 0 10px rgba(245, 215, 110, 0.5);
}

.level-header {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 80px; /* Espacio para el header de interacción */
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-secondary);
}

.level-header h2 {
    color: var(--accent-secondary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-family: 'VT323', monospace;
}

.level-instruction {
    text-align: center;
    color: var(--accent-secondary);
    font-size: 1.4rem;
    font-family: 'VT323', monospace;
}

/* Botón Ver el ordenador (parte inferior derecha) */
.btn-view-pc {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.level-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Importante para que funcione el scroll en flexbox */
}

/* Layout vertical para nivel 1 del módulo 2 */
.level-content-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden; /* Evitar scroll en el contenedor principal */
    min-height: 0;
}

.folders-area-vertical {
    flex-shrink: 0; /* No se encoge, mantiene su tamaño */
    background-color: #1A1A2A;
    border: 3px solid var(--border-color);
    padding: 1rem;
}

.folders-container-vertical {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.folder-vertical {
    background-color: #2A2A3A;
    border: 3px solid var(--border-color);
    padding: 0.6rem;
    min-width: 140px;
    max-width: 160px;
    flex: 0 0 auto; /* No crece ni se encoge */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.folder-vertical .folder-icon {
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

.folder-vertical .folder-label {
    font-size: 0.85rem;
    line-height: 1.2;
    margin-bottom: 0.4rem;
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-vertical .folder-dropzone {
    min-height: 50px;
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    margin-top: 0.4rem;
    transition: all 0.3s;
}

.folder-vertical .folder-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
    align-items: center;
    padding: 0.3rem;
    min-height: 40px;
}

.folder-vertical .folder-file {
    background-color: var(--accent-secondary);
    color: #1A1A2A;
    font-weight: bold;
    font-size: 1rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    min-width: 24px;
    text-align: center;
    font-family: 'VT323', monospace;
}

.folder-vertical.drag-over .folder-dropzone {
    border-color: var(--accent-primary);
    background-color: rgba(238, 47, 47, 0.1);
}

.folder-vertical.correct-drop .folder-dropzone {
    border-color: var(--success-color);
    background-color: rgba(47, 238, 76, 0.1);
}

.files-area-vertical {
    flex: 1;
    background-color: #1A1A2A;
    border: 3px solid var(--border-color);
    padding: 1.5rem;
    overflow: hidden; /* Evitar scroll en el área */
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.files-container-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow-y: auto; /* Solo los documentos tienen scroll */
    flex: 1;
    padding-right: 0.5rem; /* Espacio para el scrollbar */
    padding-bottom: 1rem; /* Espacio adicional al final */
    /* Prevenir que el contenedor sea arrastrable */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Asegurar que solo los file-cards sean arrastrables */
.files-container-vertical > *:not(.file-card) {
    pointer-events: none;
}

/* Estilo del scrollbar para documentos */
.files-container-vertical::-webkit-scrollbar {
    width: 8px;
}

.files-container-vertical::-webkit-scrollbar-track {
    background: #1A1A2A;
    border-radius: 4px;
}

.files-container-vertical::-webkit-scrollbar-thumb {
    background: var(--accent-secondary);
    border-radius: 4px;
}

.files-container-vertical::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.files-area, .folders-area {
    background-color: #1A1A2A;
    border: 3px solid var(--border-color);
    padding: 1.5rem;
}

.files-area h3, .folders-area h3 {
    color: var(--accent-secondary);
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-family: 'VT323', monospace;
}

/* ===== ARCHIVOS ARRASTRABLES ===== */
.files-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-card {
    background-color: #2A2A3A;
    border: 2px solid var(--accent-secondary);
    padding: 0.7rem;
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
    font-size: 0.9rem;
    line-height: 1.3;
}

.file-card:hover {
    background-color: #3A3A4A;
    transform: translateX(5px);
}

.file-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* Prevenir que los elementos hijos interfieran con el drag */
.file-card * {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.file-name {
    font-weight: bold;
    color: var(--text-light);
    font-size: 1.1rem;
    font-family: 'VT323', monospace;
}

.file-card.correct {
    border-color: var(--success-color);
    background-color: rgba(47, 238, 76, 0.2);
}

.file-card.incorrect {
    border-color: var(--error-color);
    background-color: rgba(238, 47, 47, 0.2);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}


/* ===== CARPETAS DESTINO ===== */
.folders-container {
    display: flex;
    flex-direction: row; /* Cambiar a horizontal - carpetas lado a lado */
    gap: 3rem; /* Aumentar espacio entre carpetas para que respiren */
    justify-content: center;
    flex-wrap: nowrap;
    align-items: stretch;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
    .folders-container {
        gap: 1rem; /* Reducir espacio entre carpetas en pantallas pequeñas */
    }
    
    .folder {
        min-width: 140px;
        max-width: 200px;
    }
}

.folder {
    background-color: #2A2A3A;
    border: 3px solid var(--border-color);
    padding: 2.5rem; /* Aumentar padding interno */
    text-align: center;
    position: relative;
    transition: all 0.3s;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1; /* Permitir que las carpetas se distribuyan equitativamente */
    min-width: 250px; /* Aumentar ancho mínimo */
    max-width: 400px; /* Aumentar ancho máximo */
}

.folder.drag-over {
    border-color: var(--accent-secondary);
    background-color: rgba(245, 215, 110, 0.2);
    transform: scale(1.05);
}

.folder.correct-drop {
    border-color: var(--success-color);
    background-color: rgba(47, 238, 76, 0.2);
}

.folder-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.folder-label {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    position: relative;
    z-index: 2;
    pointer-events: none;
    line-height: 1.4;
    text-align: center;
    font-family: 'VT323', monospace;
}

.folder-dropzone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.folder-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* Archivos dentro de carpetas */
.folder-file {
    background-color: rgba(245, 215, 110, 0.3);
    border: 2px solid var(--accent-secondary);
    padding: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* ===== MENSAJE DE VICTORIA ===== */
.victory-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 16, 24, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.victory-message.hidden {
    display: none;
}

.victory-content {
    background-color: #1A1A2A;
    border: 4px solid var(--success-color);
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 0 40px rgba(47, 238, 76, 0.5);
}

.victory-content h2 {
    color: var(--success-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.victory-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.promotion {
    color: var(--accent-secondary);
    font-weight: bold;
    font-size: 1.4rem;
    margin: 2rem 0;
}

.victory-buttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.victory-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    min-width: 180px;
    font-weight: bold;
    border-width: 3px;
}

.victory-buttons .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== MENSAJE DE GAME OVER ===== */
.game-over-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 16, 24, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.game-over-content {
    background-color: #1A1A2A;
    border: 4px solid var(--error-color);
    padding: 3rem;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 0 40px rgba(238, 47, 47, 0.5);
    font-family: 'VT323', monospace;
}

.game-over-content h2 {
    color: var(--error-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.game-over-content p {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.game-over-content .btn {
    margin-top: 1rem;
}

/* ===== RESPONSIVE ===== */
/* Aplicar layout horizontal de carpetas en pantallas pequeñas y medianas */
@media (max-width: 1024px) {
    /* Carpetas una al lado de la otra en pantallas pequeñas y medianas */
    .folders-area .folders-container,
    #folders-container.folders-container,
    .folders-container {
        display: flex !important;
        flex-direction: row !important; /* Forzar horizontal */
        gap: 1rem !important;
        justify-content: center !important;
        flex-wrap: nowrap !important; /* No permitir wrap para mantenerlas juntas */
        align-items: stretch !important;
    }
    
    /* Ajustar tamaño de carpetas */
    .folder {
        flex: 1;
        min-width: 140px;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .level-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr; /* Carpetas arriba (auto), archivos abajo (1fr) */
        gap: 1rem;
        overflow: hidden; /* Evitar scroll en el contenedor principal */
        min-height: 0; /* Importante para que funcione el scroll */
    }
    
    /* En pantallas pequeñas, carpetas arriba y fijas */
    .folders-area {
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: #1A1A2A;
        padding: 1rem;
        border-bottom: 3px solid var(--border-color);
        flex-shrink: 0; /* No se encoge */
        overflow: visible; /* Permitir que las carpetas se vean completamente */
    }
    
    /* Carpetas una al lado de la otra en pantallas pequeñas */
    .folders-area .folders-container,
    #folders-container.folders-container,
    .folders-container {
        display: flex !important;
        flex-direction: row !important; /* Forzar horizontal */
        gap: 1rem !important;
        justify-content: center !important;
        flex-wrap: nowrap !important; /* No permitir wrap para mantenerlas juntas */
        align-items: stretch !important;
    }
    
    /* Ajustar tamaño de carpetas en pantallas pequeñas */
    .folder {
        flex: 1;
        min-width: 140px; /* Ancho mínimo para que quepan 2 */
        max-width: 200px; /* Ancho máximo */
        min-height: 120px; /* Reducir altura */
        padding: 1rem;
    }
    
    .folder-icon {
        font-size: 3rem; /* Reducir tamaño del ícono */
    }
    
    .folder-label {
        font-size: 1.1rem; /* Reducir tamaño del texto */
    }
    
    /* Área de archivos scrolleable */
    .files-area {
        overflow-y: auto;
        overflow-x: hidden;
        flex: 1;
        min-height: 0; /* Importante para que funcione el scroll */
        padding: 1rem;
        -webkit-overflow-scrolling: touch; /* Scroll suave en móviles */
    }
    
    .files-container {
        padding-bottom: 1rem; /* Espacio al final del scroll */
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    .pc-desktop {
        flex-direction: column;
        align-items: center;
    }
    
    /* Ajustar padding del contenedor en pantallas pequeñas */
    .level-container {
        padding: 1rem;
        gap: 1rem;
    }
}

/* Ajustes para pantallas pequeñas de laptops */
@media (max-height: 800px) {
    .novel-character {
        padding: 0.5rem;
    }
    
    .character-img {
        max-height: 50vh;
    }
    
    .novel-text-area {
        max-height: 35vh;
        padding: 1rem;
    }
    
    .novel-text {
        max-height: 150px;
        font-size: 1.1rem;
        min-height: 60px;
    }
    
    .novel-buttons {
        margin-top: 0.3rem;
        padding-top: 0.3rem;
    }
    
    .btn-continue, .btn-skip {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
    
    .interaction-header {
        top: 10px;
        right: 10px;
        gap: 10px;
    }
    
    .volume-control, .lives-bar {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== MODAL DE INTRODUCCIÓN ===== */
.intro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 16, 24, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.intro-modal.active {
    opacity: 1;
    visibility: visible;
}

.intro-modal-content {
    background-color: var(--bg-dark);
    border: 4px solid var(--accent-secondary);
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(245, 215, 110, 0.3);
    image-rendering: pixelated;
}

.intro-modal-header {
    background: linear-gradient(to right, rgba(245, 215, 110, 0.2), rgba(245, 215, 110, 0.1));
    color: var(--accent-secondary);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--accent-secondary);
}

.intro-modal-header h2 {
    font-size: 2rem;
    margin: 0;
    color: var(--text-light);
    font-family: 'VT323', monospace;
}

.btn-close-intro {
    background: transparent;
    border: 3px solid var(--accent-secondary);
    color: var(--accent-secondary);
    font-size: 2rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: 'VT323', monospace;
    line-height: 1;
    padding: 0;
}

.btn-close-intro:hover {
    background-color: var(--accent-secondary);
    color: var(--bg-dark);
    box-shadow: 0 4px 8px rgba(245, 215, 110, 0.5);
}

.intro-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    font-family: 'VT323', monospace;
}

.intro-section {
    margin-bottom: 2rem;
}

.intro-section:last-child {
    margin-bottom: 0;
}

.intro-section h3 {
    color: var(--accent-secondary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-secondary);
    padding-bottom: 0.5rem;
}

.intro-text {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.how-it-works {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(to right, rgba(245, 215, 110, 0.3), rgba(245, 215, 110, 0.2));
    color: var(--accent-secondary);
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    border: 3px solid var(--accent-secondary);
    flex-shrink: 0;
    font-family: 'VT323', monospace;
}

.step-content {
    flex: 1;
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-light);
    padding-top: 0.5rem;
}

.step-content p {
    margin: 0;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.rules-list li:before {
    content: "▸";
    color: var(--accent-secondary);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 0;
}

.rules-list li:last-child {
    margin-bottom: 0;
}

.intro-modal-footer {
    padding: 1.5rem;
    border-top: 3px solid var(--accent-secondary);
    display: flex;
    justify-content: center;
    background-color: rgba(26, 26, 42, 0.5);
}

.intro-modal-footer .btn {
    font-size: 1.5rem;
    padding: 1rem 3rem;
    min-width: 200px;
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 1024px) {
    .interaction-header {
        flex-direction: column;
        align-items: flex-end;
    }

    .volume-control, .lives-bar {
        width: auto;
    }

    .intro-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .intro-modal-header h2 {
        font-size: 1.5rem;
    }

    .intro-text, .step-content, .rules-list li {
        font-size: 1.1rem;
    }

    .step-item {
        flex-direction: column;
        gap: 1rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* Responsive para OVAs Grid */
@media (max-width: 768px) {
    .ovas-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ovas-title {
        font-size: 1.6rem;
    }

    .ovas-description {
        font-size: 1rem;
    }

    .ova-card {
        padding: 1.5rem 1rem;
    }

    .ova-number {
        font-size: 1.2rem;
    }

    .ova-card-title {
        font-size: 1.4rem;
    }

    .ova-card-description {
        font-size: 1rem;
        min-height: auto;
    }

    .ova-card-stats {
        font-size: 1.1rem;
    }

    .btn-ova {
        font-size: 1.1rem;
        padding: 0.7rem 1.2rem;
    }

    /* Lista de niveles responsive */
    .levels-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-back {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }

    .levels-title {
        font-size: 1.5rem;
    }

    .levels-container {
        grid-template-columns: 1fr;
    }

    .level-card {
        padding: 1.2rem;
    }

    .level-number {
        font-size: 1.3rem;
    }

    .level-card-title {
        font-size: 1.2rem;
    }

    .level-card-progress {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }

    .game-subtitle {
        font-size: 1.2rem;
    }

    .ovas-title {
        font-size: 1.4rem;
    }

    .ovas-description {
        font-size: 0.95rem;
    }

    .ova-card {
        padding: 1.2rem 0.8rem;
    }

    .ova-number {
        font-size: 1rem;
    }

    .ova-card-title {
        font-size: 1.2rem;
    }

    .ova-card-description {
        font-size: 0.95rem;
    }

    /* Lista de niveles responsive pequeño */
    .levels-title {
        font-size: 1.3rem;
    }

    .level-card {
        padding: 1rem;
    }

    .level-number {
        font-size: 1.2rem;
    }

    .level-card-title {
        font-size: 1.1rem;
    }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* ===== ACTIVIDAD NIVEL 2 - RULETA DE CASINO ===== */
.level2-activity-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.5rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.activity-header {
    text-align: center;
    padding: 0.5rem 0.5rem 0.3rem 0.5rem;
    border-bottom: 2px solid var(--accent-secondary);
    flex-shrink: 0;
    margin-top: 70px; /* Espacio para el header de interacción */
}

.activity-header h2 {
    color: var(--accent-secondary);
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    font-family: 'VT323', monospace;
    line-height: 1.2;
}

.activity-progress {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 0.2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.score-display {
    color: var(--accent-secondary);
    font-weight: bold;
}

.activity-content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex: 1;
    align-items: stretch;
    justify-content: center;
    padding: 0.5rem 0;
    overflow: hidden;
    min-height: 0;
}

/* Columna Izquierda: Ruleta y Escenario */
.left-column {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    min-height: 0;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Sección de la Ruleta */
.roulette-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(245, 215, 110, 0.2);
    margin-bottom: 0.5rem;
}

.roulette-container {
    position: relative;
    width: 100%;
    max-width: 260px;
    height: 260px;
    margin-bottom: 0;
}

.roulette-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid #F5D76E;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 30px rgba(245, 215, 110, 0.6),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    transform-origin: center;
    background: #1a1a2a;
    transition: transform 0.3s ease-out;
}

/* Efectos visuales durante el giro */
.roulette-wheel.roulette-spinning {
    filter: blur(1px) brightness(1.1);
    box-shadow:
        0 0 40px rgba(245, 215, 110, 0.8),
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(245, 215, 110, 0.4);
    animation: roulette-glow 0.5s ease-in-out infinite alternate;
}

.roulette-wheel.roulette-slowdown {
    filter: blur(0.5px) brightness(1.05);
    box-shadow:
        0 0 35px rgba(245, 215, 110, 0.7),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.roulette-wheel.roulette-stopping {
    filter: none;
    box-shadow:
        0 0 30px rgba(245, 215, 110, 0.6),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

@keyframes roulette-glow {
    0% {
        box-shadow:
            0 0 40px rgba(245, 215, 110, 0.8),
            inset 0 0 30px rgba(0, 0, 0, 0.5),
            0 0 60px rgba(245, 215, 110, 0.4);
    }
    100% {
        box-shadow:
            0 0 50px rgba(245, 215, 110, 1),
            inset 0 0 30px rgba(0, 0, 0, 0.5),
            0 0 80px rgba(245, 215, 110, 0.6);
    }
}

.roulette-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    transform-origin: 0 100%;
    border-right: 2px solid rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.segment-text {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'VT323', monospace;
}

.roulette-indicator {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--accent-secondary);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.btn-spin {
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
    font-family: 'VT323', monospace;
    margin: 0.3rem auto 0 auto;
    display: block;
    max-width: 180px;
    position: relative;
    z-index: 1;
}

/* Columna Derecha: Preguntas e Interacción */
.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 0;
    max-width: 700px;
    overflow-y: auto;
    min-height: 0;
}

.spinning-message {
    text-align: center;
    padding: 3rem 2rem;
    font-size: 2rem;
    color: var(--accent-primary);
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
}

.spinning-message.hidden {
    display: none;
}

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

.scenario-display {
    background-color: rgba(26, 26, 42, 0.9);
    border: 2px solid var(--accent-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.scenario-display h3 {
    color: var(--accent-secondary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-family: 'VT323', monospace;
}

.scenario-text {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.4;
    font-family: 'VT323', monospace;
}

.question-panel {
    background-color: rgba(26, 26, 42, 0.9);
    border: 2px solid var(--accent-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.question-text {
    color: var(--accent-secondary);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-family: 'VT323', monospace;
    line-height: 1.3;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.answer-option {
    background-color: var(--bg-dark);
    border: 2px solid var(--border-color);
    color: var(--text-light);
    padding: 0.6rem 0.8rem;
    font-size: 1.05rem;
    font-family: 'VT323', monospace;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    box-sizing: border-box;
    width: 100%;
    line-height: 1.3;
}

.answer-option:hover:not(:disabled) {
    border-color: var(--accent-secondary);
    background-color: rgba(245, 215, 110, 0.2);
    color: var(--accent-secondary);
    transform: translateX(10px);
}

.answer-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.answer-option.correct-answer {
    border-color: var(--success-color);
    background-color: rgba(47, 238, 76, 0.2);
    color: var(--success-color);
}

.answer-option.incorrect-answer {
    border-color: var(--error-color);
    background-color: rgba(238, 47, 47, 0.2);
    color: var(--error-color);
}

.feedback-message {
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-family: 'VT323', monospace;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.4;
}

.feedback-correct {
    background-color: rgba(47, 238, 76, 0.2);
    border: 2px solid var(--success-color);
    color: var(--success-color);
}

.feedback-incorrect {
    background-color: rgba(238, 47, 47, 0.2);
    border: 2px solid var(--error-color);
    color: var(--error-color);
}

.feedback-victory {
    background-color: rgba(245, 215, 110, 0.2);
    border: 2px solid var(--accent-secondary);
    color: var(--accent-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 1rem auto;
    padding: 1rem;
}

.victory-content-simple {
    text-align: center;
    padding: 0;
}

.victory-content-simple h2 {
    color: var(--accent-secondary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: 'VT323', monospace;
}

.victory-content-simple p {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--text-light);
    font-family: 'VT323', monospace;
    line-height: 1.3;
}

.victory-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.victory-buttons .btn {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    font-family: 'VT323', monospace;
    min-width: 130px;
}

.feedback-gameover {
    background-color: rgba(238, 47, 47, 0.3);
    border: 3px solid var(--error-color);
    color: var(--error-color);
}

.feedback-gameover h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ===== MINI-PREGUNTA DE JUSTIFICACIÓN ===== */
.justification-panel {
    background-color: rgba(26, 26, 42, 0.9);
    border: 2px solid var(--accent-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    margin-top: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.justification-question-text {
    color: var(--accent-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    font-family: 'VT323', monospace;
    line-height: 1.3;
}

.justification-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.justification-option {
    background-color: var(--bg-dark);
    border: 2px solid var(--border-color);
    color: var(--text-light);
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    font-family: 'VT323', monospace;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    box-sizing: border-box;
    width: 100%;
}

.justification-option:hover:not(:disabled) {
    border-color: var(--accent-secondary);
    background-color: rgba(245, 215, 110, 0.2);
    color: var(--accent-secondary);
    transform: translateX(10px);
}

.justification-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.justification-explanation {
    margin-top: 0.8rem;
    padding: 0.7rem;
    background-color: rgba(245, 215, 110, 0.1);
    border: 2px solid var(--accent-secondary);
    border-radius: 5px;
    color: var(--accent-secondary);
    font-size: 1rem;
    font-family: 'VT323', monospace;
    line-height: 1.4;
}

.btn-return-pc {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    font-family: 'VT323', monospace;
    z-index: 1000;
}

/* ===== MODAL DE VICTORIA NIVEL 2 ===== */
.victory-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.victory-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.victory-modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 42, 0.98), rgba(16, 16, 24, 0.98));
    border: 4px solid var(--accent-secondary);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 0 40px rgba(245, 215, 110, 0.5),
        0 10px 50px rgba(0, 0, 0, 0.7);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.victory-modal-header {
    background: linear-gradient(135deg, rgba(245, 215, 110, 0.2), rgba(245, 215, 110, 0.1));
    border-bottom: 3px solid var(--accent-secondary);
    padding: 1.5rem;
    text-align: center;
}

.victory-modal-header h2 {
    color: var(--accent-secondary);
    font-size: 2rem;
    margin: 0;
    font-family: 'VT323', monospace;
    text-shadow: 0 0 10px rgba(245, 215, 110, 0.5);
}

.victory-modal-body {
    padding: 2rem;
}

.victory-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.victory-stat-item {
    background: rgba(245, 215, 110, 0.1);
    border: 2px solid rgba(245, 215, 110, 0.3);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.victory-stat-item:hover {
    background: rgba(245, 215, 110, 0.15);
    border-color: var(--accent-secondary);
    transform: translateX(5px);
}

.stat-label {
    color: var(--text-light);
    font-size: 1.2rem;
    font-family: 'VT323', monospace;
}

.stat-value {
    color: var(--accent-secondary);
    font-size: 1.4rem;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

.victory-message-text {
    background: rgba(47, 238, 76, 0.1);
    border: 2px solid var(--success-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.victory-message-text p {
    color: var(--success-color);
    font-size: 1.2rem;
    margin: 0;
    font-family: 'VT323', monospace;
    line-height: 1.5;
}

.victory-modal-footer {
    padding: 1.5rem;
    border-top: 3px solid var(--accent-secondary);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.victory-modal-footer .btn {
    min-width: 180px;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
}

/* Responsive para actividad nivel 2 */
@media (max-width: 1200px) {
    .activity-content {
        flex-direction: column;
        gap: 0.8rem;
        overflow-y: auto;
    }

    .left-column {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .right-column {
        width: 100%;
        max-width: 100%;
        overflow-y: visible;
    }

    .roulette-container {
        max-width: 220px;
        height: 220px;
    }
}

@media (max-width: 768px) {
    .level2-activity-container {
        padding: 0.3rem;
    }

    .activity-header {
        padding: 0.4rem 0.3rem 0.2rem 0.3rem;
        margin-top: 60px;
    }

    .activity-header h2 {
        font-size: 1.1rem;
    }

    .activity-progress {
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .roulette-container {
        max-width: 200px;
        height: 200px;
    }

    .left-column {
        max-width: 100%;
        gap: 0.5rem;
    }

    .scenario-display,
    .question-panel,
    .justification-panel {
        padding: 0.6rem;
    }

    .scenario-text {
        font-size: 0.95rem;
    }

    .question-text,
    .justification-question-text {
        font-size: 1rem;
    }

    .answer-option,
    .justification-option {
        font-size: 0.9rem;
        padding: 0.5rem 0.6rem;
    }

    .btn-spin {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .btn-return-pc {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        bottom: 10px;
        right: 10px;
    }
}

@media (max-height: 700px) {
    .activity-header {
        margin-top: 55px;
        padding: 0.3rem 0.3rem 0.2rem 0.3rem;
    }

    .activity-header h2 {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }

    .activity-progress {
        font-size: 0.9rem;
    }

    .roulette-container {
        max-width: 200px;
        height: 200px;
    }

    .scenario-display,
    .question-panel,
    .justification-panel {
        padding: 0.5rem;
    }

    .feedback-message {
        padding: 0.5rem;
        font-size: 1rem;
    }
}

/* ===================================
   NIVEL 3 - TRAGAMONEDAS DE CUMPLIMIENTO
   =================================== */

.level3-activity-container,
.level4-activity-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Contenedor de la máquina tragamonedas */
.slot-machine-section {
    margin: 2rem 0;
}

.slot-machine-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.slot-machine-frame {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5b8 50%, #d4af37 100%);
    border: 8px solid #8b6914;
    border-radius: 20px;
    padding: 2rem;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.slot-machine-display {
    background: #1a1a2e;
    border: 4px solid #16213e;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.slot-reels {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    height: 240px;
    position: relative;
}

.slot-reel {
    width: 80px;
    height: 240px;
    background: #0f0f1e;
    border: 3px solid #2a2a4a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(47, 76, 238, 0.3);
    /* Asegurar que el contenido sea visible */
    display: flex;
    flex-direction: column;
}

.slot-symbol {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 2px solid #2a2a4a;
    user-select: none;
}

.btn-pull-lever {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #EE2F2F 0%, #c41e1e 100%);
    border: 4px solid #8b0000;
    border-radius: 10px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 5px 15px rgba(238, 47, 47, 0.5),
        inset 0 -5px 10px rgba(0, 0, 0, 0.3);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.btn-pull-lever:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 7px 20px rgba(238, 47, 47, 0.7),
        inset 0 -5px 10px rgba(0, 0, 0, 0.3);
}

.btn-pull-lever:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow:
        0 2px 10px rgba(238, 47, 47, 0.5),
        inset 0 5px 10px rgba(0, 0, 0, 0.5);
}

.btn-pull-lever:disabled {
    background: linear-gradient(135deg, #666 0%, #444 100%);
    border-color: #333;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Animación de palpitación para el botón de palanca */
@keyframes pulse-lever {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 5px 15px rgba(238, 47, 47, 0.5),
            inset 0 -5px 10px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 8px 25px rgba(238, 47, 47, 0.8),
            inset 0 -5px 10px rgba(0, 0, 0, 0.3);
    }
}

.btn-pull-lever.pulsing:not(:disabled) {
    animation: pulse-lever 1s ease-in-out infinite;
}

/* Animación de rodillos */
@keyframes spin-reel {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.slot-reel.spinning {
    animation: spin-reel 0.1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .level3-activity-container,
    .level4-activity-container {
        padding: 1rem;
    }

    .slot-machine-frame {
        padding: 1rem;
    }

    .slot-reels {
        gap: 0.5rem;
        height: 180px;
    }

    .slot-reel {
        width: 60px;
        height: 180px;
    }

    .slot-symbol {
        height: 60px;
        font-size: 2rem;
    }

    .btn-pull-lever {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
    }
}
