/* 单位详情页面样式 */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.detail-header {
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--allied-primary), var(--soviet-primary), var(--yuri-primary));
}

.detail-header[data-faction="allied"]::before {
    background: linear-gradient(90deg, var(--allied-primary), var(--allied-light));
}

.detail-header[data-faction="soviet"]::before {
    background: linear-gradient(90deg, var(--soviet-primary), var(--soviet-light));
}

.detail-header[data-faction="yuri"]::before {
    background: linear-gradient(90deg, var(--yuri-primary), var(--yuri-light));
}

/* 角色徽章 */
.detail-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.badge-icon {
    font-size: 16px;
}

/* 回收价值 */
.cost-refund {
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-secondary);
}

/* 盟军 */
.detail-header[data-faction="allied"] {
    border-color: var(--allied-light);
    background: var(--allied-bg);
}

/* 苏军 */
.detail-header[data-faction="soviet"] {
    border-color: var(--soviet-light);
    background: var(--soviet-bg);
}

/* 尤里 */
.detail-header[data-faction="yuri"] {
    border-color: var(--yuri-light);
    background: var(--yuri-bg);
}

.detail-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.detail-icon {
    flex-shrink: 0;
}

.detail-info {
    flex: 1;
}

.detail-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-header[data-faction="allied"] .detail-name {
    color: var(--allied-dark);
}

.detail-header[data-faction="soviet"] .detail-name {
    color: var(--soviet-dark);
}

.detail-header[data-faction="yuri"] .detail-name {
    color: var(--yuri-dark);
}

.detail-type {
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-cost {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.cost-label {
    font-size: 14px;
    color: var(--text-tertiary);
}

.cost-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-gold);
}

.cost-icon {
    font-size: 18px;
    color: var(--accent-gold);
}

/* 快速属性概览 */
.detail-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.overview-item {
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.overview-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.overview-item[data-type="strength"] {
    border-top: 3px solid #4CAF50;
}

.overview-item[data-type="armor"] {
    border-top: 3px solid #607D8B;
}

.overview-item[data-type="sight"] {
    border-top: 3px solid #2196F3;
}

.overview-item[data-type="speed"] {
    border-top: 3px solid #FF9800;
}

.overview-icon {
    font-size: 24px;
}

.overview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overview-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.overview-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 属性进度条 */
.stat-bar-container {
    width: 100%;
    height: 6px;
    background: var(--bg-hover);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.stat-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
    background: linear-gradient(90deg, var(--allied-primary), var(--allied-light));
}

/* 单位介绍面板 */
.panel-full {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.unit-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.unit-description p {
    margin-bottom: 12px;
}

.unit-description p:last-child {
    margin-bottom: 0;
}

/* 参数面板 */
.detail-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel {
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
}

.panel-header {
    background: var(--bg-hover);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-icon {
    font-size: 16px;
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.panel-body {
    padding: 16px;
}

.param-list {
    list-style: none;
}

.param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.param-item:last-child {
    border-bottom: none;
}

.param-name {
    font-size: 14px;
    color: var(--text-secondary);
}

.param-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 120px;
}

.param-value .stat-bar-container {
    width: 100%;
    max-width: 100px;
}

/* 动画 */
@keyframes detail-enter {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    animation: detail-enter 0.4s ease forwards;
    opacity: 0;
}

.panel:nth-child(1) { animation-delay: 0.1s; }
.panel:nth-child(2) { animation-delay: 0.15s; }
.panel:nth-child(3) { animation-delay: 0.2s; }
.panel:nth-child(4) { animation-delay: 0.25s; }
.panel:nth-child(5) { animation-delay: 0.3s; }
.panel:nth-child(6) { animation-delay: 0.35s; }

/* 响应式 */
@media (max-width: 768px) {
    .detail-header {
        padding: 24px;
    }

    .detail-top {
        flex-direction: column;
        text-align: center;
    }

    .detail-name {
        font-size: 22px;
    }

    .detail-badge {
        position: static;
        margin-top: 12px;
        align-self: center;
    }

    .detail-overview {
        grid-template-columns: 1fr 1fr;
    }

    .detail-panels {
        grid-template-columns: 1fr;
    }

    .param-value {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .detail-overview {
        grid-template-columns: 1fr;
    }
}
