/**
 * 灵音首页 · 仅布局骨架（海报高度、占位块最小高度）
 * 颜色/卡片/按钮走 ios-common + Bootstrap + --is-* 变量
 */

/* 海报：固定高度 + 背景图 */
.ph-hero {
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    background-color: var(--is-surface);
    background-image: linear-gradient(
        100deg,
        var(--is-surface) 0%,
        rgba(var(--is-rgb, 36, 104, 242), 0.06) 45%,
        transparent 70%
    ), var(--ph-hero-bg);
    background-size: auto 100%, cover;
    background-position: left center, right center;
    background-repeat: no-repeat;
}

.ph-hero-copy {
    max-width: 55%;
}

.ph-hero-title {
    font-size: 2.65rem;
    font-weight: 800;
    line-height: 1.35;
    background: linear-gradient(90deg, #7c3aed 0%, #6366f1 50%, #3b82f6 100%);
    background-clip: text;
    color: transparent;
    padding-top: 25px;
}
.zhiku-home-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: fit-content;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6d28d9;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(139, 92, 246, 0.22);
    margin-bottom: 0;
}
.ph-hero-desc {
    font-size: 13px;
    line-height: 1.65;
    color: #6b7280;
    max-width: 95%;
    margin-bottom: 0;
}

.ph-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f3e8ff;
    color: #7c3aed;
    line-height: 1.2;
}

.ph-hero-tag i {
    font-size: 11px;
}

[data-bs-theme='dark'] .ph-hero-title { color: #c4b5fd; }
[data-bs-theme='dark'] .ph-hero-desc  { color: #9ca3af; }
[data-bs-theme='dark'] .ph-hero-tag   { background: rgba(124, 58, 237, 0.18); color: #a78bfa; }

/* 统计方块 */
.ph-stat-card {
    padding: 18px 20px;
}

.ph-stat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ph-stat-icon--purple { background: #ede9fe; color: #7c3aed; }
.ph-stat-icon--blue   { background: #dbeafe; color: #2563eb; }
.ph-stat-icon--green  { background: #d1fae5; color: #059669; }
.ph-stat-icon--violet { background: #f3e8ff; color: #9333ea; }

.ph-stat-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.ph-stat-trend {
    font-weight: 600;
}

.ph-stat-trend--up    { color: #6366f1; }
.ph-stat-trend--green { color: #059669; }
.ph-stat-trend--down  { color: #dc2626; }

.ph-stat-card--link {
    display: block;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.ph-stat-card--link:hover {
    color: inherit;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.ph-stat-foot--link:hover { color: var(--is-element, #007aff) !important; }

/* 快捷功能 */
.ph-quick-item {
    position: relative;
    padding: 12px 14px;
    background: var(--is-body);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

button.ph-quick-item {
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.ph-quick-item:hover {
    color: inherit;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.ph-quick-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.ph-quick-icon--purple { background: #ede9fe; color: #7c3aed; }
.ph-quick-icon--pink   { background: #fce7f3; color: #db2777; }
.ph-quick-icon--blue   { background: #dbeafe; color: #2563eb; }
.ph-quick-icon--cyan   { background: #cffafe; color: #0891b2; }
.ph-quick-icon--green  { background: #d1fae5; color: #059669; }
.ph-quick-icon--orange { background: #ffedd5; color: #ea580c; }

.ph-quick-new {
    position: absolute;
    top: 12px;
    right: 10px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.6;
    background: #dbeafe;
    color: #2563eb;
}

.ph-quick-item:has(.ph-quick-new) .ph-quick-text {
    padding-right: 28px;
}

.ph-quick-ai {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: inherit;
}

[data-bs-theme='dark'] .ph-quick-icon--purple { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }
[data-bs-theme='dark'] .ph-quick-icon--pink   { background: rgba(219, 39, 119, 0.2); color: #f472b6; }
[data-bs-theme='dark'] .ph-quick-icon--blue   { background: rgba(37, 99, 235, 0.2); color: #60a5fa; }
[data-bs-theme='dark'] .ph-quick-icon--cyan   { background: rgba(8, 145, 178, 0.2); color: #22d3ee; }
[data-bs-theme='dark'] .ph-quick-icon--green  { background: rgba(5, 150, 105, 0.2); color: #34d399; }
[data-bs-theme='dark'] .ph-quick-icon--orange { background: rgba(234, 88, 12, 0.2); color: #fb923c; }

[data-bs-theme='dark'] .ph-quick-item {
    background: rgba(255, 255, 255, 0.04);
}

[data-bs-theme='dark'] .ph-quick-item:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* 大方块 / 侧栏：占位最小高度 */
.ph-block-slot {
    min-height: 220px;
    background: var(--is-body);
}

[data-bs-theme='dark'] .ph-block-slot {
    background: rgba(255, 255, 255, 0.04);
}

/* 每日灵力消耗折线图 */
.ph-trend-chart {
    min-height: 220px;
}

.ph-trend-chart .apexcharts-canvas {
    margin: 0 auto;
}

[data-bs-theme='dark'] .ph-trend-chart .apexcharts-gridline,
[data-bs-theme='dark'] .ph-trend-chart .apexcharts-xaxis line,
[data-bs-theme='dark'] .ph-trend-chart .apexcharts-yaxis line {
    stroke: rgba(255, 255, 255, 0.08);
}

/* 热门声音 */
.ph-featured-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    color: var(--is-element, #007aff);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.ph-featured-refresh-btn:hover {
    opacity: 0.85;
}

.ph-featured-refresh-icon {
    font-size: 12px;
    line-height: 1;
}

.ph-featured-refresh-btn.is-spinning .ph-featured-refresh-icon {
    animation: ph-featured-spin 0.55s ease;
}

@keyframes ph-featured-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ph-featured-body {
    min-height: 120px;
}

.ph-featured-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ph-featured-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    margin: 0 -6px;
    border-radius: 12px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.ph-featured-item:hover,
.ph-featured-item:focus-within {
    background: var(--is-body);
}

.ph-featured-item[data-audio-url]:not([data-audio-url='']) .ph-recent-play:not(:disabled) {
    cursor: pointer;
}

[data-bs-theme='dark'] .ph-featured-item:hover,
[data-bs-theme='dark'] .ph-featured-item:focus-within {
    background: rgba(255, 255, 255, 0.06);
}

.ph-featured-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    vertical-align: middle;
}

.ph-featured-badge--jingxuan {
    background: #d1fae5;
    color: #059669;
}

.ph-featured-badge--remen {
    background: #fee2e2;
    color: #dc2626;
}

[data-bs-theme='dark'] .ph-featured-badge--jingxuan {
    background: rgba(5, 150, 105, 0.2);
    color: #34d399;
}

[data-bs-theme='dark'] .ph-featured-badge--remen {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

.ph-featured-actions {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding-right: 4px;
    padding-left: 24px;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.ph-featured-item:hover .ph-featured-actions,
.ph-featured-item:focus-within .ph-featured-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: linear-gradient(90deg, transparent 0%, var(--is-body) 36%);
}

.ph-featured-use-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: var(--is-element, #007aff);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.ph-featured-use-btn:hover {
    opacity: 0.9;
}

[data-bs-theme='dark'] .ph-featured-item:hover .ph-featured-actions,
[data-bs-theme='dark'] .ph-featured-item:focus-within .ph-featured-actions {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 36%);
}

@media (hover: none) {
    .ph-featured-actions {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* 最近作品 */
.ph-recent-body {
    min-height: 120px;
}

.ph-recent-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ph-recent-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    margin: 0 -6px;
    border-radius: 12px;
    transition: background 0.15s ease;
    cursor: default;
}

.ph-recent-item:hover,
.ph-recent-item:focus-within {
    background: var(--is-body);
}

.ph-recent-meta {
    margin-top: 5px;
    line-height: 1.35;
}

.ph-recent-play {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: var(--is-body);
    overflow: hidden;
    cursor: pointer;
}

.ph-recent-play:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ph-recent-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ph-recent-item[data-audio-url]:not([data-audio-url='']) {
    cursor: pointer;
}

.ph-recent-play i {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ph-recent-item:hover .ph-recent-play:not(:disabled) i,
.ph-recent-item:focus-within .ph-recent-play:not(:disabled) i,
.ph-featured-item:hover .ph-recent-play:not(:disabled) i,
.ph-featured-item:focus-within .ph-recent-play:not(:disabled) i,
.ph-recent-play.is-playing i {
    opacity: 1;
}

.ph-recent-play.is-playing i {
    background: rgba(124, 58, 237, 0.75);
}

.ph-recent-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ph-recent-actions {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 4px;
    padding-left: 24px;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.ph-recent-item:hover .ph-recent-actions,
.ph-recent-item:focus-within .ph-recent-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: linear-gradient(90deg, transparent 0%, var(--is-body) 36%);
}

@media (hover: none) {
    .ph-recent-actions {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

.ph-recent-action {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ph-recent-action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ph-recent-action--download {
    color: #22c55e;
}

.ph-recent-action--download:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.12);
}

.ph-recent-action--delete {
    color: #86868b;
}

.ph-recent-action--delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.ph-recent-tip {
    font-size: 11px;
    margin-top: 10px !important;
    padding-top: 4px;
}

[data-bs-theme='dark'] .ph-recent-item:hover,
[data-bs-theme='dark'] .ph-recent-item:focus-within {
    background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme='dark'] .ph-recent-play {
    background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme='dark'] .ph-recent-item:hover .ph-recent-actions,
[data-bs-theme='dark'] .ph-recent-item:focus-within .ph-recent-actions {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 36%);
}

@media (max-width: 991.98px) {
    .ph-hero-copy {
        max-width: 100%;
    }
}
