/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Zen+Kurenaido&display=swap');

:root {
    --bg-color: #020205;
    /* Deep night black */
    --text-color: #f0f0f0;
    --fire-core: #fff5cc;
    --fire-inner: #ffcc00;
    --fire-mid: #ff6600;
    --fire-outer: #ff2200;
    --wood-color: #4a3b2a;
    --ash-color: #333;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 80%, #1a0a05 0%, #000 70%);
    color: var(--text-color);
    font-family: 'Zen Kurenaido', sans-serif;
    /* Handwriting style for letters */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Bonfire Container */
#bonfire-container {
    position: relative;
    width: 200px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255, 69, 0, 0.3));
    z-index: 5;
}

/* Logs */
.logs {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
}

.log {
    width: 80px;
    height: 25px;
    background: var(--wood-color);
    border-radius: 10px;
    position: absolute;
    bottom: 5px;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.log:nth-child(1) {
    transform: rotate(15deg) translate(10px, -5px);
}

.log:nth-child(2) {
    transform: rotate(-15deg) translate(-10px, -5px);
}

.log:nth-child(3) {
    transform: rotate(90deg) scale(0.6);
    bottom: 10px;
    background: var(--ash-color);
}

/* Flames */
.fire-wrapper {
    position: absolute;
    bottom: 20px;
    width: 100px;
    height: 100px;
}

.flame {
    position: absolute;
    bottom: 0;
    left: 50%;
    border-radius: 50% 0 50% 50%;
    transform: translateX(-50%) rotate(45deg);
    opacity: 0.8;
}

.flame.main {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 70%, var(--fire-core), var(--fire-inner), var(--fire-mid));
    animation: burn 3s infinite ease-in-out;
    box-shadow: 0 0 30px var(--fire-outer);
}

.flame.middle {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--fire-inner), var(--fire-outer));
    bottom: 10px;
    animation: burn 2s infinite ease-in-out reverse;
    opacity: 0.9;
}

.flame.top {
    width: 20px;
    height: 20px;
    background: var(--fire-core);
    bottom: 30px;
    animation: burn 1.5s infinite ease-in-out;
}

/* Glow */
.glow {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 100, 0, 0.4) 0%, transparent 70%);
    animation: pulse 4s infinite ease-in-out;
}

@keyframes burn {
    0% {
        transform: translateX(-50%) rotate(45deg) scale(1);
        opacity: 0.8;
        border-radius: 50% 0 50% 50%;
    }

    25% {
        transform: translateX(-51%) rotate(42deg) scale(1.1);
        border-radius: 50% 5% 50% 50%;
    }

    50% {
        transform: translateX(-50%) rotate(45deg) scale(0.9);
        opacity: 1;
    }

    75% {
        transform: translateX(-49%) rotate(48deg) scale(1.05);
        border-radius: 50% 0 55% 50%;
    }

    100% {
        transform: translateX(-50%) rotate(45deg) scale(1);
        opacity: 0.8;
        border-radius: 50% 0 50% 50%;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1.1);
    }
}

/* Sparks/Messages */
#messages-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.message-spark {
    position: absolute;
    color: var(--fire-core);
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 5px var(--fire-mid), 0 0 10px var(--fire-outer);
    white-space: nowrap;
    opacity: 0;
    user-select: none;
    will-change: transform, opacity;
}

/* Form Area */
#input-area {
    position: absolute;
    bottom: 50px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
}

input[type="text"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 12px 25px;
    width: 80%;
    max-width: 400px;
    color: #fff;
    font-family: 'Zen Kurenaido', sans-serif;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--fire-mid);
    box-shadow: 0 0 15px rgba(255, 100, 0, 0.3);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#status-msg {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--fire-mid);
    height: 1.2em;
    /* Reserve space */
    opacity: 0;
    transition: opacity 0.5s;
}