:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --accent-color: #505050;
    --highlight-color: #ffffff;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --input-bg: rgba(255, 255, 255, 0.03);
    --input-border: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.8s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    transition: background-color 2s ease;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#app {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Typography */
h1 {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 3rem;
    letter-spacing: 0.2em;
    text-align: center;
    margin-bottom: 4rem;
    margin-top: -2rem;
    /* Move title up */
    opacity: 0.9;
    text-transform: lowercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Backgrounds */
.bg-mudang {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9)), url('assets/mudang.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.bg-oracle {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9)), url('assets/oracle.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.bg-curandera {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9)), url('assets/curandera.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.bg-miko {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9)), url('assets/miko.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.bg-wu {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9)), url('assets/wu.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}



label {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--highlight-color);
    opacity: 0.8;
}

/* Inputs */
.input-group {
    margin-bottom: 3rem;
    position: relative;
}

textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 4px;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

textarea:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.mystic-button {
    display: block;
    margin: 0 auto;
    background: transparent;
    border: 1px solid var(--input-border);
    color: var(--text-color);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    padding: 0.8rem 3rem;
    cursor: pointer;
    letter-spacing: 0.1em;
    transition: all 0.5s ease;
    text-transform: uppercase;
}

.mystic-button:hover {
    border-color: var(--highlight-color);
    background: rgba(255, 255, 255, 0.05);
    letter-spacing: 0.2em;
}



/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn var(--transition-speed) ease forwards;
}

.delay-1 {
    animation-delay: 0.5s;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Result Section */
#explanation-content {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 3rem;
    white-space: pre-wrap;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--highlight-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

    100% {
        transform: rotate(360deg);
    }
}

#loading-text {
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    opacity: 0.7;
}