/* ---  --- */

:root {
    /* 🎨 1. COLOR MAESTRO: Botón de música, iconos y bordes 🎨 */
    --color-maestro: #c1ac77; 
    
    /* 🔵 2. COLOR DE ACENTO: Para el botón flotante "Subir Foto" */
    --accent-color: #007bff; 
    
    /* ✍️ 3. COLOR DE TEXTO: Para letras y etiqueta de música (Rosa) */
    --text-color: #c1ac77;

    --bg-color: #ffffff;      /* Fondo de la página ultra limpio */
    --card-bg: #ffffff;
    
    /* SOMBRAS REDUCIDAS Y LIMPIAS */
    --shadow-soft: 0 5px 20px rgba(0, 0, 0, 0.03); 
    --shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* 1. RESETEO Y BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@font-face {
    font-family: "Against Regular"; 
    src: url('fonts/against-regular.woff2') format('woff2'),
         url('fonts/against-regular.woff') format('woff'); 
    font-weight: 400; font-style: normal; font-display: swap;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4;
    overflow-x: hidden;
}

.container {
    width: 92%;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #ffffff;
}

/* 2. HERO SECTION */
.main-header {
    position: relative;
    height: 75vh; 
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('boda.jpg');
    background-size: cover;
    background-position: center 20%; 
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    bottom: -2px; left: 0; width: 100%;
    height: 70%; 
    background: linear-gradient(to top, 
        var(--bg-color) 15%,         
        rgba(253,253,253,0.8) 40%,  
        rgba(253,253,253,0) 100%    
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-bottom: 40px; 
    text-align: center;
}

.badge-premium {
    background: rgba(138, 79, 255, 0.08);
    color: #000000;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-content h3 {
    font-family: "Against Regular", sans-serif;
    font-size: 1.4em;
    margin-top: 15px;
    color: #444;
}

.hero-content h1 {
    font-family: "Against Regular", sans-serif;
    font-size: 2.2em; 
    color: var(--color-maestro); 
    margin: 4px 0;
}

.event-date {
    color: #999;
    font-size: 0.9em;
    font-weight: 500;
}

/* 3. STATS BAR */
.stats-bar {
    display: flex;
    justify-content: space-around;
    max-width: 400px;
    margin: -35px auto 30px !important;
    padding: 18px !important;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-deep) !important;
    border: 1px solid #f0f0f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #aaa;
}

.icon { width: 22px; height: 22px; fill: var(--color-maestro); }
.stat-item span { font-size: 0.8em; font-weight: 700; color: #555; }

/* 4. BARRA DE DESCARGA QR */
.qr-download-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 10px 0 30px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    text-decoration: none;
    color: #888;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qr-download-bar:hover {
    background: #ffffff;
    border-color: var(--color-maestro);
    color: var(--color-maestro);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.icon-qr {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* 5. TABS NAV */
.tabs-nav {
    display: flex;
    padding: 6px !important;
    background: #f0f0f0 !important;
    border-radius: 40px !important;
    margin-bottom: 25px;
}

.tab-button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 700;
    color: #888;
    transition: 0.3s;
}

.tab-button.active {
    background: #ffffff;
    color: var(--color-maestro); 
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

/* 6. MODAL EMERGENTE */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1) !important;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 30px; color: #ddd; cursor: pointer;
}

/* 7. FORMULARIOS Y SELECTOR DE COLORES */
input[type="text"], textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #f0f0f0;
    border-radius: 15px;
    background: #fcfcfc;
    margin-bottom: 15px;
    font-size: 1em;
    outline: none;
    color: #000000; 
}

input[type="text"]:focus, textarea:focus {
    border-color: var(--color-maestro);
}

.color-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 15px 0 25px;
    width: 100%;
}

.color-option { cursor: pointer; position: relative; display: flex; justify-content: center; align-items: center; }
.color-option input[type="radio"] { display: none; }

.color-box {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 1px #eee;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.color-box.lightpink { background-color: #ffdae0; }
.color-box.lightgreen { background-color: #e2fbd7; }
.color-box.lightblue { background-color: #d7eefb; }
.color-box.black { background-color: #333333; }

.color-option input[type="radio"]:checked + .color-box {
    transform: scale(1.3);
    box-shadow: 0 0 0 2px var(--color-maestro); 
}

/* 8. UPLOAD AREA */
.upload-area {
    border: 2px dashed #eee;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.icon-circle {
    width: 55px; height: 55px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    border: 1px solid #f0f0f0;
}

#image-preview-container { display: flex; justify-content: center; margin: 10px 0 20px; }
#image-preview {
    width: 180px; height: 180px;
    border-radius: 15px;
    overflow: hidden;
    display: none;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}
/* MODIFICACIÓN: image-orientation para el preview */
#image-preview img { width: 100%; height: 100%; object-fit: cover; image-orientation: from-image; }

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--color-maestro); 
    color: #fff;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.btn-primary:hover { filter: brightness(1.2); transform: translateY(-2px); }

/* 9. BOTÓN FLOTANTE (FAB) */
.floating-action-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color); /* AQUÍ ESTÁ TU COLOR AZUL #007bff */
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center; gap: 10px;
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
    z-index: 1000;
    cursor: pointer;
    transition: 0.3s;
}
.floating-action-btn:hover { transform: translateX(-50%) translateY(-3px); }

/* 10. GALERÍA RESPONSIVA */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr); 
    }
}

.gallery-image-item {
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: #f6f6f6;
    border: 1px solid #f0f0f0;
    cursor: pointer;
}

/* MODIFICACIÓN: image-orientation para la galería */
.gallery-image-item img { width: 100%; height: 100%; object-fit: cover; image-orientation: from-image; }

/* 11. ESTILO POST-IT */
.note-item, .note-preview {
    padding: 25px !important;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.03) !important;
    transition: transform 0.3s ease;
    position: relative;
    border-radius: 4px;
}
.note-item.lightpink, .note-preview.lightpink { background-color: #ffdae0 !important; border: none; }
.note-item.lightgreen, .note-preview.lightgreen { background-color: #e2fbd7 !important; border: none; }
.note-item.lightblue, .note-preview.lightblue { background-color: #d7eefb !important; border: none; }
.note-item.black, .note-preview.black { background-color: #333333 !important; color: white !important; border: none; }

.note-item .note-name, .note-preview .note-name { 
    font-weight: 800; 
    font-size: 0.8em; 
    text-transform: uppercase; 
    margin-bottom: 10px; 
    opacity: 0.8;
    color: #000000 !important; 
}

.note-item .note-text, .note-preview .note-text { 
    font-family: "Ink Free", cursive; 
    font-size: 1.4em; 
    line-height: 1.2;
    color: #000000 !important; 
}

.note-item.black .note-text, .note-preview.black .note-text,
.note-item.black .note-name, .note-preview.black .note-name {
    color: #ffffff !important;
}

.note-grid .note-item:nth-child(even) { transform: rotate(1.5deg); }
.note-grid .note-item:nth-child(odd) { transform: rotate(-1deg); }
.note-grid .note-item:hover { transform: rotate(0deg) scale(1.03); z-index: 5; }

#note-preview-section { display: flex; justify-content: center; margin: 20px 0; }

/* 12. BOTÓN DE DESCARGA ALBUM */
.download-section { display: flex; justify-content: center; align-items: center; margin: 50px 0 20px; width: 100%; }
#downloadButton.btn-secondary {
    background-color: transparent; color: #777; border: 1px solid #eee;
    padding: 12px 30px; border-radius: 50px; font-size: 0.85em; font-weight: 700;
}
#downloadButton.btn-secondary:hover { 
    border-color: var(--color-maestro); 
    color: var(--color-maestro); 
    transform: translateY(-1px); 
}

/* 13. FOOTER */
.main-footer { 
    text-align: center; 
    padding: 40px 0 120px; 
    color: #bbb; 
    font-size: 0.8em; 
}
.main-footer a { color: #bbb; text-decoration: none; font-weight: 600; transition: 0.3s; }
.main-footer a:hover { color: var(--color-maestro); }

.social-icons { 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    margin-bottom: 15px; 
}

.social-icons img { 
    width: 22px; 
    filter: grayscale(1); 
    opacity: 0.4; 
    transition: 0.3s; 
}

.social-icons a:hover img { 
    opacity: 0.8; 
    filter: grayscale(0); 
}

/* 14. MÚSICA */
.music-control-container { 
    position: fixed; 
    bottom: 30px; 
    right: 20px; 
    z-index: 1000; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Etiqueta Música Minimalista (Micro) */
.music-label {
    font-size: 0.55em; 
    text-transform: uppercase;
    letter-spacing: 1.5px; 
    font-weight: 900;
    color: var(--text-color) !important; /* INTEGRADO AL COLOR DE TEXTO MANUAL */
    background: transparent; 
    margin-bottom: 4px;
    pointer-events: none;
    opacity: 0.8;
    animation: fadeIn 0.8s ease;
}

.floating-music-button { 
    width: 44px; height: 44px; 
    border-radius: 50%; border: none;
    background: var(--color-maestro); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    cursor: pointer; 
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
.floating-music-button:hover { transform: scale(1.1); }
#music-icon { width: 22px; height: 22px; fill: #ffffff; } 

/* 15. LIGHTBOX */
#lightbox { 
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    z-index: 4000; 
    justify-content: center; align-items: center; 
}

.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 90%;
}

/* MODIFICACIÓN: image-orientation para el lightbox */
#lightbox-image { 
    max-width: 100%; 
    max-height: 75vh; 
    border-radius: 12px; 
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    transition: opacity 0.4s ease;
    image-orientation: from-image;
}

#lightbox-uploader-display {
    color: #555;
    font-weight: 700;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 25px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    text-transform: capitalize;
}

.close-lightbox {
    position: absolute;
    top: 25px; right: 25px;
    font-size: 35px; color: #333; cursor: pointer;
    font-family: Arial, sans-serif;
    z-index: 4020;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #333; 
    font-size: 60px; 
    cursor: pointer;
    padding: 20px;
    z-index: 4010;
    opacity: 0.5;
    transition: 0.3s;
    font-weight: 100; 
}
.lightbox-nav:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

img { -webkit-touch-callout: none; user-select: none; }

/* ANIMACIONES */
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 480px) {
    .stats-bar { width: 85% !important; }
    .lightbox-nav { font-size: 40px; }
    .qr-download-bar { font-size: 0.85em; padding: 15px; }
    #lightbox-image { max-height: 65vh; }
}