:root {
    --violeta-profundo: #100a1c;
    --morado-nebulosa: #2c1e4d;
    --azul-galactico: #0d3b66;
    --rosa-neon: #ff00e5;
    --blanco-estelar: #f0f0f0;
    --texto-sombra-rosa: 0 0 5px var(--rosa-neon), 0 0 10px var(--rosa-neon), 0 0 15px var(--rosa-neon);
}

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

/* --- CURSOR PERSONALIZADO GLOBAL --- */
html, body {
    cursor: url('https://res.cloudinary.com/dpsywhgjk/image/upload/v1753674319/cursor_accb9d.png'), auto;
}
button, input, textarea, a, .memory-card {
    cursor: url('https://res.cloudinary.com/dpsywhgjk/image/upload/v1753674319/cursor_accb9d.png'), auto !important;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--violeta-profundo);
    color: var(--blanco-estelar);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

#star-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* --- VISTAS Y TRANSICIONES --- */
.view {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}
.view.active {
    display: flex;
    opacity: 1;
}

/* --- PANTALLA DE INICIO (CORREGIDO) --- */
.start-content {
    text-align: center;
    animation: fadeIn 1.5s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.start-logo { font-size: 5rem; font-weight: bold; color: var(--blanco-estelar); margin-bottom: 1rem; }
.logo-heart { color: var(--rosa-neon); text-shadow: var(--texto-sombra-rosa); }
.start-content h1 { font-size: 2.5rem; color: var(--rosa-neon); text-shadow: var(--texto-sombra-rosa); }
.start-buttons-container { margin-top: 2rem; }

/* --- PANTALLA DE JUEGO (MEMORIA) --- */
.game-header { width: 100%; max-width: 800px; display: flex; justify-content: space-between; font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--rosa-neon); text-shadow: var(--texto-sombra-rosa); }
#memory-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; width: 100%; max-width: 800px; perspective: 1000px; }
.memory-card { width: 100%; aspect-ratio: 1 / 1; position: relative; transform-style: preserve-3d; transition: transform 0.6s, box-shadow 0.3s, opacity 0.3s; }
.memory-card.flipped { transform: rotateY(180deg); }
/* Estilo mejorado para pares encontrados */
.memory-card.matched {
    transform: rotateY(180deg) scale(0.95);
    box-shadow: 0 0 25px 8px var(--rosa-neon);
    opacity: 0.7;
}
.card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; justify-content: center; align-items: center; font-size: 3rem; border-radius: 10px; border: 2px solid var(--rosa-neon); overflow: hidden; }
.card-front { background: linear-gradient(45deg, var(--morado-nebulosa), var(--azul-galactico)); font-size: 4rem; }
.card-back { background-color: var(--violeta-profundo); transform: rotateY(180deg); padding: 5px; }
.card-back img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }

/* --- PANTALLA DE CONTENIDO PRINCIPAL --- */
#main-content-container { width: 100%; max-width: 900px; height: 100%; overflow-y: auto; padding: 2rem; text-align: center; animation: fadeIn 1s 0.5s backwards; }
.content-section { margin-bottom: 2rem; }
#main-content-container h1 { font-size: 3rem; color: var(--rosa-neon); text-shadow: var(--texto-sombra-rosa); margin-bottom: 2rem; }
#main-content-container h2 { font-size: 2rem; margin-bottom: 1rem; border-bottom: 2px solid var(--rosa-neon); display: inline-block; padding-bottom: 0.5rem; }
hr { width: 80%; max-width: 400px; border: 1px solid var(--rosa-neon); margin: 2rem auto; }
/* Estilos para la barra de scroll */
#main-content-container::-webkit-scrollbar { width: 10px; }
#main-content-container::-webkit-scrollbar-track { background: var(--violeta-profundo); border-radius: 10px; }
#main-content-container::-webkit-scrollbar-thumb { background-color: var(--rosa-neon); border-radius: 10px; border: 2px solid var(--violeta-profundo); }
#main-content-container::-webkit-scrollbar-thumb:hover { background-color: var(--blanco-estelar); }

/* --- COMPONENTES DE CONTENIDO --- */
.translated-text-container { font-size: 1.2rem; line-height: 1.8; text-align: left; max-width: 600px; margin: 0 auto; }
.translated-word { position: relative; display: inline-block; }
.original-word-tooltip { visibility: hidden; width: auto; background-color: var(--blanco-estelar); color: var(--violeta-profundo); text-align: center; border-radius: 6px; padding: 5px 10px; position: absolute; z-index: 1; bottom: 125%; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s; white-space: nowrap; font-size: 0.9rem; }
.translated-word:hover .original-word-tooltip { visibility: visible; opacity: 1; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2rem; padding: 1rem; }
.gallery-item { background: var(--blanco-estelar); padding: 15px 15px 30px 15px; border-radius: 5px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: transform 0.3s ease-in-out; }
.gallery-item:hover { transform: scale(1.05) !important; z-index: 10; }
.gallery-item img { width: 100%; height: auto; }
.dictionary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 1rem; padding-top: 20px; }
.dictionary-item { background-color: rgba(0,0,0,0.2); padding: 1rem; border-radius: 10px; font-size: 1.2rem; }
.dictionary-item .special-char { font-size: 2rem; color: var(--rosa-neon); }
.translator-box { display: flex; gap: 1rem; width: 100%; max-width: 800px; margin-top: 1rem; }
.translator-column { flex: 1; display: flex; flex-direction: column; }
.translator-section label { margin-bottom: 0.5rem; font-size: 1rem; text-align: left; color: var(--rosa-neon); }
.translator-section textarea { width: 100%; height: 120px; padding: 10px; border-radius: 10px; border: 1px solid var(--rosa-neon); background-color: rgba(0,0,0,0.2); color: var(--blanco-estelar); font-size: 1rem; resize: none; }
.author-credit { margin-top: 3rem; font-size: 1rem; opacity: 0.7; }
.device-button { background: transparent; border: 2px solid var(--rosa-neon); color: var(--rosa-neon); padding: 1rem 2rem; margin: 0.5rem; font-size: 1.2rem; font-family: 'Poppins', sans-serif; border-radius: 50px; transition: all 0.3s ease; text-shadow: 0 0 5px var(--rosa-neon); }
.device-button:hover { background: var(--rosa-neon); color: var(--violeta-profundo); box-shadow: var(--texto-sombra-rosa); transform: scale(1.05); }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 767px) {
    .start-content h1 { font-size: 1.8rem; }
    #main-content-container { padding: 1rem; }
    #memory-grid { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
    .card-face { font-size: 2rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .translator-box { flex-direction: column; }
}
