/* ===== DIARY WRITING ANIMATION (Tom Riddle Effect) ===== */

/* Text appears as if being written by invisible ink */
.diary-write.writing .ink-char {
    opacity: 0;
    animation: inkCharReveal 0.15s ease forwards;
    display: inline;
}

@keyframes inkCharReveal {
    0% {
        opacity: 0;
        color: rgba(50, 200, 80, 0.2);
        text-shadow: 0 0 8px rgba(50, 255, 100, 0.6);
        filter: blur(2px);
    }
    50% {
        opacity: 0.7;
        color: rgba(50, 255, 100, 0.6);
        text-shadow: 0 0 15px rgba(50, 255, 100, 0.8);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        color: inherit;
        text-shadow: none;
        filter: blur(0);
    }
}

/* Glow that follows the "writing" position */
.diary-write.writing::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(50, 255, 100, 0.4), transparent);
    pointer-events: none;
    animation: writingGlow 2s ease-in-out infinite;
}

@keyframes writingGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Section transitions */
.content-section {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.content-section.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.content-section.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card hover glow */
.service-card::before,
.booking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(50, 255, 100, 0.06),
        transparent 40%
    );
    pointer-events: none;
}

.service-card:hover::before,
.booking-card:hover::before {
    opacity: 1;
}

/* Button press effect */
.booking-btn:active {
    transform: translateY(0) scale(0.98) !important;
}

/* Loading shimmer for elements */
.loading-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
