/* 手机APP风格 - 历史记录 */

/* 覆盖base.css */
body.history-page {
    background: linear-gradient(180deg, #1a0a2e 0%, #0d0618 100%) !important;
    color: #fff;
}

.history-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(180deg, #1a0a2e 0%, #0d0618 100%);
    padding: 0 0 90px 0;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

.history-page::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* 标题 */
.page-header {
    padding: 50px 20px 20px;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* 内容 */
.history-content {
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* 头部 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.history-header h2 {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
}

.clear-btn {
    height: 32px;
    padding: 0 14px;
    background: transparent;
    color: rgba(239,68,68,0.75);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 16px;
    font-size: 13px;
}

.clear-btn:active {
    background: rgba(239,68,68,0.1);
}

/* 列表 */
.history-list {
    display: flex;
    flex-direction: column;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.history-item:last-child { border-bottom: none; }

.history-item:active {
    opacity: 0.7;
}

/* 封面 */
.history-book-cover {
    width: 52px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    position: relative;
}

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

/* 封面悬浮信息 */
.history-cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 12px 3px 3px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-interface {
    font-size: 8px;
    font-weight: 600;
    padding: 1px 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    color: #fff;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.history-interface.lam,
.history-interface.lam_api {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.history-interface.tt,
.history-interface.tt_api {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
}

.history-anchor {
    font-size: 8px;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 信息 */
.history-book-info {
    flex: 1;
    min-width: 0;
}

.history-book-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-chapter-title {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-play-time {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
}

/* 删除 */
.history-actions { flex-shrink: 0; }

.history-delete-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: rgba(255,255,255,0.3);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-delete-btn:active {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

/* 空状态 */
.no-history {
    text-align: center;
    padding: 60px 20px;
}

.no-history p {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    margin: 0;
}
