/* Estilo retro terminal para la aventura conversacional */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #00ff00;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Estilos para el popup de homenaje */
.intro-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.intro-content {
    background-color: #001100;
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 20px #00ff00;
    text-align: center;
}

.intro-content h2 {
    color: #00ff00;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ff00;
    font-family: 'Amiri', 'Scheherazade', 'Arial Unicode MS', serif;
}

.intro-text {
    text-align: left;
    line-height: 1.6;
    margin-bottom: 25px;
}

.intro-text p {
    margin-bottom: 15px;
    color: #cccccc;
}

.intro-button {
    background-color: #003300;
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 12px 25px;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.intro-button:hover {
    background-color: #00ff00;
    color: #000;
    box-shadow: 0 0 15px #00ff00;
}

.intro-button:active {
    transform: scale(0.95);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 20px;
}

.header h1 {
    font-size: 2.5em;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    margin-bottom: 10px;
    font-family: 'Amiri', 'Scheherazade', 'Arial Unicode MS', serif;
    font-weight: bold;
}

.subtitle {
    font-size: 1.2em;
    color: #00cc00;
    font-style: italic;
}

.game-area {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.image-container {
    flex: 1;
    max-width: 500px;
    border: 2px solid #00ff00;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.text-area {
    flex: 1;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.game-text {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff00;
    border-radius: 5px;
    line-height: 1.6;
}

.game-text p {
    margin-bottom: 15px;
    color: #00ff00;
}

.game-text .location {
    font-weight: bold;
    color: #00ffff;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.game-text .action {
    color: #ffff00;
    font-style: italic;
}

.game-text .item {
    color: #ff6600;
    font-weight: bold;
}

.input-area {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff00;
    border-radius: 5px;
    padding: 10px;
}

.prompt {
    color: #00ff00;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2em;
}

#command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    outline: none;
}

#command-input::placeholder {
    color: #006600;
}

.inventory {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff00;
    border-radius: 5px;
    padding: 15px;
}

.inventory h3 {
    color: #00ffff;
    margin-bottom: 10px;
    font-size: 1.1em;
}

#inventory-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inventory-item {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 3px;
    padding: 5px 10px;
    color: #ff6600;
    font-size: 0.9em;
}

.footer {
    text-align: center;
    border-top: 2px solid #00ff00;
    padding-top: 15px;
    color: #00cc00;
    font-size: 0.9em;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.music-info {
    color: #ffff00;
    font-size: 0.8em;
    margin: 0;
}

.audio-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

.audio-controls button {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.audio-controls button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.audio-controls button:active {
    background: rgba(0, 255, 0, 0.3);
}

/* Botón de ayuda */
.help-button {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 6px 12px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin: 0;
}

.help-button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.help-button:active {
    background: rgba(0, 255, 0, 0.3);
}

/* Comandos de ayuda - ocultos por defecto en móvil */
.commands-help {
    display: block;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00ff00;
    border-radius: 5px;
    font-size: 0.8em;
}

/* En móvil, ocultar comandos por defecto */
@media (max-width: 768px) {
    .commands-help {
        display: none;
    }
    
    .commands-help.show {
        display: block;
    }
    
    /* Estilos del popup en móvil */
    .intro-content {
        margin: 20px;
        padding: 20px;
        max-width: calc(100% - 40px);
    }
    
    .intro-content h2 {
        font-size: 1.4em;
    }
    
    .intro-text {
        font-size: 0.9em;
    }
    
    .intro-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* Efectos de terminal */
.game-text::-webkit-scrollbar {
    width: 8px;
}

.game-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.game-text::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

.game-text::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Animaciones */
@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px #00ff00; }
    50% { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

.header h1 {
    animation: glow 3s ease-in-out infinite;
}

/* Responsive - Optimizado para móvil */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    .header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .header h1 {
        font-size: 1.8em;
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .game-area {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .image-container {
        max-width: 100%;
    }
    
    .image-container img {
        width: 100%;
        height: auto;
        display: block;
    }
    
    .text-area {
        padding: 15px;
    }
    
    .game-text {
        min-height: 180px;
        max-height: 220px;
        padding: 10px;
        font-size: 0.85em;
        line-height: 1.3;
    }
    
    .input-area {
        padding: 8px;
        margin-bottom: 15px;
    }
    
    .prompt {
        font-size: 1em;
        margin-right: 8px;
    }
    
    #command-input {
        font-size: 0.9em;
    }
    
    .inventory {
        padding: 12px;
    }
    
    .inventory h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .inventory-item {
        font-size: 0.8em;
        padding: 4px 8px;
    }
    
    .footer {
        padding-top: 8px;
        font-size: 0.75em;
        margin-top: 8px;
    }
    
    .footer-content {
        gap: 6px;
    }
    
    .footer-controls {
        gap: 10px;
    }
    
    .help-button {
        font-size: 0.7em;
        padding: 4px 8px;
    }
    
    .audio-controls {
        gap: 6px;
    }
    
    .audio-controls button {
        padding: 5px 10px;
        font-size: 0.75em;
    }
    
    .music-info {
        font-size: 0.7em;
    }
}

/* En desktop, ocultar botón de ayuda */
@media (min-width: 769px) {
    .help-button {
        display: none;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }
    
    .game-text {
        min-height: 180px;
        max-height: 220px;
        font-size: 0.85em;
    }
    
    .image-container {
        max-width: 100%;
    }
    
    .image-container img {
        width: 100%;
        height: auto;
        display: block;
    }
    
    .container {
        padding: 5px;
    }
    
    .text-area {
        padding: 10px;
    }
    
    .input-area {
        padding: 6px;
    }
    
    .inventory {
        padding: 8px;
    }
}
