/* ========================================
   au应用中心 - 应用详情页样式
   ======================================== */

/* ===== 详情页主容器 ===== */
.detail-page {
    padding: 0 0 0 0;
}

/* ===== 顶部横幅展示区 ===== */
.detail-hero {
    padding: 30px 20px 28px;
    text-align: center;
    position: relative;
}

.detail-hero.plugin {
    background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
}

.detail-hero.theme {
    background: linear-gradient(135deg, #00B894 0%, #00D68F 100%);
}

.detail-hero-inner {
    max-width: 600px;
    margin: 0 auto;
}

.detail-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.detail-icon {
    font-size: 42px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.detail-title {
    color: #FFFFFF;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.detail-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(5px);
}

/* ===== 详情卡片通用 ===== */
.detail-card {
    margin: 12px 12px 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-card-inner {
    padding: 16px;
}

/* ===== 描述区域 ===== */
.detail-desc {
    margin-bottom: 12px;
}

.detail-desc p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.7;
}

/* ===== 开发者 ===== */
.detail-dev {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 13px;
}

.dev-label {
    color: var(--text-muted);
}

.dev-name {
    color: var(--primary);
    font-weight: 600;
}

/* ===== 版本信息标签 ===== */
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-green {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: #E8F5E9;
    color: #2E7D32;
}

.tag-blue {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: #E3F2FD;
    color: #1565C0;
}

/* ===== 提示横幅 ===== */
.notice-bar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.notice-bar:last-child {
    margin-bottom: 0;
}

.notice-icon {
    flex-shrink: 0;
    font-size: 15px;
    margin-top: 1px;
}

.notice-yellow {
    background: #FFF8E1;
    color: #F57F17;
    border: 1px solid #FFE082;
}

.notice-blue {
    background: #E3F2FD;
    color: #1565C0;
    border: 1px solid #90CAF9;
}

/* ===== Tab导航 ===== */
.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 13px 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-item:hover {
    color: var(--text-sub);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ===== Tab内容 ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content-inner {
    padding: 16px;
}

.tab-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.tab-section-body {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.7;
}

/* ===== 更新记录 ===== */
.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.changelog-time {
    color: #E53935;
    font-size: 12px;
    font-weight: 500;
}

.changelog-item {
    margin-bottom: 16px;
}

.changelog-version {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cv-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background: var(--primary);
    color: var(--white);
}

.cv-date {
    font-size: 12px;
    color: var(--text-muted);
}

.cv-list {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 16px;
}

.cv-list li {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.8;
    position: relative;
}

.cv-list li::before {
    content: "•";
    position: absolute;
    left: -14px;
    color: var(--primary);
}

/* ===== 详细信息网格 ===== */
.info-grid {
    display: flex;
    flex-direction: column;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #F0F0F0;
    font-size: 13px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    flex-shrink: 0;
}

.info-value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.info-value code {
    background: #F5F5F5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary);
}

.detail-badge-sm {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.detail-badge-sm.plugin {
    background: #EDE7F6;
    color: #5E35B1;
}

.detail-badge-sm.theme {
    background: #E0F2F1;
    color: #00897B;
}

.stars {
    color: #FFC107;
    font-size: 14px;
    letter-spacing: 1px;
}

.rating-num {
    font-size: 13px;
    color: var(--text-sub);
    margin-left: 6px;
}

/* ===== 相关推荐 ===== */
.related-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg);
    text-decoration: none;
    color: var(--text);
}

.related-item:hover {
    background: #EEEEEE;
    color: var(--text);
}

.related-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.related-icon.plugin {
    background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
}

.related-icon.theme {
    background: linear-gradient(135deg, #00B894 0%, #00D68F 100%);
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== 底部固定下载栏 ===== */
.detail-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    z-index: 200;
    padding: 10px 16px;
    /* iOS安全区 */
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.bottom-bar-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bottom-info {
    flex: 1;
    min-width: 0;
}

.bottom-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.bottom-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,119,184,0.3);
}

.bottom-dl-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* ========================================
   响应式
   ======================================== */

@media (min-width: 768px) {
    .detail-hero { padding: 40px 30px 36px; }
    .detail-icon-wrap { width: 90px; height: 90px; border-radius: 22px; }
    .detail-icon { font-size: 48px; }
    .detail-title { font-size: 26px; }
    .detail-card { margin: 14px 20px 0; }
    .detail-card-inner { padding: 20px; }
    .bottom-bar-inner { max-width: 800px; }
}

@media (min-width: 992px) {
    .detail-card { margin: 14px auto 0; max-width: 700px; }
    .detail-hero-inner { max-width: 700px; }
    .bottom-bar-inner { max-width: 700px; }
}

@media (max-width: 480px) {
    .detail-hero { padding: 24px 16px 22px; }
    .detail-icon-wrap { width: 68px; height: 68px; border-radius: 16px; }
    .detail-icon { font-size: 36px; }
    .detail-title { font-size: 19px; }
    .detail-badge { font-size: 11px; padding: 3px 12px; }
    .detail-card { margin: 10px 10px 0; }
    .detail-card-inner { padding: 14px; }
    .detail-desc p { font-size: 13px; }
    .detail-tags { gap: 6px; }
    .tag-green, .tag-blue { font-size: 10px; padding: 2px 10px; }
    .notice-bar { font-size: 12px; padding: 10px 12px; }
    .tab-item { font-size: 13px; padding: 11px 6px; }
    .tab-content-inner { padding: 14px; }
    .bottom-dl-btn { padding: 9px 22px; font-size: 13px; }
    .bottom-name { font-size: 14px; }
}

@media (max-width: 360px) {
    .detail-hero { padding: 20px 12px 18px; }
    .detail-icon-wrap { width: 60px; height: 60px; }
    .detail-icon { font-size: 32px; }
    .detail-title { font-size: 17px; }
    .detail-card { margin: 8px 8px 0; }
    .detail-card-inner { padding: 12px; }
    .bottom-dl-btn { padding: 8px 18px; font-size: 12px; }
}
