/* Custom Styles for Plum Blossom AI */

/* Background Texture */
body {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Hexagram Lines */
.yang-line {
    width: 100%;
    height: 12px;
    background-color: currentColor;
    border-radius: 2px;
}

.yin-line {
    width: 100%;
    height: 12px;
    display: flex;
    justify-content: space-between;
}

.yin-line::before,
.yin-line::after {
    content: '';
    width: 42%;
    height: 100%;
    background-color: currentColor;
    border-radius: 2px;
}

/* Moving Line Indicator */
.moving-line-indicator {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #C0392B; /* Vermilion */
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(192, 57, 43, 0.5);
}

.hexagram-container {
    position: relative;
    width: 120px;
    margin: 0 auto;
}

.hex-line-wrapper {
    position: relative;
    width: 100%;
    color: #2C3E50; /* Ink */
    transition: color 0.3s ease;
}

.hex-line-wrapper.moving {
    color: #C0392B; /* Vermilion for moving line */
}

.hex-line-wrapper.changed {
    color: #16A085; /* Jade for changed line */
}

/* Markdown Styles Override */
.prose strong {
    color: #C0392B;
    font-weight: 600;
}

.prose blockquote {
    border-left-color: #C0392B;
    background-color: rgba(192, 57, 43, 0.05);
    padding: 0.5rem 1rem;
    font-style: italic;
}

/* Modal Animation */
#apiKeyModal:not(.hidden) {
    display: flex;
    animation: fadeIn 0.3s ease-out forwards;
}

#apiKeyModal.opacity-100 {
    opacity: 1;
}

#apiKeyModal .transform {
    transform: scale(1);
}
