/* ===== 采集区域 ===== */
.zone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.zone-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
    transition: all 0.2s;
}

.zone-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 12px rgba(63,185,80,0.1);
}

.zone-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.zone-icon {
    font-size: 28px;
}

.zone-info h3 {
    font-size: 14px;
    font-weight: 700;
}

.zone-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.zone-resources {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.resource-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-panel);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid var(--border-color);
}

.zone-workers {
    margin-bottom: 10px;
}

.worker-slots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.worker-slot {
    width: 36px;
    height: 36px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-panel);
}

.worker-slot:hover {
    border-color: var(--accent-green);
    background: rgba(63,185,80,0.05);
}

.worker-slot.filled {
    border-style: solid;
    border-color: var(--accent-green);
    background: rgba(63,185,80,0.1);
}

.zone-progress {
    margin-top: 8px;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), #4ade80);
    border-radius: 4px;
    transition: width 0.5s;
}

/* ===== 建筑网格 ===== */
.buildings-grid {
    display: block;
}
.bld-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}


.building-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.building-icon {
    font-size: 32px;
}

.building-info h3 {
    font-size: 14px;
    font-weight: 700;
}

.building-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.building-level {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-orange);
    color: var(--bg-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.building-effect {
    font-size: 12px;
    color: var(--accent-green);
    margin-bottom: 10px;
    padding: 6px 8px;
    background: rgba(63,185,80,0.05);
    border-radius: var(--radius);
    border-left: 2px solid var(--accent-green);
}

.cost-display {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.cost-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
}

.cost-item.can-afford {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.cost-item.cannot-afford {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* ===== 探索地图 ===== */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.explore-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.explore-card.locked {
    opacity: 0.4;
}

.explore-card.exploring {
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(88,166,255,0.2);
}

.explore-card:not(.locked):not(.exploring):hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 12px rgba(188,140,255,0.1);
}

.explore-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    font-size: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.explore-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    position: relative;
}

.explore-icon {
    font-size: 28px;
}

.explore-info h3 {
    font-size: 14px;
    font-weight: 700;
}

.explore-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.explore-rewards {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.explore-difficulty {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.diff-star {
    color: var(--accent-yellow);
    font-size: 12px;
}

.diff-star.empty {
    color: var(--border-color);
}

/* ===== 战斗竞技 ===== */
.battle-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
}

/* ===== 繁衍面板 ===== */
#breed-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.breed-slots {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breed-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.slot-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.slot-content {
    width: 140px;
    height: 160px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-panel);
    position: relative;
    overflow: hidden;
}

.slot-content:hover {
    border-color: var(--accent-purple);
    background: rgba(188,140,255,0.05);
}

.slot-content.filled {
    border-style: solid;
    border-color: var(--accent-purple);
    background: rgba(188,140,255,0.05);
    flex-direction: column;
    gap: 4px;
}

.slot-empty {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.breed-heart {
    font-size: 32px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.breed-preview {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 16px;
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--accent-purple);
}

.breed-preview h3 {
    text-align: center;
    margin-bottom: 12px;
    color: var(--accent-purple);
}

/* ===== 科技树 ===== */
.tech-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tech-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.tech-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    user-select: none;
}

.tech-category-icon {
    font-size: 24px;
}

.tech-category-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.tech-category-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
}

.tech-progress-bar {
    width: 60px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.tech-progress-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 2px;
    transition: width 0.3s;
}

.tech-collapse-icon {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.tech-nodes-wrapper {
    overflow: hidden;
    transition: max-height 0.3s;
}

.tech-node-requires {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

.tech-nodes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-node {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
    width: 160px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tech-node.researched {
    border-color: var(--accent-green);
    background: rgba(63,185,80,0.05);
}

.tech-node.available:hover {
    border-color: var(--accent-blue);
    background: rgba(88,166,255,0.05);
    transform: translateY(-2px);
}

.tech-node.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.tech-node-icon {
    font-size: 28px;
    text-align: center;
    margin-bottom: 6px;
}

.tech-node-name {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.tech-node-desc {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.4;
}

.tech-node-cost {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
}

.tech-researched-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 14px;
}

/* ===== 成就系统 ===== */
.achievement-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.achievement-summary-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.achievement-summary-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-green));
    border-radius: 4px;
    transition: width 0.5s;
}

.achievement-summary-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.achievement-category {
    margin-bottom: 16px;
}

.achievement-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.achievement-cat-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.achievement-card.hidden-achievement {
    border-style: dashed;
    border-color: var(--accent-purple, #bc8cff);
    background: rgba(188,140,255,0.03);
}

/* ===== 任务系统 ===== */
.quest-section {
    margin-bottom: 20px;
}

.quest-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.quest-reset-timer {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

.quest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.quest-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    transition: all 0.2s;
}

.quest-card.complete {
    border-color: var(--accent-green);
    background: rgba(63,185,80,0.05);
}

.quest-card.claimed {
    opacity: 0.5;
    border-color: var(--border-color);
    background: var(--bg-card);
}

.quest-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.quest-emoji {
    font-size: 20px;
}

.quest-name {
    font-size: 13px;
    font-weight: 700;
}

.quest-claimed-badge {
    margin-left: auto;
    font-size: 12px;
    color: var(--accent-green);
}

.quest-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.quest-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.quest-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 3px;
    transition: width 0.3s;
}

.quest-progress-fill.complete {
    background: var(--accent-green);
}

.quest-progress-text {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.quest-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quest-reward {
    font-size: 11px;
    color: var(--accent-yellow);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    min-height: auto;
}

/* ── Leaderboard ── */
.lb-categories {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.lb-cat-btn {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.lb-cat-btn:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}
.lb-cat-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}
.lb-player-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(31,111,235,0.15), rgba(188,140,255,0.1));
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}
.lb-rank-badge {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-yellow);
    min-width: 60px;
    text-align: center;
}
.lb-rank-text {
    font-size: 14px;
    color: var(--text-secondary);
}
.lb-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.lb-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}
.lb-row:hover {
    border-color: var(--accent-blue);
}
.lb-row-player {
    background: rgba(31,111,235,0.1);
    border-color: var(--accent-blue);
    font-weight: bold;
}
.lb-col-rank {
    min-width: 48px;
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-yellow);
}
.lb-col-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}
.lb-col-value {
    font-size: 14px;
    color: var(--accent-green);
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}
.lb-separator {
    text-align: center;
    padding: 6px;
    color: var(--text-secondary);
    font-size: 18px;
    letter-spacing: 4px;
}
.lb-refresh-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px;
    opacity: 0.7;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.2s;
}

.achievement-card.unlocked {
    border-color: var(--accent-yellow);
    background: rgba(210,153,34,0.05);
}

.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.achievement-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.achievement-info h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.achievement-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.achievement-progress {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.achievement-progress-fill {
    height: 100%;
    background: var(--accent-yellow);
    border-radius: 2px;
    transition: width 0.3s;
}

.achievement-reward {
    font-size: 11px;
    color: var(--accent-yellow);
    margin-top: 4px;
}

