/* ========== 历史任务 - 整体布局 ========== */
.quest-block {
    margin-bottom: 30px;
}

.quest-block h3 {
    color: var(--gold, #d4af37);
    font-size: 20px;
    margin: 20px 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--gold, #d4af37);
}

.quest-tip {
    background: rgba(0, 212, 255, 0.08);
    border-left: 3px solid rgba(0, 212, 255, 0.5);
    padding: 10px 15px;
    border-radius: 0 6px 6px 0;
    margin: 10px 0 15px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
}

.quest-tip strong {
    color: var(--gold, #d4af37);
}

/* ========== 坐标速查卡片 ========== */
.quest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin: 15px 0;
}

.quest-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.quest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.quest-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
    border-bottom: 1px solid rgba(212,175,55,0.2);
}

.quest-card-icon {
    font-size: 24px;
}

.quest-card-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--gold, #d4af37);
}

.quest-card-body {
    padding: 12px 16px;
}

.quest-coord-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.quest-coord-table td {
    padding: 5px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: top;
}

.quest-coord-table tr:last-child td {
    border-bottom: none;
}

.quest-coord-table td:first-child {
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    font-weight: 500;
    width: 40%;
}

.quest-coord-table td:last-child {
    color: rgba(0, 212, 255, 0.85);
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

/* 区域主题色 */
.quest-card.region-salan {
    border-top: 3px solid #d4a017;
}
.quest-card.region-silver {
    border-top: 3px solid #c0c0c0;
}
.quest-card.region-icewolf {
    border-top: 3px solid #87ceeb;
}

/* ========== 章节标题 ========== */
.quest-chapter {
    margin: 25px 0;
    padding: 0;
}

.quest-chapter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
}

.quest-chapter-header.silver {
    background: linear-gradient(135deg, rgba(192,192,192,0.2), rgba(100,100,100,0.1));
    border-left: 4px solid #c0c0c0;
}
.quest-chapter-header.desert {
    background: linear-gradient(135deg, rgba(212,160,23,0.2), rgba(160,120,20,0.1));
    border-left: 4px solid #d4a017;
}
.quest-chapter-header.ice {
    background: linear-gradient(135deg, rgba(135,206,235,0.2), rgba(70,130,180,0.1));
    border-left: 4px solid #87ceeb;
}
.quest-chapter-header.spring {
    background: linear-gradient(135deg, rgba(255,182,193,0.2), rgba(255,105,130,0.1));
    border-left: 4px solid #ffb6c1;
}
.quest-chapter-header.winter {
    background: linear-gradient(135deg, rgba(173,216,230,0.2), rgba(100,149,237,0.1));
    border-left: 4px solid #add8e6;
}

.chapter-icon {
    font-size: 28px;
}

.chapter-title {
    font-size: 17px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ========== 任务步骤列表 ========== */
.quest-step-list {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 15px 20px;
}

.quest-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
}

.quest-step:last-child {
    border-bottom: none;
}

.step-num {
    flex-shrink: 0;
    width: 42px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: linear-gradient(135deg, var(--gold, #d4af37), #b8960a);
    color: #1a1a2e;
    font-weight: bold;
    font-size: 13px;
    border-radius: 6px;
    margin-top: 2px;
}

.step-body {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: 14px;
    line-height: 1.7;
}

.step-npc {
    color: #ffd700;
    font-weight: 600;
    white-space: nowrap;
}

.step-npc::before {
    content: '🗣️ ';
}

.step-coord {
    color: rgba(0, 212, 255, 0.9);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: rgba(0,212,255,0.1);
    padding: 1px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.step-desc {
    color: rgba(255,255,255,0.88);
    width: 100%;
    margin-top: 2px;
}

.step-note {
    width: 100%;
    font-size: 12px;
    color: #ff9966;
    margin-top: 2px;
}

.step-reward {
    width: 100%;
    font-size: 13px;
    color: #90ee90;
    margin-top: 3px;
    padding: 4px 10px;
    background: rgba(144,238,144,0.08);
    border-radius: 4px;
}

.step-items {
    width: 100%;
    margin: 4px 0 4px 18px;
    padding: 0;
    list-style: disc;
}

.step-items li {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

/* ========== 子标题 ========== */
.quest-sub-title,
.quest-subtitle {
    font-size: 15px;
    font-weight: bold;
    color: var(--gold, #d4af37);
    margin: 18px 0 10px;
    padding-left: 10px;
    border-left: 3px solid var(--gold, #d4af37);
}

/* ========== 分支任务框 ========== */
.quest-branch-box {
    margin: 15px 0;
    padding: 15px;
    background: rgba(30, 20, 50, 0.4);
    border: 1px solid rgba(180, 100, 255, 0.25);
    border-radius: 10px;
}

.branch-title {
    font-size: 15px;
    font-weight: bold;
    color: #d4a0ff;
    margin-bottom: 12px;
    text-align: center;
}

.branch-card {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.branch-card:last-child {
    margin-bottom: 0;
}

.branch-header {
    padding: 8px 14px;
    font-weight: bold;
    font-size: 14px;
    color: #fff;
}

.branch-card.pirate .branch-header {
    background: linear-gradient(135deg, #8b0000, #5a0000);
}
.branch-card.navy .branch-header {
    background: linear-gradient(135deg, #1a3a6a, #0d2040);
}
.branch-card.neutral .branch-header {
    background: linear-gradient(135deg, #2a4a3a, #1a3025);
}
.branch-card .branch-header {
    background: linear-gradient(135deg, rgba(100,80,160,0.6), rgba(60,40,100,0.4));
}

.branch-body {
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
}

.branch-body p {
    margin: 4px 0;
}

.branch-body ul {
    margin: 4px 0 4px 20px;
}

.branch-body li {
    margin: 2px 0;
}

.branch-reward {
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background: rgba(212,175,55,0.15);
    border-radius: 6px;
    font-weight: bold;
    color: var(--gold, #d4af37);
}

/* ========== 双列迷你卡片 ========== */
.quest-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.quest-mini-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.quest-mini-card:hover {
    background: rgba(30, 40, 60, 0.8);
    border-color: rgba(0,212,255,0.3);
}

.quest-mini-card.boss {
    border-color: rgba(255,50,50,0.4);
    background: rgba(80,20,20,0.3);
}

.quest-mini-card.reward {
    border-color: rgba(212,175,55,0.3);
    background: rgba(40,35,15,0.4);
}

.mini-card-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--gold, #d4af37), #b8960a);
    color: #1a1a2e;
    font-weight: bold;
    font-size: 14px;
    border-radius: 50%;
}

.mini-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-card-body span:first-child {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.mini-coord {
    font-size: 11px !important;
    color: rgba(0, 212, 255, 0.75) !important;
    font-family: 'Courier New', monospace;
}

/* ========== 奖励框 ========== */
.quest-reward-box {
    margin: 12px 0;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(212,175,55,0.05));
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 8px;
    font-size: 14px;
    color: #ffd700;
    text-align: center;
    font-weight: 500;
}

.quest-reward-box.final {
    font-size: 16px;
    font-weight: bold;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,165,0,0.1));
    border-color: rgba(255,215,0,0.5);
    margin-top: 20px;
}

/* ========== 任务表格 ========== */
.quest-table-wrapper {
    margin: 12px 0;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
}

.quest-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 600px;
}

.quest-table thead {
    background: rgba(212,175,55,0.15);
}

.quest-table th {
    padding: 10px 12px;
    text-align: left;
    color: var(--gold, #d4af37);
    font-weight: 600;
    border-bottom: 1px solid rgba(212,175,55,0.2);
    white-space: nowrap;
}

.quest-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
    vertical-align: top;
}

.quest-table tr:hover td {
    background: rgba(255,255,255,0.03);
}

.quest-table tbody tr:last-child td {
    border-bottom: none;
}
