html {
    scroll-behavior: smooth;
}

:root {
    /* Light Mode Variables */
    --bg-gradient: linear-gradient(135deg, #FFE5D9 0%, #E6E6FA 100%); /* Soft peach to ethereal lavender */
    --text-primary: #1A1A1A;
    --bg-text-brand: rgba(26, 26, 26, 0.05); /* Translucent light gray */
    --particle-color: rgba(255, 255, 255, 0.6);
    --mesh-color: rgba(26, 26, 26, 0.05);
    --accent-color: #D4AF37;
    --card-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --bg-gradient: linear-gradient(135deg, #0A1128 0%, #121212 100%); /* Midnight blue to charcoal */
    --text-primary: #F5F5DC; /* Bone white / soft gold */
    --bg-text-brand: rgba(245, 245, 220, 0.03);
    --particle-color: rgba(212, 175, 55, 0.6); /* Translucent gold */
    --mesh-color: rgba(255, 255, 255, 0.03);
    --accent-color: #D4AF37;
    --card-bg: rgba(30, 30, 30, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    transition: background 0.8s ease, color 0.5s ease;
}

/* Velvet Background Texture */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('../assets/velvet_light.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: overlay;
    transition: background-image 0.8s ease;
}

[data-theme="dark"] body::before {
    background-image: url('../assets/velvet_dark.png');
    opacity: 0.7;
    mix-blend-mode: normal;
}

/* Background Depth Text */
.bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playfair Display', serif;
    font-size: 12vw;
    font-weight: 900;
    color: var(--bg-text-brand);
    filter: blur(4px);
    z-index: 1;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    transition: color 0.8s ease;
}

/* Header */
header {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 1rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 180px; /* Logo made significantly larger */
    width: auto;
    object-fit: contain;
    border-radius: 4px; /* Optional for a smoother look */
}

nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

nav a:hover::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 0;
    z-index: 1000;
    margin-top: 0; /* Removed gap */
    padding-top: 10px;
    animation: fadeIn 0.3s ease;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px; /* Bridge is now only as wide as the menu item area */
    height: 20px;
    background: transparent;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dropdown-content a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-color);
    padding-left: 25px;
}

.dropdown-content a::after {
    display: none !important;
}

/* Submenu Styles */
.has-submenu {
    position: relative;
}

.submenu::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    width: 20px;
    height: 100%;
    background: transparent;
}

.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--card-bg);
    min-width: 180px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    margin-left: 0;
    padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.has-submenu:hover .submenu {
    display: block;
}

/* Arrow indicator - Correctly centered */
.has-submenu > a::after {
    content: '›';
    display: inline-block;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    transition: all 0.3s ease;
}

.has-submenu:hover > a::after {
    transform: translateY(-50%) translateX(3px);
}


.actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.actions button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.actions button:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

#theme-icon {
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.icon-rotate {
    transform: rotate(360deg) scale(0);
    opacity: 0;
}

/* 3D Canvas Container */
#canvas-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: auto; /* Allow interactions */
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

/* Footer */
footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
    pointer-events: none;
}

.motivational-text {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 10px;
    text-align: center;
}

.slogan {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 300;
    opacity: 0.8;
    text-align: center;
}

/* Video Hero Container */
.video-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    transition: transform 0.5s ease;
}

.video-mobile {
    display: none;
}

@media (max-width: 1024px) {
    .video-desktop {
        display: none;
    }
    .video-mobile {
        display: block;
    }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(255,255,255,0.4) 0%, 
        rgba(255,255,255,0) 20%, 
        rgba(255,255,255,0) 70%, 
        rgba(255,255,255,0.6) 90%, 
        rgba(255,255,255,1) 100%);
    z-index: 1;
}

[data-theme="dark"] .video-overlay {
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.6) 0%, 
        rgba(0,0,0,0) 20%, 
        rgba(0,0,0,0) 70%, 
        rgba(0,0,0,0.6) 90%, 
        var(--bg-gradient-end, #121212) 100%);
}

/* Elegant Section Divider */
.hero-screen::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
    z-index: 5;
    box-shadow: 0 0 15px var(--accent-color);
}

/* Slider Styles */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

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

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    padding: 15px;
    cursor: pointer;
    z-index: 5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 40px;
}

.slider-arrow.next {
    right: 40px;
}

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

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

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

/* Responsive adjustments */
@media (max-width: 1024px) {
    header {
        padding: 1.5rem 2rem;
    }
    nav {
        display: flex; /* Ensure it stays flex but will be handled by components.js for mobile */
    }
    .bg-text {
        font-size: 15vw;
    }
    .hero-video {
        max-height: none; /* Remove the 50vh restriction */
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    /* Hide 4th slide and dot on desktop */
    @media (min-width: 1025px) {
        .slide:nth-child(4), .dot:nth-child(4) {
            display: none !important;
        }
    }
}

/* Home Page Layout Adjustments */
body.home-page {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: block;
}

body.home-page::before {
    position: fixed;
}

.hero-screen {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* About Me Section */
.about-section {
    position: relative;
    width: 100%;
    padding: 100px 0;
    z-index: 5;
    background: transparent;
}

.about-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: center;
    gap: 40px;
}

.photo-column {
    flex: 1;
    position: relative;
    height: 700px;
    display: flex;
    justify-content: center;
}

.polaroid {
    background: #ffffff;
    padding: 10px 10px 30px 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    position: absolute;
    width: 250px;
    transition: transform 0.3s ease;
}

.polaroid img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
}

.pic1 { top: 0; left: 20%; transform: rotate(-5deg); z-index: 1; }
.pic2 { top: 30%; left: 30%; transform: rotate(3deg); z-index: 2; }
.pic3 { top: 60%; left: 15%; transform: rotate(-4deg); z-index: 3; }

.polaroid:hover {
    transform: scale(1.05) translateY(-10px);
    z-index: 10;
}

.text-column {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-box {
    background: var(--bg-text-brand);
    border-left: 4px solid var(--accent-color);
    padding: 35px 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

.text-box h2 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    margin-top: 0;
    font-size: 24px;
    letter-spacing: 1px;
}

.text-box p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 0;
    font-weight: 400;
}

.text-box blockquote {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-size: 18px;
    color: var(--accent-color);
    margin: 0;
    line-height: 1.6;
    text-align: center;
}

.btn-saber-mas {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    background-color: var(--accent-color);
    color: #121212;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.btn-saber-mas:hover {
    opacity: 0.8;
}

@media (max-width: 1024px) {
    header {
        padding: 1rem 1.5rem;
    }
    
    .logo-img {
        height: 100px;
    }

    nav {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Header */
    .logo-img {
        height: 80px;
    }

    /* Hero & Slider */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .slider-arrow {
        display: none; /* Hide arrows on mobile for cleaner look */
    }

    .slider-dots {
        bottom: 40px;
    }

    /* Sobre Mí Section */
    .about-container {
        flex-direction: column;
        padding: 0 15px;
        gap: 20px;
    }

    .photo-column {
        height: auto; 
        width: 100%;
        margin-bottom: 40px;
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
    }

    .polaroid {
        width: 240px; 
        padding: 10px 10px 30px 10px;
        position: relative;
        margin-bottom: -50px; /* Slight overlap effect */
        box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    }

    .pic1 { top: auto; left: auto; transform: rotate(-5deg); z-index: 3; }
    .pic2 { top: auto; left: auto; transform: rotate(4deg); z-index: 2; }
    .pic3 { top: auto; left: auto; transform: rotate(-2deg); z-index: 1; margin-bottom: 0; }

    .text-column {
        order: 2;
    }

    .text-box {
        padding: 25px;
    }

    .text-box h2 {
        font-size: 20px;
    }

    .text-box p {
        font-size: 14px;
        line-height: 1.6;
    }

    /* Quiz Section */
    #quiz-perfume {
        padding: 40px 15px;
    }

    .quiz-container {
        padding: 25px;
    }

    .quiz-question {
        font-size: 1.2rem;
    }

    .quiz-option {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* Header Profile Styles */
.user-profile-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.3s ease;
    min-width: 80px;
}

.user-profile-btn:hover {
    background: rgba(212, 175, 55, 0.1);
}

.user-avatar-header {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.user-greeting-header {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .user-profile-btn {
        min-width: auto;
    }
    .user-greeting-header {
        display: none; /* Hide name on mobile to save space */
    }
}

/* --- Animaciones de Entrada (Fade-in Reveal) --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Retrasos escalonados */
.reveal-delay-1 { transition-delay: 150ms; }
.reveal-delay-2 { transition-delay: 300ms; }
.reveal-delay-3 { transition-delay: 450ms; }
.reveal-delay-4 { transition-delay: 600ms; }
.reveal-delay-5 { transition-delay: 750ms; }



/* Marquee Banner Envío Gratis */
.marquee-banner {
    width: 100%;
    height: 38px;
    background-color: var(--accent-color);
    color: #000000;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1010; /* visible above hero slides */
    display: flex;
    align-items: center;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 25s linear infinite;
}

.marquee-content {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    padding-right: 2rem; /* Spacing between segments to avoid clutter */
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Adjust Header position when the banner is present at the top of hero-screen */
.hero-screen .marquee-banner + header {
    top: 38px;
}

/* Admin Notification Badge Styles */
.admin-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff4b2b, #ff416c); /* Vibrant modern red gradient */
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 10px rgba(255, 75, 43, 0.4);
    border: 1.5px solid var(--bg-color, #0f0f0f);
    transition: all 0.3s ease;
    animation: badgeBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

@keyframes badgeBounce {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.admin-badge.hidden {
    display: none !important;
}
