/* Custom animations for the homepage */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.pulse-element {
    animation: pulse 3s ease-in-out infinite;
}

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

.magical-text {
    background: linear-gradient(90deg, var(--color-accent), #8e44ad, var(--color-accent));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    animation: fadeZoom 20s infinite alternate ease-in-out;
}

@keyframes fadeZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.category-card {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
}

.category-card:hover .category-image {
    transform: scale(1.1);
}

.category-card:hover .category-overlay {
    background: linear-gradient(to top, rgba(10, 5, 16, 0.9), rgba(74, 14, 84, 0.6), transparent);
}

.category-card:hover .category-title {
    transform: translateY(-10px);
}

.magical-symbol {
    position: absolute;
    opacity: 0.1;
    user-select: none;
    pointer-events: none;
    animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.symbol-1 {
    top: 10%;
    left: 5%;
    font-size: 4rem;
}

.symbol-2 {
    bottom: 15%;
    right: 8%;
    font-size: 5rem;
}

.symbol-3 {
    top: 40%;
    right: 15%;
    font-size: 3rem;
}

.symbol-4 {
    bottom: 30%;
    left: 12%;
    font-size: 4.5rem;
}

.magical-border {
    position: relative;
}

.magical-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-accent), transparent, var(--color-accent), transparent);
    background-size: 400% 400%;
    animation: gradientBorder 5s ease infinite;
    border-radius: inherit;
    z-index: -1;
}

@keyframes gradientBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.cauldron-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.cauldron {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #222;
    border-radius: 40% 40% 45% 45%;
    overflow: hidden;
}

.cauldron::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 20px;
    top: -10px;
    left: 5px;
    background: #333;
    border-radius: 50%;
}

.brew {
    position: absolute;
    top: 15px;
    left: 10px;
    width: 60px;
    height: 40px;
    background: #9b59b6;
    border-radius: 50% 50% 0 0;
    animation: brew 3s ease-in-out infinite;
    box-shadow: 0 0 10px #9b59b6;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: bubble 2s ease-in-out infinite;
}

.bubble:nth-child(1) {
    width: 8px;
    height: 8px;
    left: 20px;
    top: 20px;
    animation-delay: 0.2s;
}

.bubble:nth-child(2) {
    width: 6px;
    height: 6px;
    left: 40px;
    top: 25px;
    animation-delay: 0.4s;
}

.bubble:nth-child(3) {
    width: 10px;
    height: 10px;
    left: 30px;
    top: 15px;
    animation-delay: 0.6s;
}

@keyframes brew {
    0%, 100% {
        transform: translateY(0);
        background: #9b59b6;
    }
    50% {
        transform: translateY(2px);
        background: #8e44ad;
    }
}

@keyframes bubble {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-25px);
        opacity: 0;
    }
}

/* Reveal animation */
.reveal-text {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.reveal-text span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: revealText 1.2s forwards;
}

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

/* Characters animation delay loop */
.reveal-text span:nth-child(1) { animation-delay: 0.1s; }
.reveal-text span:nth-child(2) { animation-delay: 0.2s; }
.reveal-text span:nth-child(3) { animation-delay: 0.3s; }
.reveal-text span:nth-child(4) { animation-delay: 0.4s; }
.reveal-text span:nth-child(5) { animation-delay: 0.5s; }
.reveal-text span:nth-child(6) { animation-delay: 0.6s; }
.reveal-text span:nth-child(7) { animation-delay: 0.7s; }
.reveal-text span:nth-child(8) { animation-delay: 0.8s; }
.reveal-text span:nth-child(9) { animation-delay: 0.9s; }
.reveal-text span:nth-child(10) { animation-delay: 1.0s; }
.reveal-text span:nth-child(11) { animation-delay: 1.1s; }
.reveal-text span:nth-child(12) { animation-delay: 1.2s; }

/* Card content styles */
.card-content {
    background-color: rgba(20, 10, 24, 0.85);
    height: 100%;
}

.placeholder-image {
    background-color: #301934; /* Deep, slightly desaturated purple */
    /* Removed display, align-items, justify-content, font-size, color, font-family as they are no longer needed for background text */
}

/* Scroll down button */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* Category section styles */
.category-section {
    position: relative;
    overflow: hidden;
}

.category-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-accent) 50%, transparent 100%);
}

/* Latest updates card styles */
.update-card {
    border-left: 3px solid var(--color-accent);
    transition: all 0.3s ease;
}

.update-card:hover {
    border-left-width: 6px;
    transform: translateX(5px);
}

/* Empty state styling */
.empty-state {
    background: linear-gradient(135deg, rgba(74, 14, 84, 0.1), rgba(43, 15, 48, 0.1));
    border: 1px dashed rgba(155, 89, 182, 0.3);
}

/* Decorative elements */
.decorative-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}
