/* ── Fortune Form Styles ──────────────────────────────────── */

.fortune-form-section {
    background: var(--bg-card, #1e1e2e);
    border: 1px solid var(--border-light, #2a2a3e);
    border-radius: 16px;
    padding: 28px 24px;
    margin: 24px 0;
}

.fortune-form-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.fortune-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    margin: 0 auto;
}

.fortune-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fortune-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #a0a0b8);
}

.fortune-field input,
.fortune-field select,
.fortune-field textarea {
    padding: 12px 16px;
    border: 1px solid var(--border, #3a3a4e);
    border-radius: 10px;
    background: var(--bg-input, #16161e);
    color: var(--text-primary, #e0e0f0);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.fortune-field input:focus,
.fortune-field select:focus,
.fortune-field textarea:focus {
    border-color: var(--accent, #7c6ef0);
    box-shadow: 0 0 0 3px rgba(124, 110, 240, 0.15);
}

.fortune-field textarea {
    min-height: 80px;
    resize: vertical;
}

.fortune-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .fortune-fields-row {
        grid-template-columns: 1fr;
    }
}

.fortune-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #7c6ef0, #c084fc);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: 4px;
}

.fortune-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 110, 240, 0.3);
}

.fortune-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Question Chips ── */

.fortune-question-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.fortune-chip {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--border, #3a3a4e);
    background: var(--bg-input, #16161e);
    color: var(--text-primary, #e0e0f0);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.fortune-chip:hover {
    border-color: rgba(236, 72, 153, 0.5);
    background: rgba(236, 72, 153, 0.08);
    transform: translateY(-1px);
}

.fortune-chip.active {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: #fff;
    border-color: #ec4899;
    box-shadow: 0 2px 12px rgba(236, 72, 153, 0.3);
}

.fortune-chip-custom {
    border-style: dashed;
}

.fortune-custom-question {
    margin-top: 10px;
    animation: fortuneFadeIn 0.3s ease;
}

/* ── Result Box — Premium Glow ── */

.fortune-result {
    display: none;
    position: relative;
    border-radius: 20px;
    padding: 32px 28px;
    margin: 28px 0;
    background: var(--bg-card, #1e1e2e);
    border: 1px solid transparent;
    background-clip: padding-box;
    animation: fortuneFadeIn 0.5s ease;
    overflow: hidden;
}

.fortune-result::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #06b6d4, #ec4899);
    background-size: 300% 300%;
    animation: fortuneGradientBorder 4s ease infinite;
    z-index: -1;
}

.fortune-result::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), rgba(139, 92, 246, 0.05), transparent);
    pointer-events: none;
}

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


@keyframes fortuneFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fortune-result-content {
    position: relative;
    z-index: 1;
}

.fortune-result-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 24px 0 12px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fortune-result-content h3:first-child {
    margin-top: 0;
}

.fortune-result-content p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary, #a0a0b8);
    margin-bottom: 10px;
}

.fortune-result-content strong {
    color: var(--text-primary, #e0e0f0);
    font-weight: 600;
}

.fortune-result-content ul,
.fortune-result-content ol {
    padding-left: 20px;
    margin-bottom: 14px;
}

.fortune-result-content li {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary, #a0a0b8);
    margin-bottom: 6px;
    padding-left: 4px;
}

/* ── Loading Animation ── */

.fortune-loading {
    text-align: center;
    padding: 40px 0;
}

.fortune-loading p {
    color: var(--text-tertiary, #666);
    font-size: 0.9rem;
    margin-top: 16px;
}

.fortune-loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.fortune-loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent, #7c6ef0);
    animation: fortuneDot 1.2s infinite;
}

.fortune-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.fortune-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes fortuneDot {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.fortune-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: fortuneSpin 0.6s linear infinite;
}

@keyframes fortuneSpin {
    to { transform: rotate(360deg); }
}

.fortune-error {
    color: #f87171 !important;
    text-align: center;
    font-weight: 600;
}
