/* --- 解牌结果与 AI 排版样式 --- */

/* 面板容器 */
#result-panel {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 1s;
    backdrop-filter: blur(10px);
    z-index: 150;
    padding: var(--safe-top) 0 var(--safe-bottom) 0;
}

/* 内容区域 */
#result-content {
    width: 90%; /* 移动端默认宽度 */
    max-width: 800px; /* 桌面端最大宽度 */
    max-height: 85%;
    overflow-y: auto; overflow-x: hidden;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.95) 0%, rgba(20, 15, 25, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(212, 175, 55, 0.05);
    padding: 40px; border-radius: 4px;
    -webkit-overflow-scrolling: touch;
}

/* 桌面端优化 */
@media (min-width: 768px) {
    #result-content { width: 70%; padding: 50px 60px; }
}

/* 移动端优化 */
@media (max-width: 480px) {
    #result-content { padding: 25px 20px; width: 95%; max-height: 90%; }
}

/* 滚动条 */
#result-content::-webkit-scrollbar { width: 4px; }
#result-content::-webkit-scrollbar-track { background: #0a0a0a; }
#result-content::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* 卡牌预览容器 */
.card-reveal {
    display: flex; justify-content: center; gap: 20px;
    margin-bottom: 30px; flex-wrap: wrap; /* 允许换行 */
}

/* 单张卡牌包装器 */
.ui-card-wrapper {
    display: flex; flex-direction: column; align-items: center;
    width: 90px;
    animation: fadeIn 1s ease-in-out;
}
.ui-card-img {
    width: 100%; height: auto;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.5);
    margin-bottom: 8px;
}
.ui-card-label {
    font-size: 11px; color: var(--primary); text-align: center; font-family: "Cinzel", serif;
    line-height: 1.2;
}

/* 移动端缩小卡牌预览 */
@media (max-width: 400px) {
    .card-reveal { gap: 10px; }
    .ui-card-wrapper { width: 75px; }
}

/* AI 文本排版 */
#ai-text {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", serif;
    color: #e0e0e0; line-height: 1.7; font-size: 14px;
    letter-spacing: 0.02em; text-align: justify;
}
@media (min-width: 768px) {
    #ai-text { font-size: 16px; line-height: 1.8; }
}

#ai-text h3 {
    font-family: "Cinzel", serif; color: var(--primary);
    font-size: 18px; font-weight: 400;
    margin-top: 30px; margin-bottom: 15px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    display: flex; align-items: center;
}
#ai-text h3::before { content: '◈'; margin-right: 8px; font-size: 12px; opacity: 0.8; }

#ai-text p { margin-bottom: 15px; opacity: 0.9; }
#ai-text strong {
    color: #fff; font-weight: 600;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.5);
}

/* 引用块 */
#ai-text blockquote {
    margin: 25px 0; padding: 15px 20px;
    background: rgba(212, 175, 55, 0.05); border-left: 3px solid var(--primary);
    font-style: italic; color: #f0e6d2; position: relative;
}

/* 光标 */
.typing-cursor::after {
    content: '▋'; display: inline-block; vertical-align: middle;
    color: var(--primary); animation: blink 1s step-end infinite; margin-left: 4px; font-size: 14px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }