/* =========================================================================
   灵签模块样式
   ========================================================================= */

/* ---------- 签种卡片 ---------- */
.lq-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.lq-type-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
    position: relative;
}
.lq-type-card:hover {
    border-color: var(--mn-primary, #0066cc);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, .1);
}
.lq-type-card.is-drawn {
    background: linear-gradient(135deg, #f0fdf4 0%, var(--mn-bg-card, #fff) 60%);
    border-color: #86efac;
}
.lq-type-emoji {
    flex: 0 0 56px;
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    background: var(--mn-primary-subtle, #e8f1fb);
    border-radius: 12px;
}
.lq-type-body { flex: 1; min-width: 0; }
.lq-type-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--mn-text, #333);
    margin-bottom: 4px;
    letter-spacing: .5px;
}
.lq-type-desc {
    font-size: 12px;
    color: var(--mn-text-muted, #888);
    line-height: 1.6;
    margin-bottom: 6px;
}
.lq-type-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--mn-text-muted, #888);
}
.lq-type-meta .lq-type-ready {
    color: var(--mn-primary, #0066cc);
    font-weight: 700;
}
.lq-type-meta .lq-type-drawn {
    color: #16a34a;
    font-weight: 700;
}

/* ---------- 求签须知 ---------- */
.lq-notice {
    padding: 16px 20px;
    background: var(--mn-bg-page, #fafbfc);
    border: 1px dashed var(--mn-border, #e5e7eb);
    border-radius: 10px;
}
.lq-notice strong {
    display: block;
    font-size: 14px;
    color: var(--mn-primary, #0066cc);
    margin-bottom: 8px;
}
.lq-notice ul {
    padding-left: 20px;
    margin: 0;
    line-height: 2;
    font-size: 13px;
    color: var(--mn-text, #333);
}

/* ---------- 抽签盒 ---------- */
.lq-draw-box {
    padding: 40px 20px;
    background: linear-gradient(180deg, var(--mn-primary-subtle, #e8f1fb) 0%, var(--mn-bg-card, #fff) 100%);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 16px;
    margin: 20px 0;
    text-align: center;
}
.lq-draw-inner {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.lq-draw-emoji {
    font-size: 72px;
    line-height: 1;
    animation: lq-float 3s ease-in-out infinite;
}
@keyframes lq-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.lq-draw-hint {
    font-size: 14px;
    line-height: 1.9;
    color: var(--mn-text, #333);
}
.lq-draw-hint p { margin: 0; }
.lq-draw-btn {
    padding: 14px 44px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(220, 38, 38, .3);
    transition: all .25s;
}
.lq-draw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(220, 38, 38, .4);
}
.lq-draw-btn:active { transform: translateY(0); }
.lq-draw-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.lq-draw-tip {
    font-size: 12px;
    color: var(--mn-text-muted, #888);
    margin: 0;
}

/* ---------- 抽签结果 ---------- */
.lq-result {
    padding: 24px;
    background: linear-gradient(180deg, #fffbf0 0%, var(--mn-bg-card, #fff) 100%);
    border: 2px solid #fde68a;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(217, 119, 6, .08);
}
.lq-result-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #fde68a;
}
.lq-result-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lq-result-type {
    font-size: 13px;
    color: var(--mn-text-muted, #888);
    letter-spacing: 1px;
}
.lq-result-no {
    font-size: 22px;
    font-weight: 800;
    color: var(--mn-text, #333);
    letter-spacing: 1px;
}
.lq-result-level {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
}
.lq-level-shang-shang { background: linear-gradient(135deg, #dc2626, #f59e0b); }
.lq-level-shang-ji    { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.lq-level-zhong-ji    { background: linear-gradient(135deg, #16a34a, #22c55e); }
.lq-level-zhong-ping  { background: linear-gradient(135deg, #3b82f6, #0ea5e9); }
.lq-level-xia-xia     { background: linear-gradient(135deg, #6b7280, #9ca3af); }
.lq-level-other       { background: #6b7280; }

.lq-result-poem {
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    border-left: 4px solid #dc2626;
    font-family: "KaiTi", "STKaiti", serif;
}
.lq-poem-line {
    font-size: 18px;
    line-height: 2;
    color: #92400e;
    letter-spacing: 2px;
    text-align: center;
    font-weight: 600;
}

.lq-result-story {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    background: #fef3c7;
    border-radius: 6px;
    font-size: 13px;
}
.lq-story-label {
    flex: 0 0 auto;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #f59e0b;
    border-radius: 8px;
}
.lq-story-text {
    color: #78350f;
    font-weight: 600;
}

.lq-result-jie {
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #fde68a;
}
.lq-jie-title {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid #dc2626;
}
.lq-jie-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: var(--mn-text, #333);
}

.lq-result-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 640px) {
    .lq-result-sections { grid-template-columns: 1fr; }
}
.lq-section {
    padding: 14px;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 10px;
    transition: border-color .2s, transform .2s;
}
.lq-section:hover { border-color: #f59e0b; transform: translateY(-1px); }
.lq-sec-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
}
.lq-sec-body {
    font-size: 13px;
    line-height: 1.8;
    color: var(--mn-text, #333);
}

.lq-result-foot {
    padding-top: 16px;
    margin-bottom: 16px;
    border-top: 1px dashed #fde68a;
    text-align: center;
}
.lq-foot-hint {
    margin: 0;
    font-size: 12px;
    color: var(--mn-text-muted, #888);
    line-height: 1.8;
}

.lq-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- 历史记录 ---------- */
.lq-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lq-history-item {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}
.lq-history-item:hover {
    border-color: var(--mn-primary, #0066cc);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 102, 204, .06);
}
.lq-history-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lq-history-date {
    font-size: 12px;
    color: var(--mn-text-muted, #888);
    font-family: ui-monospace, monospace;
}
.lq-history-type {
    font-size: 13px;
    font-weight: 700;
    color: var(--mn-primary, #0066cc);
}
.lq-history-mid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.lq-history-no {
    font-size: 13px;
    font-weight: 700;
    color: var(--mn-text, #333);
}
.lq-history-poem {
    font-size: 12px;
    color: var(--mn-text-muted, #888);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lq-history-level {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

@media (max-width: 640px) {
    .lq-history-item {
        grid-template-columns: 1fr auto;
        grid-template-areas: "left level" "mid mid";
    }
    .lq-history-left { grid-area: left; }
    .lq-history-mid { grid-area: mid; }
    .lq-history-level { grid-area: level; }
}

/* ---------- 打印 ---------- */
@media print {
    .lq-draw-box, .lq-result, .lq-section { page-break-inside: avoid; }
    .lq-draw-btn, .lq-result-actions { display: none !important; }
}