:root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-heaven: #f8e71c; /* Gold */
    --accent-hell: #d0021b;   /* Red */
    --font-main: 'Cinzel', serif;
    --font-display: 'UnifrakturMaguntia', cursive;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    transition: background-color 2s ease;
}

#world {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Let clicks pass through to UI if needed, but we might want canvas interaction */
}

#ui-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    pointer-events: none; /* Allow clicks on canvas background */
}

#ui-container > * {
    pointer-events: auto; /* Re-enable clicks on UI elements */
}

.title {
    font-family: var(--font-display);
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    opacity: 0.9;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.7;
    max-width: 600px;
}

/* Form Styles */
#judgment-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 500px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1.2rem;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

button {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 1rem 3rem;
    font-family: var(--font-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Verdict Display */
#verdict-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

#verdict-title {
    font-family: var(--font-display);
    font-size: 6rem;
    margin: 0 0 2rem 0;
    text-shadow: 0 0 50px currentColor;
    animation: pulse 2s infinite;
}

/* Heaven Theme overrides */
body.heaven {
    --bg-color: #f0f4f8; /* Light Blue-ish White */
    --text-color: #1a1a1a;
}
body.heaven .title, body.heaven .subtitle {
    color: #1a1a1a;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}
body.heaven #verdict-title {
    color: var(--accent-heaven); /* Gold */
}
body.heaven button {
    border-color: #1a1a1a;
    color: #1a1a1a;
}
body.heaven button:hover {
    background: rgba(0,0,0,0.05);
}

/* Hell Theme overrides */
body.hell {
    --bg-color: #0a0000; /* Deep Black/Red */
    --text-color: #ff4d4d;
}
body.hell #verdict-title {
    color: var(--accent-hell);
    animation: shake 0.5s infinite;
}
body.hell button {
    border-color: var(--accent-hell);
    color: var(--accent-hell);
}
body.hell button:hover {
    background: rgba(208, 2, 27, 0.1);
    box-shadow: 0 0 30px rgba(208, 2, 27, 0.4);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.95); }
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}
