:root {
    --color-gold: #D4AF37;
    --color-yellow: #FFD700;
    --color-brown: #5C4033;
    --color-brown-dark: #3E2723;
    --color-green: #2E7D32;
    --color-green-light: #4CAF50;
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Outfit', sans-serif;
    
    --bg-overlay: rgba(26, 15, 5, 0.96);
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-glass: rgba(255, 255, 255, 0.5);
}

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

html, body {
    height: 100dvh;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-image: url('../img/fondo_girasoles.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--color-brown-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Custom Cursor */
#custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--color-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

#cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

@media (hover: none) and (pointer: coarse) {
    #custom-cursor, #cursor-follower { display: none !important; }
    body {
        overflow-y: auto;
        align-items: flex-start;
        padding-top: 40px;
        padding-bottom: 60px;
    }
}

/* Overlay */
#overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100dvh;
    background-color: var(--bg-overlay);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.8s ease;
}

.overlay-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.overlay-content h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-style: italic;
    color: var(--color-gold);
}

.overlay-content p {
    font-weight: 300;
    font-size: 1.1rem;
    color: #eeddcc;
}

/* Glassmorphism Card */
.card {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 40px 30px;
    width: 92%;
    max-width: 440px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    text-align: center;
    position: relative;
    z-index: 10;
    will-change: transform, opacity;
}

/* Typo */
.title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-brown);
    line-height: 1.1;
    margin-bottom: 5px;
    font-weight: 600;
}

.subtitle {
    font-size: 1rem;
    color: var(--color-brown-dark);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

/* Photo Frame Premium */
.photo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.photo-frame {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--color-gold), #FFF8DC, var(--color-gold));
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    position: relative;
    animation: floatFrame 6s ease-in-out infinite;
    will-change: transform;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--bg-glass);
}

@keyframes floatFrame {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

/* Countdown */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    min-width: 65px;
    padding: 10px 0;
}

.time-unit .number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--color-brown);
    line-height: 1;
}

.time-unit .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-gold);
    font-weight: 600;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* Details */
.details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 35px;
    text-align: center;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.detail-item .icon {
    font-size: 1.4rem;
}

.detail-item p {
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--color-brown-dark);
}

.detail-item strong {
    font-weight: 600;
    color: var(--color-brown);
}

/* Buttons */
.btn-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    color: white;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    -webkit-tap-highlight-color: transparent;
    cursor: none; /* usamos el custom cursor si no es mobil */
}

@media (hover: none) and (pointer: coarse) {
    .btn { cursor: pointer; } /* en movil sí mostramos el nativo si se clickea pero no es necesario */
}

.btn:active {
    transform: scale(0.97);
}

.btn-gold {
    background: linear-gradient(135deg, var(--color-gold), #B8860B);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.btn-green {
    background: linear-gradient(135deg, var(--color-green), var(--color-green-light));
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Flower Decoration Bottom */
.flower-decoration {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.sunflower-deco {
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Performance and Fallbacks para móviles gama media/baja */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
