/* ===== 顶部标题栏主样式 ===== */
.app-header {
    border-radius: 20px;
    position: relative;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    color: var(--text-primary);
    padding: 32px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-wrapper {
    position: relative;
    z-index: 1;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.header-title {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.title-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.title-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-content h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #2b5876);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    margin: 0;
    text-align: center;
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    padding-top: 8px;
    text-align: center;
    max-width: 600px;
}

.header-stats {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    width: 100%;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 12px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    flex: 1;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(var(--primary-color-rgb), 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), rgba(var(--primary-color-rgb), 0.7));
    opacity: 0.8;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(var(--primary-color-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
}

.stat-info {
    flex-grow: 1;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.stat-badge {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 2px;
    opacity: 0.8;
}

.count-up {
    display: inline-block;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.header-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 14px;
    flex: 1;
    min-width: 120px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.header-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.action-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.header-action-btn span {
    font-weight: 500;
    white-space: nowrap;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .app-header {
        padding: 24px 0;
        margin-bottom: 20px;
    }
    .title-main {
        gap: 10px;
    }
    .title-icon {
        width: 32px;
        height: 32px;
    }
    .title-content h1 {
        font-size: 28px;
    }
    .subtitle {
        font-size: 14px;
        padding: 6px 16px 0;
    }
    .header-stats {
        gap: 8px;
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    .stat-card {
        padding: 8px 6px;
        min-width: 0;
        flex: 1;
    }
    .stat-icon {
        width: 24px;
        height: 24px;
        margin-right: 6px;
    }
    .stat-icon svg {
        width: 14px;
        height: 14px;
    }
    .stat-value {
        font-size: 14px;
    }
    .stat-label {
        font-size: 10px;
    }
    .stat-badge {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 20px 0;
    }
    .header-title {
        text-align: center;
    }
    .title-wrapper {
        align-items: center;
    }
    .title-main {
        gap: 8px;
    }
    .title-icon {
        width: 28px;
        height: 28px;
    }
    .title-content h1 {
        font-size: 24px;
    }
    .subtitle {
        text-align: center;
        font-size: 13px;
        padding: 4px 12px 0;
    }
    .header-stats {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        gap: 4px;
    }
    .stat-card {
        width: auto;
        padding: 6px 4px;
        flex: 1;
    }
    .stat-icon {
        width: 20px;
        height: 20px;
        margin-right: 4px;
    }
    .stat-icon svg {
        width: 12px;
        height: 12px;
    }
    .stat-value {
        font-size: 12px;
    }
    .stat-label {
        font-size: 9px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stat-badge {
        font-size: 9px;
        margin-left: 1px;
    }
    .header-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .header-action-btn {
        padding: 6px 8px;
        min-width: 0;
    }
    .header-action-btn span {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .header-actions {
        grid-template-columns: 1fr;
    }
    .header-action-btn {
        padding: 8px 12px;
    }
    .header-stats {
        gap: 2px;
    }
    .stat-card {
        padding: 4px 3px;
    }
    .stat-icon {
        width: 16px;
        height: 16px;
        margin-right: 2px;
    }
    .stat-icon svg {
        width: 10px;
        height: 10px;
    }
    .stat-info {
        min-width: 0;
    }
    .stat-value {
        font-size: 10px;
    }
    .stat-label {
        font-size: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stat-badge {
        font-size: 8px;
    }
}

/* ===== 入场动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.header-title {
    animation: fadeInUp 0.5s ease-out;
}

.stats-section {
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.header-actions {
    animation: fadeInUp 0.5s ease-out 0.1s backwards;
}