/* Cosmic Cycle CSS - Deep integration with lunar phases */

/* Main container styling */
.cosmic-visualization-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 40px;
    position: relative;
    background: rgba(20, 20, 30, 0.8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    height: 800px;
    overflow: hidden;
    border: 1px solid rgba(104, 201, 138, 0.3);
}

/* SVG styling */
#cosmic-tree-svg {
    width: 100%;
    height: 100%;
}

/* Star animation */
.star {
    animation: twinkle var(--twinkle-duration, 3s) ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: var(--base-opacity, 0.5); transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Energy Flow Animation */
.energy-flow {
    animation: flow-dash var(--flow-duration, 4s) linear infinite;
}

@keyframes flow-dash {
    to { stroke-dashoffset: -100; }
}

/* Dragon Breath Animation */
#dragon-breath {
    animation: pulse-breath 3s ease-in-out infinite alternate;
}

@keyframes pulse-breath {
    0% { opacity: var(--base-opacity, 0.5); stroke-width: 5px; }
    100% { opacity: var(--max-opacity, 0.9); stroke-width: 10px; }
}

/* Guru Aura Animation */
#guru-aura-path {
    animation: pulse-aura 5s ease-in-out infinite alternate;
}

@keyframes pulse-aura {
    0% { opacity: var(--base-opacity, 0.4); transform: scale(0.95); }
    100% { opacity: var(--max-opacity, 0.8); transform: scale(1.05); }
}

/* Galaxies rotation animations */
.central-galaxy-arm1, 
.central-galaxy-arm2, 
.central-galaxy-arm3, 
.central-galaxy-arm4 {
    transform-origin: 500px 150px;
    animation: rotate-galaxy 50s linear infinite;
}

.central-galaxy-arm2 {
    animation-delay: -12.5s;
}

.central-galaxy-arm3 {
    animation-delay: -25s;
}

.central-galaxy-arm4 {
    animation-delay: -37.5s;
}

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

/* Energy particles */
.energy-particle {
    fill: #68c98a;
    r: 3;
    opacity: 0.7;
}

/* Phase-specific styling - affects all cosmic elements */
.cosmic-cycle-new-moon .energy-particle { fill: #306b44; }
.cosmic-cycle-waxing-crescent .energy-particle { fill: #40835a; }
.cosmic-cycle-first-quarter .energy-particle { fill: #50a670; }
.cosmic-cycle-waxing-gibbous .energy-particle { fill: #60c99a; }
.cosmic-cycle-full-moon .energy-particle { fill: #68f9d4; }
.cosmic-cycle-waning-gibbous .energy-particle { fill: #60c99a; }
.cosmic-cycle-third-quarter .energy-particle { fill: #50a670; }
.cosmic-cycle-waning-crescent .energy-particle { fill: #40835a; }

/* Lunar phase cycle diagram */
.lunar-phase-diagram {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
}

.lunar-phase-diagram::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(104, 201, 138, 0.3);
    z-index: 1;
}

.phase-marker {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.phase-marker-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2c3e50;
    border: 2px solid rgba(104, 201, 138, 0.5);
    transition: all 0.3s ease;
}

.phase-marker.active .phase-marker-dot {
    background: #68c98a;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(104, 201, 138, 0.7);
}

.phase-marker-label {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #aaa;
    text-align: center;
}

.phase-marker.active .phase-marker-label {
    color: #68c98a;
    font-weight: bold;
}

/* Trending topics cloud */
.trending-topics-cloud {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.topic-bubble {
    background: rgba(104, 201, 138, 0.2);
    border: 1px solid rgba(104, 201, 138, 0.4);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.topic-bubble:hover {
    background: rgba(104, 201, 138, 0.4);
    transform: translateY(-3px);
}