/**
 * Daily Challenge Widget Styles
 */
.daily-challenge-widget {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFF59D 100%);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: 800px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.daily-challenge-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.challenge-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.challenge-icon {
    font-size: 3rem;
    flex-shrink: 0;
    animation: gentle-bounce 2s ease-in-out infinite;
}

.challenge-content {
    flex: 1;
}

.challenge-title {
    font-size: 1.3rem;
    color: #F57C00;
    margin: 0 0 0.5rem 0;
}

.challenge-description {
    font-size: 1rem;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

.challenge-streak {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    font-weight: bold;
    color: #F57C00;
}

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

.challenge-done-btn {
    padding: 0.8rem 1.5rem;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.challenge-done-btn:hover:not(:disabled) {
    background: #F57C00;
    transform: scale(1.05);
}

.challenge-done-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.challenge-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9800 0%, #F57C00 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/**
 * Reward Modal
 */
.reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.reward-modal-content {
    background: white;
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    max-width: 500px;
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.reward-icon {
    font-size: 5rem;
    animation: rotate 1s ease-in-out;
}

.reward-modal-content h2 {
    color: #F57C00;
    margin: 1rem 0;
    font-size: 2rem;
}

.reward-message {
    font-size: 1.3rem;
    color: #333;
    margin: 1rem 0 2rem 0;
}

.reward-close-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reward-close-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

/**
 * Challenge Toast Notification
 */
.challenge-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

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

/**
 * Confetti Animation
 */
.confetti {
    position: fixed;
    top: -50px;
    animation: fall 3s linear forwards;
    z-index: 10001;
    pointer-events: none;
}

@keyframes fall {
    to {
        top: 100%;
        transform: rotateZ(720deg);
    }
}

/**
 * Preview Badge for Coming Soon Features
 */
.preview-badge {
    display: inline-block;
    background: #FF9800;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.3rem;
    font-weight: bold;
    vertical-align: middle;
}

.preview-link {
    position: relative;
}

.preview-link .preview-badge {
    animation: pulse 1.5s ease-in-out infinite;
}

/**
 * Emergency Exit Button (Accessibility)
 */
.emergency-exit-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #F44336;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
}

.emergency-exit-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.6);
}

/**
 * Breathing Exercise Modal
 */
.breathing-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #B8E6E1 0%, #80DEEA 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease;
}

.breathing-circle {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    animation: breathe 10s ease-in-out infinite;
}

.breathing-instruction {
    font-size: 1.5rem;
    color: white;
    margin-top: 2rem;
    text-align: center;
    font-weight: bold;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.5);
    }
    60% {
        transform: scale(1.5);
    }
}

/**
 * Visual Schedule Enhanced
 */
.visual-schedule-step {
    position: relative;
    transition: all 0.3s ease;
}

.visual-schedule-step.active {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.5);
}

.visual-schedule-step.active .step-icon {
    animation: gentle-pulse 1.5s ease-in-out infinite;
}

.sloth-avatar-tracker {
    position: absolute;
    top: -30px;
    left: 0;
    width: 40px;
    height: 40px;
    transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/**
 * Animations
 */
@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes gentle-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes celebrate {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(-5deg);
    }
    75% {
        transform: scale(1.05) rotate(5deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

/**
 * Responsive Design
 */
@media (max-width: 768px) {
    .challenge-container {
        flex-direction: column;
        text-align: center;
    }
    
    .challenge-done-btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    .reward-modal-content {
        margin: 1rem;
        padding: 2rem;
    }
    
    .emergency-exit-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

/**
 * Story Customization Step Styles
 */
.customize-section {
    margin-bottom: 2rem;
}

.customize-label {
    font-size: 1.2rem;
    color: #00796B;
    margin-bottom: 1rem;
    text-align: center;
}

.mood-grid, .friend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mood-card, .friend-card {
    background: white;
    border: 3px solid #E0F7FA;
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mood-card:hover, .friend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,188,212,0.3);
}

.mood-card.selected, .friend-card.selected, .color-card.selected {
    border-color: #00BCD4;
    background: linear-gradient(135deg, #E0F7FA 0%, #B2EBF2 100%);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,188,212,0.4);
}

.mood-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.mood-label, .friend-name {
    font-size: 1rem;
    font-weight: bold;
    color: #00796B;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.color-card {
    height: 80px;
    border: 3px solid transparent;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.color-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
}

.color-card:hover::before {
    background: rgba(255,255,255,0.2);
}

.color-card.selected {
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.color-name {
    position: relative;
    z-index: 1;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.friend-avatar {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
}

/**
 * Story Loading Animation - Animated Book
 */
.story-loading-book {
    width: 150px;
    height: 120px;
    margin: 2rem auto;
    position: relative;
    perspective: 1000px;
}

.book-page {
    width: 100%;
    height: 100%;
    background: white;
    border: 3px solid #00BCD4;
    border-radius: 5px;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #00796B;
    animation: flip-page 3s ease-in-out infinite;
}

.book-page:nth-child(2) {
    animation-delay: 1s;
}

.book-page:nth-child(3) {
    animation-delay: 2s;
}

@keyframes flip-page {
    0%, 100% {
        transform: rotateY(0deg);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    50% {
        transform: rotateY(180deg);
        opacity: 0;
    }
}

/**
 * Post-Story Actions
 */
.story-actions-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.story-action-btn {
    padding: 1rem;
    background: white;
    border: 2px solid #E0F7FA;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.story-action-btn:hover {
    border-color: #00BCD4;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,188,212,0.3);
}

.action-icon {
    font-size: 2.5rem;
}

.action-label {
    font-weight: bold;
    color: #00796B;
}

