:root {
    --primary-color: #f72585; /* Rosa/Magenta */
    --secondary-color: #00f5d4; /* Cian/Turquesa */
    --text-color: #f0f0f0;
    --bg-color: #0a0a0a;
    --container-bg: #1a1a1a;
    --border-color: #333;
    --font-family: 'Poppins', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

main {
    width: 100%;
    max-width: 500px;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: var(--container-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

h1, h2, h3 {
    margin-top: 0;
}

.subtitle {
    opacity: 0.8;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    opacity: 0.9;
}

textarea, input[type="datetime-local"], input[type="text"], input[type="number"], input[type="checkbox"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #2a2a2a;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    box-sizing: border-box;
}

/* EFECTO NEÓN EN FOCO */
textarea:focus, input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.4);
}

.cta-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

/* HOVER DINÁMICO DEL BOTÓN */
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

.cta-button.secondary {
    background: #333;
    margin-top: 15px;
}

.share-link-wrapper {
    display: flex;
    margin: 20px 0;
}

#generated-link {
    flex-grow: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#copy-button {
    padding: 0 20px;
    border: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.whatsapp-button {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    font-weight: 600;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
    font-size: 0.95rem;
}
.whatsapp-button:hover{
    background-color: #1DAE55;
}

#countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.time-block {
    display: flex;
    flex-direction: column;
    background-color: #2a2a2a;
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 60px;
}

.time-block span {
    font-size: 2rem;
    font-weight: 600;
}

.unlock-date-info {
    font-size: 0.9rem;
    opacity: 0.7;
}

#sender-display {
    font-weight: 600;
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
    color: var(--text-color);
}

.revealed-message {
    background-color: #111;
    border: 1px dashed var(--border-color);
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.revealed-message p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    position: relative; 
}

.typewriter-cursor {
    display: inline-block;
    background-color: var(--text-color);
    width: 10px;
    height: 1.2rem;
    animation: blink 0.7s infinite;
    margin-left: 4px;
    vertical-align: middle;
}

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

.main-logo {
    width: 180px;
    height: auto;
    margin-bottom: 10px;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 20px;
}

.calendar-button {
    width: auto;
    padding: 10px 20px;
    margin-top: 20px;
    font-size: 0.9rem;
    background: #444;
}
.calendar-button:hover {
    background: #555;
}

.puzzle-section {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    min-height: 1.2em;
    margin-top: 10px;
}

.privacy-policy-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 25px;
}

.privacy-policy-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--secondary-color);
    width: 1.2em;
    height: 1.2em;
}

.privacy-policy-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: 400;
}

.privacy-policy-group a {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: 600;
}

/* TÍTULOS CON COLOR DE ACENTO PRIMARIO */
.puzzle-section .section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
}
.section-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 30px 0;
}
.helper-text {
    font-size: 0.8rem;
    opacity: 0.7;
    display: block;
    margin-top: 8px;
}

/* --- CAMBIO AÑADIDO --- */
/* Estilo para el enlace de Google Maps */
.helper-text a {
    color: var(--primary-color); /* Mismo color que el título */
    font-weight: 600;
    text-decoration: none;
}
.helper-text a:hover {
    text-decoration: underline;
}
/* --- FIN DEL CAMBIO --- */

footer {
    width: 100%;
    max-width: 500px;
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
}

footer a {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* --- ESTILOS MODO JUEGO --- */
.game-mode-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    gap: 15px;
}
.game-mode-switch label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--secondary-color);
}
input:checked + .slider:before {
    transform: translateX(26px);
}

/* TÍTULOS CON COLOR DE ACENTO PRIMARIO */
.game-creator-box h2 {
    color: var(--primary-color);
}
.key-creation-box {
    border: 1px dashed var(--border-color);
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
}
.key-creation-box .key-label {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

#treasure-chest-state .key-slot {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
#treasure-chest-state .key-input {
    flex-grow: 1;
    text-transform: uppercase;
}
#treasure-chest-state .key-status {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}
#treasure-chest-state .key-input.correct + .key-status {
    background-color: #25D366;
    color: white;
}
.game-clues {
    text-align: left;
    background-color: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}
/* TÍTULOS CON COLOR DE ACENTO PRIMARIO */
.game-clues h3 {
    margin-top: 0;
    color: var(--primary-color);
}
.game-clues ul {
    list-style-type: none;
    padding-left: 0;
}
.game-clues li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}
.game-clues li::before {
    content: '🗝️';
    position: absolute;
    left: 0;
    top: 0;
}
.how-to-play-link {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-decoration: underline;
}