/* Base styling */
:root {
    --gold: #fbbf24;
    --deep-blue: #1e3a8a;
    --purple: #9333ea;
    --dark: #111111;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: black;
    overflow-x: hidden;
}

.font-playfair {
    font-family: 'Noto Serif SC', 'Playfair Display', serif;
}

.font-geist-mono {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'Liberation Mono', Menlo, monospace;
}

/* Background pattern */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/background-pattern.svg');
    background-size: cover;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

/* Glass card effect */
.glass-card {
    background: linear-gradient(145deg, rgba(30, 30, 46, 0.7), rgba(10, 10, 20, 0.7));
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Lotus icon */
.lotus-icon {
    background-image: url('assets/lotus.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Bagua spinner */
.bagua-spinner {
    width: 80px;
    height: 80px;
    background-image: url('assets/bagua.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    animation: spin 12s linear infinite;
}

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

.celestial-loading {
    position: relative;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(59, 30, 98, 0.4) 0%, rgba(10, 10, 20, 0) 70%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.celestial-loading::before,
.celestial-loading::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(251, 191, 36, 0.3);
    animation: orbit 8s linear infinite;
}

.celestial-loading::before {
    animation-duration: 12s;
}

.celestial-loading::after {
    width: 80%;
    height: 80%;
    animation-duration: 8s;
    animation-direction: reverse;
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(10px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(10px) rotate(-360deg);
    }
}

/* Hexagram styling */
.hexagram-line {
    width: 50px;
    height: 6px;
    margin: 6px 0;
    background-color: var(--gold);
    border-radius: 3px;
}

.hexagram-line.broken {
    width: 22px;
    position: relative;
}

.hexagram-line.broken::after {
    content: '';
    position: absolute;
    right: -28px;
    top: 0;
    width: 22px;
    height: 6px;
    background-color: var(--gold);
    border-radius: 3px;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.fade-in-delay-0 {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.1s forwards;
}

.fade-in-delay-1 {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.5s forwards;
}

.fade-in-delay-3 {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.7s forwards;
}

.fade-in-delay-4 {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.9s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Celestial chart */
#celestial-chart {
    background: radial-gradient(circle, rgba(59, 30, 98, 0.2) 0%, rgba(10, 10, 20, 0) 70%);
    border-radius: 50%;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.planet {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px currentColor;
}

.planet-sun {
    background-color: #fbbf24;
    color: #fbbf24;
    width: 16px;
    height: 16px;
}

.planet-moon {
    background-color: #e5e7eb;
    color: #e5e7eb;
}

.planet-mercury {
    background-color: #93c5fd;
    color: #93c5fd;
    width: 8px;
    height: 8px;
}

.planet-venus {
    background-color: #fcd34d;
    color: #fcd34d;
}

.planet-mars {
    background-color: #ef4444;
    color: #ef4444;
}

.planet-jupiter {
    background-color: #f59e0b;
    color: #f59e0b;
    width: 14px;
    height: 14px;
}

.planet-saturn {
    background-color: #a8a29e;
    color: #a8a29e;
}

.planet-line {
    position: absolute;
    height: 1px;
    transform-origin: 0% 50%;
    background: linear-gradient(to right, rgba(251, 191, 36, 0.5), transparent);
    z-index: -1;
}

/* For small screens */
@media (max-width: 768px) {
    .bagua-spinner {
        width: 60px;
        height: 60px;
    }
    
    .celestial-loading {
        width: 100px;
        height: 100px;
    }
    
    .hexagram-line {
        width: 40px;
        height: 5px;
        margin: 5px 0;
    }
    
    .hexagram-line.broken {
        width: 18px;
    }
    
    .hexagram-line.broken::after {
        right: -22px;
        width: 18px;
        height: 5px;
    }
}

/* Element bars animation */
@keyframes growBar {
    from { width: 0%; }
}

#wood-bar, #fire-bar, #earth-bar, #metal-bar, #water-bar {
    animation: growBar 1.5s ease-out forwards;
}

/* Decision recommendation card styling */
#decision-recommendations li {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#decision-recommendations li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#decision-recommendations details summary {
    padding: 0.5rem 0;
    font-weight: 500;
    cursor: pointer;
}

#decision-recommendations details[open] summary {
    margin-bottom: 0.5rem;
}
