/* 三国群英传 - 卡片正面样式 */

/* ==================== 卡片容器 ==================== */
.hero-card {
    width: var(--card-width);
    height: var(--card-height);
    border-radius: var(--card-radius);
    border: var(--card-border);
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.hero-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}

/* ==================== 卡片顶部（势力标签+星级） ==================== */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    position: relative;
    z-index: 2;
}

.force-tag {
    padding: 2px 10px;
    border-radius: 10px;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.force-wei { background: var(--魏灰); }
.force-shu { background: var(--蜀青); }
.force-wu { background: var(--吴赭); }
.force-qun { background: var(--群褐); }

.card-stars {
    display: flex;
    gap: 3px;
}

.star {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--淡墨灰);
}

.star.filled {
    background: #DAA520;
}

/* ==================== 立绘区域 ==================== */
.card-portrait {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 0;
}



/* ==================== 卡片底部信息 ==================== */
.card-footer {
    padding: 4px 8px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.card-info-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    line-height: 1.2;
}

.card-name {
    font-family: var(--font-title);
    font-size: 18px;
    color: var(--水墨黑);
}

.card-courtesy {
    font-size: 10px;
    color: var(--淡墨灰);
}

.card-position {
    font-size: 10px;
    color: var(--淡墨灰);
}

/* ==================== 未解锁状态 ==================== */
.hero-card.locked {
    opacity: 0.7;
    filter: grayscale(0.8);
}

.hero-card.locked .card-portrait {
    background-image: url('../assets/img/locked-hero.jpg') !important;
    background-size: cover;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    z-index: 3;
}

.lock-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.lock-text {
    color: white;
    font-size: 14px;
    font-family: var(--font-title);
}

/* ==================== 进行中状态 ==================== */
.hero-card.in-progress .card-portrait::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--朱砂印);
    z-index: 1;
}

.stage-progress {
    padding: 4px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stage-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--淡墨灰);
}

.stage-label {
    width: 50px;
}

.stage-bar {
    flex: 1;
    height: 4px;
    background: var(--progress-bg);
    border-radius: 2px;
    overflow: hidden;
}

.stage-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.stage-bar-fill.completed { background: #4CAF50; }
.stage-bar-fill.in-progress { background: var(--朱砂印); }
.stage-bar-fill.locked { background: var(--progress-bg); }

.stage-status {
    font-size: 10px;
}

.stage-status.completed { color: #4CAF50; }
.stage-status.in-progress { color: var(--朱砂印); }
.stage-status.locked { color: var(--淡墨灰); }

/* ==================== 卡片翻转动画 ==================== */
@keyframes cardUnlock {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(90deg) scale(1.05); box-shadow: 0 0 30px rgba(218,165,32,0.6); }
    100% { transform: rotateY(0deg) scale(1); }
}

.hero-card.unlock-animate {
    animation: cardUnlock 0.8s ease;
}

/* ==================== 完美解锁标记 ==================== */
.perfect-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #DAA520, #FFD700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(218,165,32,0.6);
}
