/* ========================================
   NOVENA NAVIDEÑA - ESTILOS DE FUNCIONALIDADES
   Kokito Star - Navidad Mágica
   ======================================== */

/* ========================================
   1. CONTADOR DE NAVIDAD
   ======================================== */
#christmas-countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.countdown-item {
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.3), rgba(156, 39, 176, 0.3));
    border: 2px solid rgba(255, 64, 129, 0.5);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    min-width: 80px;
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.countdown-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

/* ========================================
   2. BARRA DE PROGRESO
   ======================================== */
#novena-progress {
    margin: 2rem auto;
    max-width: 600px;
    padding: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.progress-bar-container {
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 64, 129, 0.3);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF4081, #E91E63, #9C27B0);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 64, 129, 0.5);
}

/* ========================================
   3. ESTRELLAS COLECCIONABLES
   ======================================== */
#stars-collection {
    margin: 2rem auto;
    max-width: 500px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.stars-title {
    text-align: center;
    font-size: 1.3rem;
    color: #FFD700;
    margin-bottom: 1rem;
}

.stars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.star-item {
    text-align: center;
    padding: 1rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.star-item.collected {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 64, 129, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.5);
    animation: starPulse 2s infinite;
}

.star-item.empty {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.star-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.star-day {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   4. PESEBRE NAVIDEÑO
   ======================================== */
#nativity-scene {
    margin: 2rem auto;
    max-width: 600px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.8), rgba(13, 0, 21, 0.8));
    border-radius: 20px;
    border: 2px solid rgba(255, 64, 129, 0.3);
}

.nativity-title {
    text-align: center;
    font-size: 1.3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.nativity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.nativity-figure {
    text-align: center;
    padding: 1rem;
    border-radius: 15px;
    transition: all 0.5s ease;
}

.nativity-figure.visible {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(139, 195, 74, 0.2));
    border: 2px solid rgba(76, 175, 80, 0.5);
}

.nativity-figure.hidden {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    opacity: 0.6;
}

.figure-emoji {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.figure-name {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   5. CONFETI
   ======================================== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 20px;
    top: -20px;
    animation: confettiFall 4s linear forwards;
    transform-origin: center;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   6. TEMA CLARO/OSCURO
   ======================================== */
body[data-theme="light"] {
    --bg-primary: #f5f0ff;
    --bg-secondary: #e8e0f5;
    --text-primary: #2d1b4e;
    --text-secondary: #4a2472;
}

body[data-theme="light"] .content-wrapper {
    background: linear-gradient(135deg, #f5f0ff 0%, #e8e0f5 50%, #f0e5ff 100%);
}

body[data-theme="light"] .day-card {
    background: rgba(255, 255, 255, 0.9);
    color: #2d1b4e;
}

body[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.8);
    color: #2d1b4e;
}

/* ========================================
   7. TAMAÑOS DE LETRA
   ======================================== */
body[data-font-size="small"] {
    font-size: 14px;
}

body[data-font-size="medium"] {
    font-size: 16px;
}

body[data-font-size="large"] {
    font-size: 20px;
}

body[data-font-size="extra-large"] {
    font-size: 24px;
}

.font-size-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.font-size-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 64, 129, 0.5);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.font-size-btn:hover,
.font-size-btn.active {
    background: rgba(255, 64, 129, 0.5);
    border-color: #FF4081;
}

/* ========================================
   8. BOTONES DE COMPARTIR
   ======================================== */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.copy {
    background: linear-gradient(135deg, #FF4081, #E91E63);
    color: white;
}

.share-btn.image {
    background: linear-gradient(135deg, #9C27B0, #673AB7);
    color: white;
}

/* ========================================
   9. TOAST NOTIFICATIONS
   ======================================== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #FF4081, #E91E63);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 30px rgba(233, 30, 99, 0.5);
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========================================
   10. CÓDIGO QR
   ======================================== */
#qr-container {
    text-align: center;
    margin: 2rem 0;
}

.qr-wrapper {
    display: inline-block;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 2px solid rgba(255, 64, 129, 0.3);
}

.qr-wrapper h3 {
    color: #FFD700;
    margin-bottom: 1rem;
}

.qr-image {
    border-radius: 15px;
    margin: 1rem 0;
}

.qr-wrapper p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* ========================================
   11. QUIZ NAVIDEÑO
   ======================================== */
#quiz-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.9), rgba(26, 10, 46, 0.9));
    border-radius: 20px;
    border: 2px solid rgba(255, 64, 129, 0.3);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.quiz-question {
    font-size: 1.4rem;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 64, 129, 0.3);
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quiz-option:hover {
    background: rgba(255, 64, 129, 0.3);
    border-color: #FF4081;
    transform: translateX(10px);
}

.quiz-results {
    text-align: center;
    padding: 2rem;
}

.quiz-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.quiz-score {
    font-size: 1.8rem;
    color: #FFD700;
    margin-bottom: 1rem;
}

.quiz-message {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.quiz-restart {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FF4081, #E91E63);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-restart:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.5);
}

/* Selector de Dificultad */
.quiz-difficulty-selector {
    padding: 2rem;
}

.difficulty-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.difficulty-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 64, 129, 0.3);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-btn:hover {
    transform: translateY(-5px);
    border-color: #FF4081;
    background: rgba(255, 64, 129, 0.2);
}

.difficulty-btn.easy:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
}

.difficulty-btn.medium:hover {
    border-color: #FF9800;
    background: rgba(255, 152, 0, 0.2);
}

.difficulty-btn.hard:hover {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.2);
}

.difficulty-btn.mixed:hover {
    border-color: #9C27B0;
    background: rgba(156, 39, 176, 0.2);
}

.difficulty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.difficulty-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.difficulty-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    text-align: center;
}

.quiz-difficulty-badge {
    background: rgba(255, 64, 129, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

@media (max-width: 480px) {
    .difficulty-buttons {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   12. MURO DE INTENCIONES
   ======================================== */
#intentions-wall {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
}

.intentions-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.intentions-header h3 {
    color: #FFD700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.intentions-header p {
    color: rgba(255, 255, 255, 0.7);
}

.intention-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.intention-form textarea {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 64, 129, 0.3);
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    resize: none;
    min-height: 80px;
}

.intention-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.intention-form button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FF4081, #E91E63);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.intention-form button:hover {
    transform: scale(1.05);
}

.intentions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.intention-card {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border-left: 4px solid #FF4081;
}

.intention-card p {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.intention-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   13. CONTADOR DE PERSONAS
   ======================================== */
#prayer-counter {
    margin: 1.5rem 0;
}

.prayer-counter-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.2), rgba(156, 39, 176, 0.2));
    border-radius: 50px;
    border: 2px solid rgba(255, 64, 129, 0.3);
}

.prayer-icon {
    font-size: 1.5rem;
    animation: prayerPulse 2s infinite;
}

.prayer-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFD700;
}

.prayer-text {
    color: rgba(255, 255, 255, 0.9);
}

@keyframes prayerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ========================================
   14. BARRA DE CONTROLES FLOTANTE
   ======================================== */
.floating-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.9), rgba(26, 10, 46, 0.9));
    border: 2px solid rgba(255, 64, 129, 0.5);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(255, 64, 129, 0.5);
    background: linear-gradient(135deg, #FF4081, #E91E63);
}

/* ========================================
   15. BOTÓN COMPLETAR DÍA
   ======================================== */
.complete-day-btn {
    display: block;
    margin: 2rem auto;
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 30px rgba(76, 175, 80, 0.4);
}

.complete-day-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(76, 175, 80, 0.6);
}

.complete-day-btn.completed {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    cursor: default;
    box-shadow: none;
}

/* ========================================
   16. PANEL DE CONFIGURACIÓN
   ======================================== */
.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.98), rgba(13, 0, 21, 0.98));
    border: 2px solid rgba(255, 64, 129, 0.5);
    border-radius: 20px;
    padding: 2rem;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-width: 400px;
    width: 90%;
}

.settings-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-title {
    text-align: center;
    color: #FFD700;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section {
    margin-bottom: 1.5rem;
}

.settings-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.settings-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    #christmas-countdown {
        gap: 0.5rem;
    }

    .countdown-item {
        padding: 0.75rem 1rem;
        min-width: 60px;
    }

    .countdown-number {
        font-size: 1.8rem;
    }

    .stars-grid,
    .nativity-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }

    .intention-form {
        flex-direction: column;
    }

    .floating-controls {
        bottom: 10px;
        right: 10px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

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

@media (max-width: 480px) {
    .countdown-item {
        padding: 0.5rem 0.75rem;
        min-width: 50px;
    }

    .countdown-number {
        font-size: 1.4rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }
}

/* ========================================
   ESTILOS PARA IMPRESIÓN
   ======================================== */
@media print {
    .floating-controls,
    .share-buttons,
    #prayer-counter,
    #qr-container,
    #quiz-container,
    .complete-day-btn,
    .settings-panel,
    .settings-overlay,
    .confetti-container,
    .toast-notification {
        display: none !important;
    }
}
