/* ── Crystal Ball Container ── */
.crystal-ball-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 15px;
    max-width: 540px;
    margin: 0 auto;
    width: calc(100% - 30px);
}

/* ── Crystal Ball ── */
.crystal-ball {
    position: relative;
    width: 100%;
    max-width: 540px;
    height: auto;
    margin: 0 auto;
}

.crystal-ball img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 0;
}

.crystal-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: #333;
    text-align: center;
    font-size: clamp(14px, 2.5vw, 18px);
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
    padding: 20%;
    pointer-events: none;
}

/* ── Clouds ── */
.clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 15%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    opacity: 0.8;
    mix-blend-mode: overlay;
}

/* ── Input + Button compound row ── */
.input-row {
    display: flex;
    width: 100%;
    max-width: 520px;
    gap: 0;
    margin-bottom: 0;
}

.question-input {
    flex: 1;
    height: 44px;
    padding: 0 1rem;
    font-size: 0.95rem;
    border: 1px solid #4169A8;
    border-right: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    color: #333;
    background: #fff;
    margin-bottom: 0;
}

.question-input::placeholder {
    color: #aaa;
    font-style: italic;
}

.question-input:focus {
    border-color: #4169A8;
    box-shadow: inset 0 0 0 1px rgba(65,105,168,0.2);
}

/* ── Button ── */
.ask-crystal-ball {
    height: 44px;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: #4169A8;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
    max-width: none;
}

.ask-crystal-ball:hover {
    background: #305090;
}

.ask-crystal-ball:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Text / Lore Container ── */
.text-container {
    max-width: 1200px;
    width: calc(100% - 30px);
    margin: 30px auto;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    padding: 0 15px;
}

.text-container .lore-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 2rem;
}

.lore-block strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 0.4rem;
}

.lore-block p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* ── Disclaimer ── */
.text-container .disclaimer {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.6;
    margin: 0;
}

/* ── Animations ── */
@keyframes cloudFloat {
    0%   { transform: translate(0, 0) rotate(0deg); }
    50%  { transform: translate(5px, 5px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ── Mobile ≤ 768px ── */
@media (max-width: 768px) {
    .text-container {
        width: calc(100% - 40px);
        padding: 0 20px;
    }

    .text-container .lore-grid {
        grid-template-columns: 1fr;
    }

    .crystal-ball {
        width: 100%;
    }

    .crystal-content {
        padding: 15%;
        font-size: clamp(12px, 3vw, 16px);
        left: 0;
        right: 0;
        margin: 0 auto;
    }

    .input-row {
        max-width: 100%;
    }

    .ask-crystal-ball {
        font-size: 14px;
        padding: 0 1rem;
    }

    .question-input {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .crystal-content {
        padding: 12%;
        font-size: 12px;
    }
}
