/* Variables CSS para colores fáciles de cambiar */
:root {
    --color-cielo: #89CFF0; /* Azul claro */
    --color-sol: #FFD700; /* Dorado */
    --color-mar: #0077BE; /* Azul intenso */
    --color-arena: #FAD6A5; /* Color arena */
    --color-sombra-arena: #E0B887;
    --color-texto: #333;
    --color-nube: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow: hidden; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--color-cielo); 
}

/* Contenedor principal de la escena */
.escena-playa {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ------------------- C I E L O y S O L ------------------- */
.cielo {
    position: absolute;
    width: 100%;
    height: 60%; 
    background: linear-gradient(to bottom, #72a9e3, var(--color-cielo));
}

.sol {
    position: absolute;
    top: 5%;
    right: 15%;
    width: 100px;
    height: 100px;
    background-color: var(--color-sol);
    border-radius: 50%;
    box-shadow: 0 0 50px 10px rgba(255, 215, 0, 0.8);
    animation: brillo 4s infinite alternate;
}

@keyframes brillo {
    from { transform: scale(1); opacity: 0.9; }
    to { transform: scale(1.05); opacity: 1; }
}

/* ------------------- N U B E S ☁️ ------------------- */
.nube {
    position: absolute;
    top: 10%;
    background: var(--color-nube);
    border-radius: 50%;
    box-shadow: 
        40px 0 0 10px var(--color-nube),
        -30px 10px 0 10px var(--color-nube),
        -10px -20px 0 15px var(--color-nube);
    width: 80px;
    height: 30px;
    opacity: 0.8;
    animation: moverse 40s linear infinite;
}

.nube-1 {
    left: -20%;
    top: 15%;
    transform: scale(1.5);
    animation-delay: 0s;
}

.nube-2 {
    left: 80%;
    top: 5%;
    transform: scale(0.8);
    animation: moverse 55s linear infinite reverse; 
}

@keyframes moverse {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-120vw - 200px)); } 
}

/* ------------------- A V I Ó N (NUEVO) ✈️ ------------------- */
.avion {
    position: absolute;
    top: 5%; 
    left: -10%;
    font-size: 3em; 
    color: #555;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 5;
    animation: volar-avion 40s linear infinite;
}

@keyframes volar-avion {
    0% { left: -10%; top: 5%; transform: rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    50% { left: 50%; top: 15%; }
    90% { opacity: 1; }
    100% { left: 110%; top: 5%; transform: rotate(5deg); opacity: 0; }
}


/* ------------------- M A R ------------------- */
.mar {
    position: absolute;
    top: 40%;
    width: 100%;
    height: 40%;
    background-color: var(--color-mar);
    overflow: hidden;
}

/* Barco 1 - Velero (Tamaño Aumentado) */
.barco-1 {
    position: absolute;
    top: 25%;
    font-size: 4em; /* Aumentado */
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    animation: navegar 25s linear infinite, flotar 4s infinite alternate;
    left: -100px; 
    transform: rotate(3deg);
}

/* Barco 2 (Lancha - Tamaño Aumentado) 🚤 */
.barco-2 {
    position: absolute;
    top: 50%;
    font-size: 3em; /* Aumentado */
    color: #ffd700; 
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    animation: navegar-rapido 15s linear infinite, flotar 3s infinite alternate;
    left: 110%;
    transform: scaleX(-1) rotate(-1deg); 
}

@keyframes navegar {
    0% { left: -100px; }
    100% { left: 110%; }
}

@keyframes navegar-rapido {
    0% { left: 110%; }
    100% { left: -100px; }
}

@keyframes flotar {
    from { transform: translateY(0) rotate(3deg); }
    to { transform: translateY(-10px) rotate(4deg); }
}

/* Olas */
.ola {
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 45% 55% 50% 50% / 60% 40% 60% 40%;
    animation: oleaje 20s linear infinite;
    opacity: 0.7;
}

.ola-2 {
    top: 50%;
    opacity: 0.5;
    animation: oleaje 25s linear reverse infinite;
}

@keyframes oleaje {
    0% { transform: translateX(0) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(5deg); }
}

/* ------------------- A R E N A ------------------- */
.arena {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30%; 
    background: linear-gradient(to top, var(--color-arena), var(--color-sombra-arena) 80%);
    z-index: 10;
}

/* Cangrejo 1 */
.cangrejo-1 {
    position: absolute;
    bottom: 10px;
    left: 10%;
    font-size: 2.5em; 
    animation: correr 20s linear infinite, caminar 0.5s infinite alternate;
    transform: scaleX(-1); 
    cursor: default;
    user-select: none;
    z-index: 11;
}

/* Cangrejo 2 */
.cangrejo-2 {
    position: absolute;
    bottom: 5px;
    left: 70%;
    font-size: 1.5em;
    animation: correr-lento 30s linear infinite reverse, caminar 0.7s infinite alternate;
    cursor: default;
    user-select: none;
    z-index: 11;
}

@keyframes correr {
    0% { left: 0%; transform: scaleX(1); }
    49% { left: 95%; transform: scaleX(1); }
    50% { left: 95%; transform: scaleX(-1); }
    99% { left: 0%; transform: scaleX(-1); }
    100% { left: 0%; transform: scaleX(1); }
}

@keyframes correr-lento {
    0% { left: 0%; transform: scaleX(1); }
    49% { left: 95%; transform: scaleX(1); }
    50% { left: 95%; transform: scaleX(-1); }
    99% { left: 0%; transform: scaleX(-1); }
    100% { left: 0%; transform: scaleX(1); }
}

@keyframes caminar {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); } 
}


/* ------------------- C O N T E N I D O C E N T R A L ------------------- */
/* (Sin cambios en esta sección) */
.contenido-central {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--color-texto);
    z-index: 20; 
    padding: 20px;
    background: rgba(255, 255, 255, 0.9); 
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.circulo-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%; /* Esto ya lo tienes, define la forma del contenedor */
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    animation: pulso-logo 2s infinite alternate;
    overflow: hidden; /* **NUEVO: Para recortar cualquier parte de la imagen que sobresalga** */
}

.logo {
    width: 80%; /* **MODIFICADO: La imagen ocupa el 100% del ancho del contenedor** */
    height: 80%; /* **MODIFICADO: La imagen ocupa el 100% del alto del contenedor** */
    object-fit: cover; /* **NUEVO: Para que la imagen cubra el área sin distorsionarse, recortando si es necesario** */
    border-radius: 30%; /* **NUEVO: Esto hace que la imagen misma sea circular** */
    display: block;
}
@keyframes pulso-logo {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.contenido-central h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.contenido-central p {
    font-size: 1.1em;
    max-width: 400px;
    margin: 0 auto;
}

/* ------------------- P I E   D E   P Á G I N A ------------------- */

.pie-pagina {
    position: fixed; 
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.6); 
    color: #fff;
    font-size: 0.9em;
    z-index: 30; 
}

.pie-pagina a {
    color: #ffd700; 
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.pie-pagina a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ------------------- R E S P O N S I V E ------------------- */

@media (max-width: 768px) {
    /* Ajustes para tabletas y móviles */
    .cielo { height: 50%; }
    .mar { top: 45%; height: 35%; }
    .arena { height: 20%; }
    
    .sol { width: 70px; height: 70px; }

    /* Barcos ajustados */
    .barco-1 { font-size: 3em; }
    .barco-2 { font-size: 2.5em; }
    .avion { font-size: 2.5em; }
    
    .cangrejo-1, .cangrejo-2 { font-size: 1.8em; }

    .circulo-logo { width: 100px; height: 100px; }
    .contenido-central h1 { font-size: 2em; }
    .contenido-central p { font-size: 1em; }
    .pie-pagina { font-size: 0.8em; padding: 6px; }
}

@media (max-width: 480px) {
    /* Ajustes específicos para móviles pequeños */
    .contenido-central { width: 90%; padding: 15px; }
    
    .circulo-logo { width: 80px; height: 80px; margin-bottom: 10px; }
    
    .contenido-central h1 { font-size: 1.5em; }
    .contenido-central p { font-size: 0.9em; }

    /* Barcos y avión ajustados */
    .barco-1 { font-size: 2.5em; }
    .barco-2 { font-size: 2em; }
    .avion { font-size: 2em; }

    .cangrejo-1, .cangrejo-2 { bottom: 5px; font-size: 1.5em; }
    
    .pie-pagina { font-size: 0.7em; padding: 5px; }
}