/* ==========================================================================
   Variables & Config
   ========================================================================== */
   :root {
    /* Colors Premium Dark/Vibrant */
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #ec4899;
    --accent: #06b6d4;

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 20px;
    --font-family: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   Background Animations
   ========================================================================== */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s infinite alternate ease-in-out;
}

.shape-1 {
    top: -10%; left: -5%;
    width: 400px; height: 400px;
    background: var(--primary);
}

.shape-2 {
    bottom: -10%; right: -5%;
    width: 500px; height: 500px;
    background: var(--secondary);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%; left: 50%;
    width: 300px; height: 300px;
    background: var(--accent);
    transform: translateX(-50%);
    animation-duration: 15s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    margin: 20px;
    border-radius: 50px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo i {
    color: var(--secondary);
    font-size: 2rem;
}

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

.btn-ghost {
    color: var(--text-main);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.hero h1 span {
    background: linear-gradient(to right, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Dashboard Layout (Grid)
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding-bottom: 60px;
    align-items: start; /* Previene que las tarjetas se estiren y dejen espacio vacío abajo */
}

.card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-header h2 i {
    color: var(--accent);
    font-size: 1.5rem;
}

/* ==========================================================================
   Featured Birthday Card
   ========================================================================== */
.featured-birthday .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.profile-pic {
    position: relative;
}

.profile-pic img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    object-fit: cover;
}

.profile-pic .badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.4);
}

.featured-birthday .info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.featured-birthday .info .date {
    color: var(--accent);
    font-weight: 600;
}

.countdown {
    margin-top: 15px;
    background: rgba(0,0,0,0.2);
    padding: 15px 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.time-box {
    display: flex;
    flex-direction: column;
}

.time-box .number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.time-box .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.confetti-icon {
    font-size: 2.5rem;
    color: var(--secondary);
}

/* ==========================================================================
   Carousel Setup
   ========================================================================== */
.carousel-controls {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text-main);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: var(--primary);
}

.carousel-container {
    overflow-x: auto;
    flex-grow: 1;
    position: relative;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 20px;
}

/* Carousel Item (Mini Card) */
.carousel-item {
    min-width: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
    flex: 0 0 auto;
}

.carousel-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.carousel-item img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
}

.carousel-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.carousel-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.carousel-item .days-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    /* Native Carousel for touch devices */
    .carousel-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        padding-bottom: 15px;
        scrollbar-width: none; /* Oculta scrollbar para diseño más limpio */
    }
    
    .carousel-container::-webkit-scrollbar {
        display: none; /* Oculta scrollbar en Webkit */
    }
    
    .carousel-track {
        display: flex;
        gap: 15px;
        padding-right: 20px;
    }
    
    .carousel-item {
        min-width: 180px; /* Tamaño perfecto para móviles */
        scroll-snap-align: none; /* Scroll libre es más fluido */
    }
}

@media (max-width: 600px) {
    .main-header {
        flex-direction: column;
        gap: 15px;
        border-radius: 20px;
    }
    
    .hero {
        padding: 40px 0 20px;
    }
    
    .featured-birthday .info h3 {
        font-size: 1.5rem;
    }
    
    .profile-pic img {
        width: 100px;
        height: 100px;
    }
    
    /* Efecto Bleed para el carrusel: Se expande hasta los bordes de la pantalla */
    .upcoming-birthdays .carousel-container {
        margin-left: -30px;
        margin-right: -30px;
        padding-left: 30px;
        padding-right: 30px;
        width: calc(100% + 60px);
    }
}
