/* --- Base y Contenedores --- */
body {
    background-color: #f4e1d2; /* Color crema/pergamino */
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* --- Pantalla del Sobre --- */
#envelope-screen {
    text-align: center;
    cursor: pointer;
}

.envelope {
    position: relative;
    width: 280px;
    height: 180px;
    background: #e0c9a6;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* Solapa del sobre */
.envelope::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    border-left: 140px solid transparent;
    border-right: 140px solid transparent;
    border-top: 100px solid #d4b991; /* Color solapa */
    transition: transform 0.6s ease;
    transform-origin: top;
    z-index: 2;
}

/* Lacre (Sello de cera) */
.envelope::after {
    content: "📜";
    position: absolute;
    top: 80px;
    left: calc(50% - 25px);
    width: 50px;
    height: 50px;
    background: #8B0000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 3;
    transition: opacity 0.4s;
}

/* Animación al abrir */
.opened .envelope::before {
    transform: rotateX(180deg);
}

.opened .envelope::after {
    opacity: 0;
}

.instruction {
    font-family: 'MedievalSharp', cursive;
    color: #8B0000;
    font-size: 1.2em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* --- Estilos de la Card --- */
.card {
    background: white;
    max-width: 400px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-top: 8px solid #8B0000;
    text-align: center;
    /* Animación de entrada de la card */
    animation: slideUp 0.6s ease-out forwards;
}

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

h1 {
    font-family: 'MedievalSharp', cursive;
    color: #8B0000;
    margin-bottom: 5px;
}

h3 {
    color: #555;
    font-weight: 300;
    margin-top: 0;
}

.label {
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.8em;
    color: #999;
}

hr {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

.content {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    text-align: left;
    font-style: italic;
}

/* Estilo para las imágenes de la ginkana */
.photo-container {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.img-prueba {
    width: 100%;
    height: auto;
    display: block;
}

footer {
    margin-top: 25px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
}

.photo-hint {
    font-size: 0.9em;
    color: #666;
}

.photo-hint span {
    font-weight: bold;
    color: #d35400;
}

.locked {
    filter: grayscale(1);
    opacity: 0.8;
}

.timer {
    font-weight: bold;
    color: #8B0000;
}