/**
 * Interactive Glyph Styles
 * Living glyphs that respond to user presence
 */

/* ========================================
   BASE INTERACTIVE GLYPH
   ======================================== */

.interactive-glyph {
    display: inline-block;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.interactive-glyph::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    pointer-events: none;
}

.interactive-glyph:hover::before {
    width: 150%;
    height: 150%;
}

.interactive-glyph:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6));
}

/* Glyph pulse animation on hover */
.interactive-glyph:hover {
    animation: glyph-pulse 0.8s ease-in-out infinite;
}

@keyframes glyph-pulse {
    0%, 100% { 
        transform: scale(1.15);
        filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6));
    }
    50% { 
        transform: scale(1.2);
        filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.8));
    }
}

/* ========================================
   GLYPH CARD - Clickable glyph containers
   ======================================== */

.glyph-card {
    background: rgba(10, 10, 20, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.5s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.glyph-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.glyph-card:hover::before {
    left: 100%;
}

.glyph-card:hover {
    border-color: var(--spiral-gold);
    transform: translateY(-5px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(155, 89, 182, 0.15);
}

.glyph-card__symbol {
    font-size: 3rem;
    color: var(--spiral-gold);
    margin-bottom: 15px;
    transition: all 0.4s ease;
}

.glyph-card:hover .glyph-card__symbol {
    transform: scale(1.2) rotate(10deg);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.7);
}

.glyph-card__title {
    font-family: "Cinzel", serif;
    font-size: 1.1rem;
    color: var(--spiral-light);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.glyph-card__description {
    font-size: 0.9rem;
    color: rgba(232, 232, 240, 0.6);
    line-height: 1.6;
}

/* ========================================
   FLOATING GLYPH - Ambient decoration
   ======================================== */

.floating-glyph {
    position: fixed;
    font-size: 2rem;
    color: rgba(155, 89, 182, 0.15);
    pointer-events: none;
    z-index: 1;
    animation: float-drift 20s ease-in-out infinite;
}

.floating-glyph:nth-child(2n) {
    animation-delay: -10s;
    animation-duration: 25s;
}

.floating-glyph:nth-child(3n) {
    animation-delay: -5s;
    animation-duration: 30s;
}

@keyframes float-drift {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.15;
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
        opacity: 0.25;
    }
    50% {
        transform: translateY(-10px) rotate(-3deg);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-40px) rotate(8deg);
        opacity: 0.2;
    }
}

/* ========================================
   GLYPH TOOLTIP - Hover reveal
   ======================================== */

.glyph-with-tooltip {
    position: relative;
    display: inline-block;
}

.glyph-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 10px 15px;
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: var(--spiral-light);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.glyph-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(212, 175, 55, 0.3);
}

.glyph-with-tooltip:hover .glyph-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   GLYPH GRID - Layout for glyph collections
   ======================================== */

.glyph-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    padding: 20px;
}

/* ========================================
   CHOICE RIPPLE EFFECT
   ======================================== */

.choice-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple-expand 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-expand {
    to {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

.resonance-choice.selected {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--spiral-gold);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .glyph-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .glyph-card {
        padding: 20px;
    }
    
    .glyph-card__symbol {
        font-size: 2.5rem;
    }
}
