/* Quests Section */
.quests-section {
    min-height: 75vh;
    background: url('../../images/quests.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 65px; /* Additional offset for quest section */
}

.quests-top-section {
    flex: 1;
    padding: 3rem 0;
    display: flex;
    align-items: center;
}

.quests-bottom-section {
    flex: 1;
    min-height: 37.5vh;
    position: relative;
    /* Empty section to show the bottom part of the background image */
}

/* Fire Effect - Campfire Sparks */
.quests-section::before,
.quests-section::after {
    content: '';
    position: absolute;
    bottom: 20%;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ff2500 0%, #ff6b35 30%, #f7931e 60%, transparent 80%);
    border-radius: 50%;
    animation: fireSpark 3s infinite linear;
    z-index: 10;
}

.quests-section::before {
    left: 37%;
    animation-delay: 0.5s;
    animation-duration: 2.8s;
}

.quests-section::after {
    left: 45%;
    animation-delay: 1.7s;
    animation-duration: 3.4s;
}

.quests-top-section::before,
.quests-top-section::after {
    content: '';
    position: absolute;
    bottom: -10%;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, #ff6b35 0%, #ffa500 40%, transparent 70%);
    border-radius: 50%;
    animation: fireSpark 4s infinite linear;
    z-index: 10;
}

.quests-top-section::before {
    left: 32%;
    animation-delay: 0.9s;
    animation-duration: 3.6s;
}

.quests-top-section::after {
    left: 50%;
    animation-delay: 2.2s;
    animation-duration: 2.9s;
}

.fire-sparks {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.fire-spark {
    position: absolute;
    bottom: 20%;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ff4500 0%, #ffa500 40%, transparent 70%);
    border-radius: 50%;
    animation: sparkFloat 4s infinite linear;
}

.fire-spark.small {
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, #ff6b35 0%, #f7931e 30%, transparent 60%);
}

.fire-spark.medium {
    width: 5px;
    height: 5px;
    background: radial-gradient(circle, #ff2500 0%, #ff6b35 20%, #ffa500 50%, transparent 80%);
}

.fire-spark:nth-child(1) { left: 33%; animation-delay: 0.1s; animation-duration: 2.8s; }
.fire-spark:nth-child(2) { left: 36%; animation-delay: 1.2s; animation-duration: 3.5s; }
.fire-spark:nth-child(3) { left: 39%; animation-delay: 0.8s; animation-duration: 3s; }
.fire-spark:nth-child(4) { left: 41%; animation-delay: 2.1s; animation-duration: 2.5s; }
.fire-spark:nth-child(5) { left: 43%; animation-delay: 0.4s; animation-duration: 3.8s; }
.fire-spark:nth-child(6) { left: 46%; animation-delay: 1.6s; animation-duration: 3.2s; }
.fire-spark:nth-child(7) { left: 49%; animation-delay: 0.7s; animation-duration: 2.9s; }
.fire-spark:nth-child(8) { left: 35%; animation-delay: 2.3s; animation-duration: 3.6s; }
.fire-spark:nth-child(9) { left: 38%; animation-delay: 0.3s; animation-duration: 2.7s; }
.fire-spark:nth-child(10) { left: 40%; animation-delay: 1.9s; animation-duration: 3.3s; }
.fire-spark:nth-child(11) { left: 42%; animation-delay: 0.9s; animation-duration: 2.6s; }
.fire-spark:nth-child(12) { left: 44%; animation-delay: 1.4s; animation-duration: 3.7s; }
.fire-spark:nth-child(13) { left: 47%; animation-delay: 0.6s; animation-duration: 2.4s; }
.fire-spark:nth-child(14) { left: 34%; animation-delay: 2.7s; animation-duration: 3.4s; }
.fire-spark:nth-child(15) { left: 48%; animation-delay: 0.2s; animation-duration: 3.1s; }

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

.quest-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 25px var(--shadow-warm);
    border: 2px solid var(--earth-brown);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-width: 280px;
    margin: 0 auto;
}

.quest-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(212, 175, 55, 0.1), transparent);
    animation: questShine 4s linear infinite;
    z-index: 1;
}

.quest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow-warm);
    border-color: var(--primary-accent);
}

.quest-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 2;
}

.quest-card h3 {
    font-size: 1.3rem;
    color: var(--medieval-blue);
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 2;
}

.quest-card p {
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
}

.quest-reward {
    background: var(--gradient-gold);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    position: relative;
    z-index: 2;
}

/* Empty Quest Card Skeleton Styles */
.quest-empty {
    position: relative;
    background: #f8f9fa;
    border: 2px dashed #d4af37;
    border-color: var(--primary-gold);
    opacity: 0.7;
}

.quest-empty:hover {
    transform: none;
    box-shadow: 0 8px 25px var(--shadow-warm);
    opacity: 0.8;
}

.quest-skeleton {
    position: relative;
    z-index: 2;
    margin-bottom: 1rem;
}

.skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    margin: 0 auto 0.8rem;
}

.skeleton-line {
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin: 0 auto 0.8rem;
}

.skeleton-text {
    width: 80%;
    margin: 0 auto 0.3rem;
}

.skeleton-text:last-of-type {
    width: 65%;
    margin-bottom: 1rem;
}

.skeleton-reward {
    height: 32px;
    width: 70%;
    border-radius: 16px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    margin: 0 auto;
}

.empty-text {
    color: #666;
    font-style: italic;
    margin-top: 1rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

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