/**
 * DIVINE SCRIPT STYLES
 * Mystical text effects with guardian-specific themes
 */

/* ===================================
   BASE DIVINE TEXT
   =================================== */
.divine-text {
    font-family: serif;
    letter-spacing: 0.3em;
    position: relative;
    display: block; /* Force line break for block-level elements */
    transition: all 0.5s ease;
    font-size: 0.85em; /* Reduce size for runes */
}

/* For inline elements like spans */
span.divine-text {
    display: inline-block;
}

/* No tooltips - users must embrace the mystery of runes */

/* ===================================
   THALVYN STYLE (Water/Tide)
   =================================== */
.divine-thalvyn {
    color: #4fc3f7;
    text-shadow: 
        0 0 10px rgba(79, 195, 247, 0.5),
        0 0 20px rgba(79, 195, 247, 0.3);
}

.divine-thalvyn:hover {
    color: #81d4fa;
    text-shadow: 
        0 0 15px rgba(79, 195, 247, 0.8),
        0 0 30px rgba(79, 195, 247, 0.5),
        0 0 45px rgba(79, 195, 247, 0.3);
    animation: waterFlow 3s ease-in-out infinite;
}

.divine-thalvyn::after {
    background: linear-gradient(135deg, rgba(0, 32, 48, 0.95), rgba(0, 48, 64, 0.95));
    color: #4fc3f7;
    border: 1px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.3);
}

/* Water flow animation */
@keyframes waterFlow {
    0%, 100% {
        text-shadow: 
            0 0 15px rgba(79, 195, 247, 0.8),
            0 0 30px rgba(79, 195, 247, 0.5);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(79, 195, 247, 0.9),
            0 0 40px rgba(79, 195, 247, 0.6),
            0 0 60px rgba(79, 195, 247, 0.4);
    }
}

/* ===================================
   VARKHAL STYLE (Fire/Forge)
   =================================== */
.divine-varkhal {
    color: #ff9800;
    text-shadow: 
        0 0 10px rgba(255, 152, 0, 0.5),
        0 0 20px rgba(255, 152, 0, 0.3);
}

.divine-varkhal:hover {
    color: #ffb74d;
    text-shadow: 
        0 0 15px rgba(255, 152, 0, 0.8),
        0 0 30px rgba(255, 152, 0, 0.5),
        0 0 45px rgba(255, 152, 0, 0.3);
    animation: forgeFlicker 2s ease-in-out infinite;
}

.divine-varkhal::after {
    background: linear-gradient(135deg, rgba(48, 16, 0, 0.95), rgba(64, 24, 0, 0.95));
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.3);
}

/* Forge flicker animation */
@keyframes forgeFlicker {
    0%, 100% {
        text-shadow: 
            0 0 15px rgba(255, 152, 0, 0.8),
            0 0 30px rgba(255, 152, 0, 0.5);
    }
    25% {
        text-shadow: 
            0 0 20px rgba(255, 152, 0, 0.9),
            0 0 40px rgba(255, 152, 0, 0.6);
    }
    50% {
        text-shadow: 
            0 0 25px rgba(255, 152, 0, 1),
            0 0 50px rgba(255, 152, 0, 0.7);
    }
    75% {
        text-shadow: 
            0 0 18px rgba(255, 152, 0, 0.85),
            0 0 35px rgba(255, 152, 0, 0.55);
    }
}

/* ===================================
   NEUTRAL STYLE (General mystical)
   =================================== */
.divine-neutral {
    color: #d4af37;
    text-shadow: 
        0 0 10px rgba(212, 175, 55, 0.5),
        0 0 20px rgba(212, 175, 55, 0.3);
}

.divine-neutral:hover {
    color: #e6c863;
    text-shadow: 
        0 0 15px rgba(212, 175, 55, 0.8),
        0 0 30px rgba(212, 175, 55, 0.5),
        0 0 45px rgba(212, 175, 55, 0.3);
}

/* ===================================
   DECRYPTION ANIMATION
   =================================== */
@keyframes decrypt {
    0% {
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

.divine-text.decrypting {
    animation: decrypt 0.5s ease-out;
}

.divine-text.decrypted {
    letter-spacing: normal;
    cursor: default;
}

.divine-text.decrypted::after,
.divine-text.decrypted::before {
    display: none;
}

/* ===================================
   SPECIAL EFFECTS
   =================================== */

/* Pulse effect for important divine text */
.divine-pulse {
    animation: divinePulse 4s ease-in-out infinite;
}

@keyframes divinePulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Floating effect for titles */
.divine-float {
    animation: divineFloat 6s ease-in-out infinite;
}

@keyframes divineFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .divine-text {
        letter-spacing: 0.2em;
        font-size: 0.95em;
    }
    
    .divine-text::after {
        font-size: 0.75em;
        padding: 0.4rem 0.8rem;
        max-width: 80vw;
        white-space: normal;
        text-align: center;
    }
    
    /* On mobile, show translation on tap */
    .divine-text:active::after {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    
    .divine-text:active::before {
        opacity: 1;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .divine-text,
    .divine-text:hover {
        animation: none !important;
        transition: none !important;
    }
}

/* Screen reader only */
.divine-text[aria-label]::after {
    content: attr(aria-label);
}