:root {
    --luffy-red: #D32F2F;
    --ocean-blue: #0277BD;
    --gold: #FFD700;
    --wood: #4E342E;
    --paper: #f4e4bc; /* Color pergamino/mapa */
    --text-dark: #212121;
    
    --font-pirate: 'Rye', serif;
    --font-body: 'Roboto', sans-serif;
    
    --shadow-paper: 0 10px 20px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--wood);
}

/* === LOADER === */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--ocean-blue);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999; color: white; transition: opacity 0.5s;
}
.devil-fruit { font-size: 4rem; animation: spin 2s infinite linear; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* === MÚSICA === */
.music-control-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; }
.music-control {
    width: 50px; height: 50px; background: var(--luffy-red); color: white;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); cursor: pointer; border: 2px solid var(--gold);
}
.music-control.playing { animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); } }

/* === HERO SECTION === */
.hero {
    height: 100vh;
    /* Fondo de mar o mapa del tesoro */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1621478374422-35206faeddfb?q=80'); 
    background-size: cover; background-position: center; background-attachment: fixed;
    display: flex; justify-content: center; align-items: center; text-align: center; color: white;
    position: relative;
}
.hero-content { background: rgba(0,0,0,0.5); padding: 2rem; border-radius: 10px; border: 2px solid var(--gold); backdrop-filter: blur(3px); }
.jolly-roger { width: 80px; filter: drop-shadow(0 0 5px white); margin-bottom: 10px; }
.pirate-font { font-family: var(--font-pirate); }
.main-title { font-family: var(--font-pirate); font-size: 3rem; color: var(--gold); text-shadow: 3px 3px 0 #000; line-height: 1.2; }
.pre-title, .sub-title { letter-spacing: 2px; text-transform: uppercase; font-weight: bold; }
.separator-bone { font-size: 2rem; margin: 10px 0; }

.scroll-down-btn {
    margin-top: 20px; padding: 12px 30px; background: var(--luffy-red); color: white;
    border: none; border-radius: 5px; font-family: var(--font-pirate); font-size: 1.1rem;
    cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: transform 0.2s;
}
.scroll-down-btn:hover { transform: scale(1.05); background: #b71c1c; }

/* === SECCIONES TEMÁTICAS === */
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; text-align: center; }
section { padding: 4rem 0; }
h2 { font-family: var(--font-pirate); font-size: 2.5rem; margin-bottom: 2rem; color: var(--wood); }

.section-map {
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415-.828-.828-.828.828-1.415-1.415.828-.828-.828-.828 1.415-1.415.828.828.828-.828 1.415 1.415-.828.828zM22.485 0l.83.828-1.415 1.415-.828-.828-.828.828-1.415-1.415.828-.828-.828-.828 1.415-1.415.828.828.828-.828 1.415 1.415-.828.828zM0 22.485l.828.83 1.415-1.415-.828-.828.828-.828L.828 18.828 0 19.657l-.828-.828L-2.243 20.243l.828.828-.828.828L-.828 23.314 0 22.485zM0 54.627l.828.83 1.415-1.415-.828-.828.828-.828L.828 50.97 0 51.799l-.828-.828L-2.243 52.385l.828.828-.828.828L-.828 55.456 0 54.627z' fill='%23d7ccc8' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.section-wood { background: var(--wood); color: white; border-top: 5px solid var(--gold); border-bottom: 5px solid var(--gold); }
.gold-text { color: var(--gold); text-shadow: 2px 2px 0 #000; }
.section-blue { background: var(--ocean-blue); color: white; }
.section-blue h2 { color: white; }

/* === CARTEL WANTED (CÓDIGO MEJORADO Y CENTRADO) === */
.gallery-section {
    text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%;
}
.photo-frame {
    background-color: #f4e4bc;
    /* Textura de papel viejo */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23d4b483' stroke-width='1' opacity='0.3'%3E%3Cpath d='M0 0l100 100M100 0L0 100'/%3E%3C/g%3E%3C/svg%3E");
    padding: 20px 20px 60px 20px;
    display: inline-block; position: relative; margin: 20px auto;
    border-radius: 2px;
    box-shadow: inset 0 0 30px rgba(93, 64, 55, 0.6), 0 15px 30px rgba(0,0,0,0.5); /* Efecto quemado */
}
.bounty-header {
    font-family: var(--font-pirate); font-size: 2.5rem; color: #3e2723;
    margin-bottom: 10px; line-height: 0.8; letter-spacing: -1px;
}
.photo-frame img {
    width: 100%; max-width: 280px; height: auto; display: block;
    filter: sepia(0.3) contrast(1.1); border: 4px solid #3e2723;
}
.name-label { font-family: var(--font-pirate); font-size: 2rem; color: #3e2723; margin-top: 10px; text-transform: uppercase; line-height: 1; }
.bounty-value { font-family: var(--font-pirate); font-size: 1.2rem; color: #3e2723; margin-top: 5px; border-top: 2px solid #3e2723; border-bottom: 2px solid #3e2723; display: inline-block; padding: 2px 10px; }
.wanted-label {
    position: absolute; bottom: 15px; left: 0; width: 100%; text-align: center;
    font-weight: bold; font-family: 'Roboto', sans-serif; color: #5d4037; font-size: 0.9rem;
}

/* === CUENTA REGRESIVA === */
.countdown-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.time-box { background: rgba(0,0,0,0.5); padding: 15px; border-radius: 8px; min-width: 80px; border: 1px solid var(--gold); }
.time-box span { display: block; font-size: 2rem; font-weight: bold; font-family: var(--font-pirate); color: var(--gold); }
.time-box small { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

/* === DETALLES GRID === */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
.paper-card {
    background: white; padding: 2rem; border-radius: 5px; border: 1px solid #d7ccc8;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.1); position: relative;
}
.paper-card::before { /* Chincheta roja */
    content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    width: 15px; height: 15px; background: var(--luffy-red); border-radius: 50%; box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.icon-circle { font-size: 2rem; color: var(--ocean-blue); margin-bottom: 10px; }
.highlight { font-weight: bold; font-size: 1.2rem; color: var(--luffy-red); }
.btn-map {
    display: inline-block; margin-top: 10px; padding: 8px 20px; border: 2px solid var(--wood);
    color: var(--wood); text-decoration: none; border-radius: 20px; font-weight: bold; transition: 0.3s;
}
.btn-map:hover { background: var(--wood); color: white; }

/* === INFO & FOOTER === */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.info-card { background: rgba(255,255,255,0.1); padding: 20px; border: 1px solid white; border-radius: 10px; }
.icon-card { font-size: 2rem; margin-bottom: 10px; color: var(--gold); }

.rsvp-section { background: #0099ff; position: relative; color: white; padding-bottom: 3rem; }
.waves-top { position: absolute; top: -100px; left: 0; width: 100%; overflow: hidden; line-height: 0; }
.waves-top svg { position: relative; display: block; width: calc(150% + 1.3px); height: 100px; transform: rotateY(180deg); }
.rsvp-content { position: relative; z-index: 2; margin-top: 2rem; }
.rsvp-section h2 { color: white; text-shadow: 2px 2px 0 #0056b3; }

.btn-whatsapp {
    display: inline-block; background-color: #25D366; color: white; padding: 15px 35px;
    border-radius: 50px; text-decoration: none; font-weight: bold; font-size: 1.2rem;
    margin-top: 20px; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); border: 2px solid white;
    transition: transform 0.3s;
}
.btn-whatsapp:hover { transform: translateY(-3px) scale(1.05); }
.copyright { margin-top: 40px; font-family: var(--font-pirate); opacity: 0.7; }

@media (min-width: 768px) {
    .main-title { font-size: 5rem; }
    .detail-grid, .grid-2 { grid-template-columns: 1fr 1fr; }
}