:root {
    --volcano-red: #8b0000;
    --lava-orange: #ff4500;
    --obsidian: #0a0a0a;
    --text-gold: #fff176;
}

body {
    font-family: "Georgia", serif;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(
        135deg,
        #0a0a0a,
        #2b0000,
        #4d0000,
        #0a0a0a
    );
    background-size: 400% 400%;
    animation: lavaFlow 12s ease infinite;
    color: white;
    overflow: hidden;
}

@keyframes lavaFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#header {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    width: 100%;
    border-bottom: 2px solid var(--lava-orange);
    backdrop-filter: blur(10px);
}

#char-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--lava-orange);
    box-shadow: 0 0 15px var(--volcano-red);
}

#chat-box {
    width: 90%;
    max-width: 500px;
    flex-grow: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
}

.bubble {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 1.05rem;
}

.ai {
    background: rgba(139, 0, 0, 0.4);
    border-left: 4px solid var(--lava-orange);
    color: var(--text-gold);
    align-self: flex-start;
}

.user {
    background: rgba(255, 255, 255, 0.1);
    text-align: right;
    border-right: 4px solid #666;
    align-self: flex-end;
    color: white;
}

#input-area {
    width: 90%;
    max-width: 500px;
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}

input {
    flex-grow: 1;
    padding: 12px;
    border-radius: 20px;
    border: 1.5px solid var(--volcano-red);
    background: #111;
    color: white;
    outline: none;
}

button {
    background: var(--volcano-red);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

#typing-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.glow-text {
    font-size: 2.5rem;
    color: var(--text-gold);
    text-shadow: 0 0 20px var(--lava-orange);
    animation: pulseGlow 1.5s ease-in-out infinite;
    font-weight: bold;
    letter-spacing: 3px;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
        text-shadow: 0 0 10px var(--lava-orange);
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
        text-shadow: 0 0 30px var(--lava-orange), 0 0 50px var(--text-gold);
    }
}

footer {
    font-size: 0.75rem;
    color: #888;
    padding-bottom: 10px;
}
