/**
 * ai-app-detail.css - AI应用详情页样式
 */
.app-detail-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.app-detail-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.app-detail-main {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 270px);
}
.app-detail-sidebar {
    flex: 0 0 240px;
    width: 240px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.app-info-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    padding: 28px 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.app-info-card .app-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.app-info-card .app-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: contain;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    padding: 12px;
    flex-shrink: 0;
}
.app-info-card .app-title-area h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.app-info-card .app-title-area .app-category-tag {
    font-size: 13px;
    color: #4a6cf7;
    background: #f0f5ff;
    padding: 2px 14px;
    border-radius: 30px;
    display: inline-block;
}
.app-info-card .app-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
    margin-bottom: 16px;
    align-items: center;
}
.app-info-card .app-stats .stat-item {
    font-size: 14px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 4px;
}
.app-info-card .app-stats .stat-item i { color: #a0aec0; }
.app-info-card .app-stats .stat-item strong { color: #1a202c; }

/* 点赞按钮 */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 30px;
    border: 2px solid #e2e8f0;
    background: transparent;
    color: #a0aec0;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}
.like-btn:hover:not(.liked) {
    border-color: #fc8181;
    color: #fc8181;
    transform: scale(1.02);
}
.like-btn.liked {
    border-color: #fc8181;
    background: #fff5f5;
    color: #e53e3e;
    cursor: default;
}
.like-btn .heart-icon {
    font-size: 22px;
    transition: all 0.3s ease;
}
.like-btn.liked .heart-icon {
    color: #e53e3e;
}
.like-btn .like-count {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}
.like-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.app-screenshots {
    margin: 16px 0;
    border-top: 1px solid #f0f2f5;
    padding-top: 16px;
}
.app-screenshots h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.app-screenshots .screenshots-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.app-screenshots .screenshots-scroll::-webkit-scrollbar { height: 4px; }
.app-screenshots .screenshots-scroll::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 4px; }
.app-screenshots .screenshot-item {
    flex: 0 0 auto;
    width: 180px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #edf2f7;
    background: #f7fafc;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}
.app-screenshots .screenshot-item:hover { transform: scale(1.02); }
.app-screenshots .screenshot-item img { width: 100%; height: 100%; object-fit: cover; }

.app-download-area {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f2f5;
}
.app-download-area .download-label {
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 10px;
    display: block;
}
.app-download-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.app-download-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px; color: #fff;
    border: none; border-radius: 10px; font-size: 15px; font-weight: 500;
    cursor: pointer; transition: all 0.25s ease; text-decoration: none;
}
.app-download-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); color: #fff; }
.app-download-btn.android { background: #3ddc84; color: #1a202c; }
.app-download-btn.android:hover { background: #2db874; color: #1a202c; }
.app-download-btn.ios { background: #000000; color: #fff; }
.app-download-btn.ios:hover { background: #333333; color: #fff; }
.app-download-btn.huawei { background: #c7000b; color: #fff; }
.app-download-btn.huawei:hover { background: #a00009; color: #fff; }
.app-download-btn.default { background: #4a6cf7; color: #fff; }
.app-download-btn.default:hover { background: #3a5cd9; color: #fff; }
.no-download { color: #a0aec0; font-size: 14px; }

.app-content {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    padding: 24px 28px;
    margin-top: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.app-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 12px 0;
}
.app-content .content-body {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.9;
}
.app-content .content-body ul, .app-content .content-body ol { padding-left: 20px; }
.app-content .content-body li { margin-bottom: 4px; }
.app-content .content-body img { max-width: 100%; border-radius: 8px; margin: 8px 0; }

.app-detail-sidebar .sidebar-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eef2f6;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.app-detail-sidebar .sidebar-title {
    font-size: 15px; font-weight: 600; color: #1a202c;
    margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #f0f2f5;
    display: flex; align-items: center; gap: 6px;
}
.app-detail-sidebar .sidebar-title i { color: #f6ad55; }
.app-detail-sidebar .rec-item {
    display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f5f7fa;
}
.app-detail-sidebar .rec-item:last-child { border-bottom: none; }
.app-detail-sidebar .rec-item img {
    width: 48px; height: 48px; border-radius: 8px; object-fit: contain;
    background: #f7fafc; border: 1px solid #edf2f7; padding: 6px; flex-shrink: 0;
}
.app-detail-sidebar .rec-item .rec-name { font-size: 13px; font-weight: 500; color: #1a202c; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.app-detail-sidebar .rec-item .rec-name a { color: #1a202c; text-decoration: none; }
.app-detail-sidebar .rec-item .rec-name a:hover { color: #4a6cf7; }
.app-detail-sidebar .rec-item .rec-category { font-size: 11px; color: #a0aec0; }

.app-comment-section { margin-top: 24px; }

/* 灯箱 */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(4px);
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay .lightbox-close {
    position: absolute; top: 20px; right: 30px; font-size: 40px; color: #fff;
    cursor: pointer; z-index: 10; transition: transform 0.3s; background: none; border: none;
}
.lightbox-overlay .lightbox-close:hover { transform: rotate(90deg); }
.lightbox-overlay .lightbox-image-wrapper {
    max-width: 90%; max-height: 85vh; display: flex;
    align-items: center; justify-content: center; position: relative;
}
.lightbox-overlay .lightbox-image-wrapper img {
    max-width: 100%; max-height: 85vh; object-fit: contain;
    border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    user-select: none; -webkit-user-drag: none;
}
.lightbox-overlay .lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 24px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; z-index: 10;
}
.lightbox-overlay .lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-overlay .lightbox-nav.prev { left: 20px; }
.lightbox-overlay .lightbox-nav.next { right: 20px; }
.lightbox-overlay .lightbox-counter {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.6); font-size: 14px;
    background: rgba(0,0,0,0.4); padding: 4px 16px; border-radius: 30px;
    backdrop-filter: blur(4px);
}

.like-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    z-index: 99999;
    font-size: 17px;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}
.like-toast.show {
    opacity: 1;
}

@media (max-width: 992px) {
    .app-detail-layout { flex-direction: column; }
    .app-detail-sidebar { width: 100%; flex: 1; position: static; }
    .app-detail-main { max-width: 100%; }
}
@media (max-width: 768px) {
    .app-info-card { padding: 16px 18px; }
    .app-info-card .app-header { flex-direction: column; align-items: center; text-align: center; }
    .app-info-card .app-title-area h1 { font-size: 22px; justify-content: center; }
    .app-content { padding: 16px; }
    .app-download-buttons { justify-content: center; }
    .app-download-btn { width: 100%; justify-content: center; }
    .app-screenshots .screenshot-item { width: 140px; height: 93px; }
    .app-info-card .app-stats { gap: 12px; }
}
@media (max-width: 480px) {
    .app-info-card .app-icon-large { width: 64px; height: 64px; padding: 10px; }
    .app-info-card .app-title-area h1 { font-size: 20px; }
    .app-info-card .app-stats { gap: 10px; font-size: 13px; }
    .app-download-btn { font-size: 14px; padding: 8px 16px; }
    .app-screenshots .screenshot-item { width: 120px; height: 80px; }
    .like-btn .heart-icon { font-size: 18px; }
    .like-btn { font-size: 13px; padding: 3px 10px; }
}

body.dark-mode .app-info-card { background: #16213e; border-color: #2a3a5a; }
body.dark-mode .app-info-card .app-title-area h1 { color: #e2e8f0; }
body.dark-mode .app-info-card .app-stats { border-color: #2a2a4a; }
body.dark-mode .app-info-card .app-stats .stat-item { color: #a0aec0; }
body.dark-mode .app-info-card .app-stats .stat-item strong { color: #e2e8f0; }
body.dark-mode .app-info-card .app-description { color: #cbd5e0; }
body.dark-mode .app-download-area { border-top-color: #2a2a4a; }
body.dark-mode .app-screenshots { border-top-color: #2a2a4a; }
body.dark-mode .app-screenshots h4 { color: #e2e8f0; }
body.dark-mode .app-content { background: #16213e; border-color: #2a3a5a; }
body.dark-mode .app-content h2 { color: #e2e8f0; }
body.dark-mode .app-content .content-body { color: #cbd5e0; }
body.dark-mode .app-detail-sidebar .sidebar-card { background: #16213e; border-color: #2a3a5a; }
body.dark-mode .app-detail-sidebar .sidebar-title { color: #e2e8f0; border-bottom-color: #2a2a4a; }
body.dark-mode .app-detail-sidebar .rec-item { border-bottom-color: #2a2a4a; }
body.dark-mode .app-detail-sidebar .rec-item .rec-name a { color: #d0d0d0; }
body.dark-mode .app-detail-sidebar .rec-item .rec-name a:hover { color: #6a8cff; }
body.dark-mode .app-detail-sidebar .rec-item .rec-category { color: #888; }
body.dark-mode .like-btn { border-color: #4a5568; color: #a0aec0; }
body.dark-mode .like-btn.liked { border-color: #fc8181; background: rgba(229,62,62,0.15); color: #fc8181; }