/* Modern Boomer Glam Aesthetic Stylesheet */

:root {
    --primary: #ff4081;
    --primary-hover: #f50057;
    --secondary: #7c4dff;
    --accent: #ffd700;
    --bg-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #a1c4fd 100%);
    --card-bg: rgba(255, 255, 255, 0.92);
    --text-color: #2c3e50;
    --font-heading: 'Comic Neue', 'Comic Sans MS', 'Pacifico', cursive, sans-serif;
    --font-body: 'Poppins', 'Segoe UI', sans-serif;
    --shadow-soft: 0 15px 35px rgba(255, 64, 129, 0.2);
    --shadow-glow: 0 0 25px rgba(255, 215, 0, 0.6);
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 40px;
}

/* Floating Sparkle Canvas */
#sparkle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.app-container {
    width: 100%;
    max-width: 720px;
    padding: 20px 16px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Header Section */
header {
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    border: 3px solid #fff;
    width: 100%;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "✨ 🌸 ☕ 🌸 ✨";
    display: block;
    font-size: 1.2rem;
    margin-bottom: 6px;
    letter-spacing: 4px;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    background: linear-gradient(45deg, #e91e63, #9c27b0, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
    line-height: 1.2;
}

header p {
    font-size: 0.95rem;
    color: #666;
    margin-top: 6px;
    font-weight: 500;
}

/* Day Badge */
.day-badge-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.day-badge {
    background: linear-gradient(90deg, #ff4081, #ff9100);
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 64, 129, 0.4); }
    100% { transform: scale(1.04); box-shadow: 0 6px 22px rgba(255, 215, 0, 0.8); }
}

/* Main Card */
.main-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 24px;
    width: 100%;
    box-shadow: var(--shadow-soft);
    border: 4px solid #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

/* Image Container */
.image-frame {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: #fff;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05), 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 4px dashed #ff80ab;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.image-frame img.loading {
    opacity: 0.3;
    transform: scale(0.98);
}

.spinner {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 5px solid #ffe0b2;
    border-top: 5px solid #ff4081;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.spinner.visible {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Action Buttons Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 520px;
}

.btn {
    border: none;
    padding: 14px 18px;
    border-radius: 18px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: white;
}

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

.btn-primary {
    background: linear-gradient(135deg, #ff4081, #ff9100);
    grid-column: span 2;
    font-size: 1.1rem;
    padding: 16px 20px;
}

@media (max-width: 480px) {
    .btn-primary {
        grid-column: span 1;
    }
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f50057, #ff6d00);
    box-shadow: 0 6px 20px rgba(255, 64, 129, 0.4);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #20ba5a, #0e6b60);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #7c4dff, #536dfe);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #651fff, #3d5afe);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.9);
    color: #444;
    border: 2px solid #e0e0e0;
}

.btn-outline:hover {
    background: #ffffff;
    border-color: #ff4081;
    color: #ff4081;
}

/* Day selector pill menu */
.day-selector-section {
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.7);
    padding: 14px 18px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.day-selector-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.day-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.day-pill {
    background: #fff;
    border: 1.5px solid #ffd3e0;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.day-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(255, 64, 129, 0.3);
}

/* Boomer Blessing Generator */
.blessing-box {
    background: #fff5f8;
    border: 2px stroke #ffb6c1;
    border-radius: 20px;
    padding: 18px;
    width: 100%;
    max-width: 520px;
    text-align: center;
    position: relative;
    border: 2px dashed #ff4081;
}

.blessing-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #c2185b;
    margin-bottom: 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 10px;
    color: #555;
    font-size: 0.85rem;
    z-index: 2;
}

footer a {
    color: #c2185b;
    text-decoration: none;
    font-weight: 700;
}

footer a:hover {
    text-decoration: underline;
}

/* Toast alert */
.toast {
    position: fixed;
    bottom: 30px;
    background: #323232;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================
   Selector de Modo & Badge
   ========================================================== */

.mode-switcher {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px;
    border-radius: 40px;
    border: 2px solid #fff;
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.15);
    margin-bottom: 6px;
}

.mode-btn {
    border: none;
    background: transparent;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    color: #666;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-btn:hover {
    color: var(--primary);
}

.mode-btn.active {
    background: linear-gradient(45deg, #ff4081, #7c4dff);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 64, 129, 0.35);
}

.ai-badge {
    background: linear-gradient(90deg, #673ab7, #e91e63, #ff9800);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(103, 58, 183, 0.3);
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: glow-pulse 3s infinite alternate;
}

@keyframes glow-pulse {
    0% { filter: drop-shadow(0 0 2px rgba(233, 30, 99, 0.4)); }
    100% { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)); }
}

.ai-metadata-bar {
    font-size: 0.76rem;
    color: #777;
    margin-top: -6px;
    margin-bottom: 6px;
    text-align: center;
    font-weight: 500;
}

.btn-ai {
    background: linear-gradient(45deg, #9c27b0, #e91e63);
    color: white;
    box-shadow: 0 6px 18px rgba(156, 39, 176, 0.35);
}

.btn-ai:hover {
    background: linear-gradient(45deg, #7b1fa2, #c2185b);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(156, 39, 176, 0.45);
}

/* ==========================================================
   Estilos de Catálogo Histórico
   ========================================================== */

.catalog-section {
    width: 100%;
    margin-top: 10px;
    background: #fff;
    padding: 16px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.catalog-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 4px;
}

.catalog-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff5f8;
    border: 1.5px solid #ffe0e9;
    padding: 10px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.catalog-item:hover {
    border-color: var(--primary);
    background: #ffe8f0;
    transform: translateX(2px);
}

.catalog-item.active {
    border-color: var(--primary);
    background: #ffebee;
    font-weight: 700;
}

.catalog-item-date {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
}

.catalog-item-title {
    font-size: 0.88rem;
    color: #333;
    font-weight: 600;
}
