/**
 * app.css - 前台业务逻辑专用样式 (v3.6 完整校准版)
 * 
 * 包含：
 * 1. 顶部导航用户区微调
 * 2. Hero 沉浸式视觉区
 * 3. 测评计划卡片 (修复巨大化与比例错乱)
 * 4. 公告跑马灯样式
 * 5. 详情页公示网格与名单
 * 6. 个人中心内部组件样式
 */

/* ================== 1. 顶部导航扩展 ================== */
.user-avatar-nav {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    object-fit: cover;
    display: block;
}
.user-avatar-nav:active { transform: scale(0.9); }

/* ================== 2. Hero 视觉区域 ================== */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 4px 15px rgba(102, 166, 255, 0.5);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    font-weight: 700;
}

/* 装饰图标 */
.float-icon {
    position: absolute;
    font-size: 32px;
    opacity: 0.8;
    z-index: -1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    animation: floatAnim 4s ease-in-out infinite;
}
.i-1 { top: 10%; left: 10%; animation-delay: 0s; }
.i-2 { top: 40%; right: 12%; animation-delay: 1s; }
.i-3 { bottom: 10%; left: 20%; animation-delay: 2s; }
.i-4 { top: 20%; right: 25%; animation-delay: 0.5s; }

@keyframes floatAnim {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(8deg); }
}

/* ================== 3. 公告跑马灯 ================== */
.anno-box {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-val));
    -webkit-backdrop-filter: blur(var(--blur-val));
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    box-shadow: var(--glass-shadow);
}

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

.anno-content {
    flex: 1;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
}

/* ================== 4. 测评计划卡片 (核心修复) ================== */
#plan-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.plan-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-val));
    -webkit-backdrop-filter: blur(var(--blur-val));
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    width: 100%;
    max-width: 100%;
}

.plan-card:hover { transform: translateY(-5px); }
.plan-card:active { transform: scale(0.98); }

/* 封面比例约束 */
.card-cover {
    width: 100%;
    aspect-ratio: 16 / 8;
    position: relative;
    background: #f1f5f9;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 状态标签 */
.status-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 2;
}
.tag-done { color: var(--text-light); background: #eee; }

/* 卡片文本内容区 */
.card-body {
    padding: 24px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.3;
}

/* 标签行 */
.tags-row {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.cute-tag {
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ct-brand { background: #e0f2fe; color: #0284c7; }
.ct-size { background: #fce7f3; color: #db2777; }

/* 名额指示器 */
.quota-tag {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.quota-tag.full { opacity: 0.5; filter: grayscale(1); }

/* 修复申请按钮巨大化：设置固定高度与 Margin */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px; /* 关键修复：高度锁定 */
    border-radius: 18px;
    font-size: 16px;
    font-weight: 900;
    color: white;
    background: var(--primary-grad);
    box-shadow: 0 6px 18px rgba(102, 166, 255, 0.4);
    border: none;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}

.action-btn.applied {
    background: #f1f5f9;
    color: var(--text-light);
    box-shadow: none;
    border: 1.5px solid #cbd5e1;
}

.action-btn.disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* ================== 5. 详情页特化组件 ================== */
.detail-wrapper {
    position: relative;
    margin-top: -30px;
}

.btn-back-float {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 35px 0 15px;
}
.section-header h2 { font-size: 1.15rem; font-weight: 900; color: var(--text-main); }
.section-header i { color: var(--primary); }

.req-box {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 25px;
    border: 1px dashed var(--glass-border);
    line-height: 1.8;
}

/* 公示名单选项卡 */
.list-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}
.list-tabs::-webkit-scrollbar { display: none; }

.list-tabs .tab-item {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-light);
    border: 1px solid var(--glass-border);
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}
.list-tabs .tab-item.active {
    background: var(--primary-grad);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 166, 255, 0.3);
}

.name-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}
.name-tag {
    background: var(--glass-bg);
    padding: 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* ================== 6. 个人中心内部组件 ================== */
.avatar-lg {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.user-info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.badge-group {
    font-size: 12px;
    color: var(--text-light);
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 12px;
    margin: 8px 0 15px;
    display: inline-block;
    font-weight: 700;
}

.credit-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(255,255,255,0.7);
    padding: 15px;
    border-radius: var(--radius-md);
    margin: 15px 0;
    border: 1px solid var(--glass-border);
}
.credit-item .lbl { font-size: 10px; color: var(--text-light); margin-bottom: 4px; }
.credit-item .val { font-size: 18px; font-weight: 900; }
.val.c-money { color: #f57f17; }
.val.c-contri { color: #00b0ff; }
.val.c-growth { color: #81c784; }

.user-sig-box {
    margin: 15px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
    border: 1px solid rgba(255,255,255,0.5);
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ================== 7. 悬浮按钮 (FAB) ================== */
.fab {
    position: fixed;
    bottom: 30px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--accent-grad);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.5);
    z-index: 900;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fab:hover { transform: scale(1.1) rotate(15deg); }

/* ================== 8. 加载态 & 骨架屏 ================== */
.loading-box {
    text-align: center;
    padding: 60px 0;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
}
.loading-box i { font-size: 2rem; margin-bottom: 15px; }

/* 移动端适配 */
@media (max-width: 600px) {
    .hero-title { font-size: 1.6rem; }
    .card-title { font-size: 1.25rem; }
    .action-btn { height: 48px; font-size: 15px; }
}

/* ================== 详情页容器修正 ================== */
.detail-wrapper {
    position: relative;
    /* 核心修改：取消负边距，改为正向间距，防止钻入导航栏 */
    margin-top: 20px; 
    padding-top: 5px;
}

/* 修正返回按钮的位置，让它在卡片内更协调 */
.btn-back-float {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #fff;
    transition: 0.2s;
}

/* 详情页顶部的计划卡片微调 */
#plan-hero-container .plan-card {
    margin-bottom: 0; /* 详情页顶部卡片不需要底部间距 */
    border-top: none; /* 如果觉得贴得太近可以加 */
}