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

body {
    font-family: 'Cinzel', serif;
    overflow: hidden;
    height: 100vh;
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(80, 140, 130, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(60, 120, 110, 0.3) 0%, transparent 40%),
        linear-gradient(180deg, #2a6b65 0%, #1d5550 25%, #18504a 50%, #134540 75%, #0e3a35 100%);
}

.ceiling-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.ceiling {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.arcs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    z-index: 1;
}

.arc {
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.8));
    animation: arcGlow 3s ease-in-out infinite alternate;
    stroke-linecap: round;
}

.arc-1 {
    animation-delay: 0s;
}

.arc-2 {
    animation-delay: 1.5s;
}

@keyframes arcGlow {
    0% {
        opacity: 0.6;
        filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.6));
    }
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.9));
    }
}

/* Round input containers - all same size */
.input-container {
    position: absolute;
    z-index: 10;
    width: 60px;
    height: 60px;
}

.input-container.top-left {
    top: 10%;
    left: 8%;
    width: 60px;
    height: 60px;
}

/* Roman numeral labels */
.input-container::before {
    content: attr(data-numeral);
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(212, 175, 55, 0.5);
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
    white-space: nowrap;
    pointer-events: none;
}

/* Character input - mystical styling */
.char-input {
    width: 100%;
    height: 100%;
    padding: 0;
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    background: rgba(45, 90, 85, 0.85);
    border: 2px solid rgba(212, 175, 55, 0.6);
    border-radius: 50%;
    color: #D4AF37;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(42, 107, 101, 0.5);
    transition: all 0.3s ease;
    outline: none;
    caret-color: #D4AF37;
}

.char-input:focus {
    transform: scale(1.15);
    background: rgba(42, 107, 101, 0.95);
    box-shadow: 
        0 6px 24px rgba(212, 175, 55, 0.4),
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 0 20px rgba(42, 107, 101, 0.5);
    border-color: #D4AF37;
}

.char-input::placeholder {
    color: rgba(212, 175, 55, 0.3);
    font-size: 20px;
}

/* Stars container */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    background: #D4AF37;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Poem container - hidden by default */
.poem-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease-in-out;
}

.poem {
    text-align: center;
    max-width: 800px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.poem p {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 400;
    color: #D4AF37;
    line-height: 1.8;
    margin-bottom: 12px;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    opacity: 0;
    transform: translateY(20px);
    letter-spacing: 2px;
}

/* Revealed state */
.ceiling.revealed .poem-container {
    opacity: 1;
    pointer-events: auto;
}

.ceiling.revealed .poem p {
    animation: fadeInUp 1.2s ease-out forwards;
}

.ceiling.revealed .poem p:nth-child(1) { animation-delay: 0.8s; }
.ceiling.revealed .poem p:nth-child(2) { animation-delay: 1.6s; }
.ceiling.revealed .poem p:nth-child(3) { animation-delay: 2.4s; }

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

/* Fade out inputs and arcs on reveal */
.ceiling.revealed .input-container {
    opacity: 0;
    transition: opacity 1s ease-out;
    pointer-events: none;
}

.ceiling.revealed .arcs {
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

/* Stars glow fast on reveal */
.ceiling.revealed .star {
    animation: twinkleFast 0.5s ease-in-out infinite !important;
    background: #FFD700 !important;
    box-shadow: 0 0 8px #FFD700, 0 0 16px #D4AF37;
}

@keyframes twinkleFast {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .input-container,
    .input-container.top-left {
        width: 50px;
        height: 50px;
    }
    
    .char-input {
        font-size: 18px;
    }
    
    .input-container::before {
        font-size: 9px;
        bottom: -18px;
    }
}
