/* =====================================================================
   🌟 QUOTE OF THE DAY - LEGENDARY ANCIENT WISDOM STYLING
   ===================================================================== */

/* Collapsible Toggle Button */
.qotd-toggle-btn {
    width: 100%;
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.2);
    margin-bottom: 1rem;
}

.qotd-toggle-btn:hover {
    background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
    border-color: rgba(255, 215, 0, 0.9);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.qotd-toggle-btn:active {
    transform: translateY(0);
}

.qotd-toggle-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.qotd-toggle-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    animation: toggleIconPulse 2s ease-in-out infinite;
}

.qotd-toggle-text {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 
        0 0 15px rgba(255, 215, 0, 0.8),
        0 0 30px rgba(255, 215, 0, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Cinzel', 'Georgia', serif;
    letter-spacing: 2px;
    text-align: center;
}

.qotd-toggle-arrow {
    font-size: 1.5rem;
    color: #ffd700;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

.qotd-toggle-btn[aria-expanded="false"] .qotd-toggle-arrow {
    transform: rotate(-90deg);
}

.qotd-scroll {
    transition: all 0.4s ease-in-out;
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
}

.qotd-scroll.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

@keyframes toggleIconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 18px rgba(255, 215, 0, 1));
    }
}

/* Mystic Icon Bars - Above Title & Below Date */
.qotd-mystic-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    position: relative;
}

.qotd-mystic-bar-top {
    margin-bottom: 1rem;
    animation: mysticPulseTop 3s ease-in-out infinite;
}

.qotd-mystic-bar-bottom {
    margin-top: 1rem;
    animation: mysticPulseBottom 3s ease-in-out infinite 0.5s;
}

.mystic-icon {
    font-size: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    animation: mysticFloat 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.qotd-mystic-bar-top .mystic-icon:nth-child(1) { animation-delay: 0s; }
.qotd-mystic-bar-top .mystic-icon:nth-child(2) { animation-delay: 0.2s; }
.qotd-mystic-bar-top .mystic-icon:nth-child(3) { animation-delay: 0.4s; }
.qotd-mystic-bar-top .mystic-icon:nth-child(4) { animation-delay: 0.6s; }
.qotd-mystic-bar-top .mystic-icon:nth-child(5) { animation-delay: 0.8s; }
.qotd-mystic-bar-top .mystic-icon:nth-child(6) { animation-delay: 1s; }
.qotd-mystic-bar-top .mystic-icon:nth-child(7) { animation-delay: 1.2s; }
.qotd-mystic-bar-top .mystic-icon:nth-child(8) { animation-delay: 1.4s; }

.qotd-mystic-bar-bottom .mystic-icon:nth-child(1) { animation-delay: 0.3s; }
.qotd-mystic-bar-bottom .mystic-icon:nth-child(2) { animation-delay: 0.5s; }
.qotd-mystic-bar-bottom .mystic-icon:nth-child(3) { animation-delay: 0.7s; }
.qotd-mystic-bar-bottom .mystic-icon:nth-child(4) { animation-delay: 0.9s; }
.qotd-mystic-bar-bottom .mystic-icon:nth-child(5) { animation-delay: 1.1s; }
.qotd-mystic-bar-bottom .mystic-icon:nth-child(6) { animation-delay: 1.3s; }
.qotd-mystic-bar-bottom .mystic-icon:nth-child(7) { animation-delay: 1.5s; }
.qotd-mystic-bar-bottom .mystic-icon:nth-child(8) { animation-delay: 1.7s; }

.mystic-icon:hover {
    transform: scale(1.3) rotate(360deg);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1));
}

/* Enhanced QOTD Header with Mystic Bars */
.qotd-header {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    background: linear-gradient(
        180deg,
        rgba(139, 69, 19, 0.3) 0%,
        rgba(160, 82, 45, 0.2) 100%
    );
    position: relative;
    overflow: hidden;
}

.qotd-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.6) 20%,
        rgba(255, 215, 0, 0.8) 50%,
        rgba(255, 215, 0, 0.6) 80%,
        transparent 100%
    );
    animation: headerShimmer 3s ease-in-out infinite;
}

.qotd-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    animation: scrollPulse 2s ease-in-out infinite;
}

.qotd-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 1rem 0;
    font-family: 'Cinzel', 'Georgia', serif;
    letter-spacing: 2px;
}

.qotd-date {
    font-size: 1rem;
    color: rgba(255, 215, 0, 0.9);
    font-style: italic;
    margin-top: 0.75rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-family: 'Crimson Text', 'Georgia', serif;
}

/* Mystic Animations */
@keyframes mysticFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

@keyframes mysticPulseTop {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 215, 0, 0.9));
    }
}

@keyframes mysticPulseBottom {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 215, 0, 0.9));
    }
}

@keyframes scrollPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1));
    }
}

@keyframes headerShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Enhanced Rune Borders */
.rune-border {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem 0;
    background: linear-gradient(
        90deg,
        rgba(139, 69, 19, 0.2),
        rgba(160, 82, 45, 0.3),
        rgba(139, 69, 19, 0.2)
    );
}

.rune-border-top {
    border-bottom: 1px solid rgba(255, 215, 0, 0.4);
}

.rune-border-bottom {
    border-top: 1px solid rgba(255, 215, 0, 0.4);
}

.rune {
    font-size: 1.8rem;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
    animation: runeGlow 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.rune:nth-child(1) { animation-delay: 0s; }
.rune:nth-child(2) { animation-delay: 0.5s; }
.rune:nth-child(3) { animation-delay: 1s; }
.rune:nth-child(4) { animation-delay: 1.5s; }
.rune:nth-child(5) { animation-delay: 2s; }
.rune:nth-child(6) { animation-delay: 2.5s; }

.rune:hover {
    transform: scale(1.4) rotate(360deg);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1));
}

@keyframes runeGlow {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
    }
    50% {
        transform: scale(1.15) rotate(15deg);
        filter: drop-shadow(0 0 18px rgba(255, 215, 0, 1));
    }
}

/* Enhanced Parchment Look */
.qotd-parchment {
    background: 
        linear-gradient(
            180deg,
            rgba(245, 222, 179, 0.95) 0%,
            rgba(222, 184, 135, 0.98) 100%
        );
    padding: 2.5rem;
    margin: 1.5rem;
    border-radius: 8px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 40px rgba(139, 69, 19, 0.2),
        0 0 60px rgba(255, 215, 0, 0.3);
    position: relative;
}

.qotd-parchment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /><feColorMatrix values="0 0 0 0 0.4  0 0 0 0 0.2  0 0 0 0 0.1  0 0 0 1 0" /></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.05" /></svg>');
    border-radius: 8px;
    pointer-events: none;
}

/* Quote Text Styling */
.qotd-quote {
    margin: 0;
    padding: 0;
    border: none;
}

.qotd-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #2c1810;
    font-family: 'Crimson Text', 'Georgia', serif;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.qotd-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    color: #654321;
    font-weight: 600;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(101, 67, 33, 0.3);
}

.author-divider {
    color: #8b4513;
    font-size: 1.4rem;
}

cite {
    font-style: normal;
    color: #9b59b6;
    text-shadow: 
        0 0 15px rgba(155, 89, 182, 0.8),
        0 0 30px rgba(155, 89, 182, 0.6),
        0 0 45px rgba(155, 89, 182, 0.4),
        1px 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

/* Curated Badge */
.qotd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #654321;
    box-shadow: 
        0 4px 12px rgba(255, 215, 0, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.5);
    margin-left: 0.5rem;
    animation: badgePulse 2s ease-in-out infinite;
}

.badge-icon {
    font-size: 1rem;
    animation: badgeSpin 3s linear infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    }
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .qotd-mystic-bar {
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .mystic-icon {
        font-size: 1.2rem;
    }
    
    .qotd-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .qotd-text {
        font-size: 1.2rem;
        line-height: 1.6;
    }
    
    .rune {
        font-size: 1.4rem;
    }
    
    .qotd-parchment {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .qotd-mystic-bar {
        gap: 0.25rem;
    }
    
    .mystic-icon {
        font-size: 1rem;
    }
    
    .qotd-title {
        font-size: 1.3rem;
    }
    
    .qotd-text {
        font-size: 1.1rem;
    }
    
    .rune {
        font-size: 1.2rem;
    }
}
