/* Reset y fuentes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    color: white;
    font-size: 1.8em;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 img {
    width: 48px;
    height: 48px;
    vertical-align: middle;
}

.tagline {
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: white;
    color: #19547b;
    transform: scale(1.1);
    border-color: #ffd89b;
}

/* Hero Section con Slider */
.hero {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 600px;
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    border-radius: 20px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
    pointer-events: none;
}

.slider-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    pointer-events: all;
    color: #56ab2f;
    font-weight: bold;
}

.slider-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid white;
}

.slider-dot.active {
    background: white;
    transform: scale(1.3);
}

.slider-dot:hover {
    background: rgba(255,255,255,0.8);
}

/* Elementos flotantes */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.float-icon {
    position: absolute;
    font-size: 3em;
    animation: float 3s ease-in-out infinite;
    opacity: 0.7;
}

.float-icon:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.float-icon:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.float-icon:nth-child(3) {
    top: 40%;
    left: 80%;
    animation-delay: 2s;
}

.float-icon:nth-child(4) {
    top: 80%;
    left: 20%;
    animation-delay: 1.5s;
}

/* Canción Destacada */
.featured-song {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 60px 20px;
    text-align: center;
}

.song-badge {
    display: inline-block;
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

.featured-song h2 {
    font-size: 2.5em;
    color: #2d8659;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.video-featured {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.video-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 20px;
    border-radius: 15px;
    text-align: center;
}

.video-placeholder code {
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 15px;
    font-size: 0.9em;
}

/* Sección de Videos */
.videos-section {
    background: white;
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.video-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-family: inherit;
}

.tab-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.1);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.video-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.video-thumbnail {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    position: relative;
    overflow: hidden;
}

.video-thumbnail iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-thumbnail.loading {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.video-info p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.video-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.video-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Galería */
.gallery-section {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 60px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.gallery-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.img-placeholder {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5em;
}

.gallery-item p {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

/* Sección de Juegos */
.games-section {
    background: white;
    padding: 60px 20px;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, #fff5f7 0%, #e3f2fd 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h3 {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 20px;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.game-stats span {
    background: white;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 1.1em;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.reset-btn {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.reset-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Juego de Memoria */
.memory-game {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.memory-card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
    transform-style: preserve-3d;
}

.memory-card:hover {
    transform: scale(1.05);
}

.memory-card.flipped {
    background: white;
    transform: rotateY(180deg);
}

.memory-card.matched {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    animation: matchPulse 0.5s;
    pointer-events: none;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    border-radius: 15px;
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2em;
}

.card-back {
    background: white;
    transform: rotateY(180deg);
}

/* Mensaje de victoria */
.win-message {
    display: none;
    text-align: center;
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    border-radius: 20px;
    color: white;
}

.win-message.show {
    display: block;
    animation: slideDown 0.5s;
}

.win-message h3 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.win-message p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

.play-again-btn {
    background: white;
    color: #56ab2f;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.play-again-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #19547b 0%, #ffd89b 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer-character {
    font-size: 5em;
    margin-bottom: 10px;
}

.footer-character img {
    width: 80px;
    height: 80px;
}

.footer h3 {
    font-size: 2em;
    margin-bottom: 10px;
}

.footer p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.social-btn {
    background: white;
    color: #19547b;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-block;
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.copyright {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 20px;
}

/* Modal de Imágenes */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-image-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    display: block;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10000;
}

.modal-close:hover {
    color: #a8e063;
    transform: scale(1.2);
}

.modal-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    color: white;
    padding: 30px 20px 20px 20px;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    animation: slideUp 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

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

/* Animaciones */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes matchPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

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

/* Responsive */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.4em;
    }
    
    .logo h1 img {
        width: 40px;
        height: 40px;
    }
    
    .hero {
        height: 400px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .slider-dots {
        bottom: 15px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
    
    .memory-game {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .memory-card {
        font-size: 2em;
    }
    
    .section-title {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 300px;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .memory-game {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .memory-card {
        font-size: 1.5em;
    }
    
    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
    
    .modal-image-container {
        max-width: 95%;
        max-height: 85%;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 80vh;
    }
    
    .modal-caption {
        font-size: 1.1em;
        padding: 20px 15px 15px 15px;
    }
}
