/* 手机APP风格 - 个人中心 */

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

.profile-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;
}

.profile-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;
}

.profile-content {
    padding: 0 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Logo */
.logo-section {
    padding: 60px 0 40px;
    text-align: center;
}

.logo-icon {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
}

.logo-bar {
    width: 6px;
    background: rgba(255,255,255,0.85);
    border-radius: 3px;
}
.logo-bar:nth-child(1) { height: 20px; }
.logo-bar:nth-child(2) { height: 32px; }
.logo-bar:nth-child(3) { height: 44px; }
.logo-bar:nth-child(4) { height: 32px; }
.logo-bar:nth-child(5) { height: 20px; }

/* 登录 */
.login-section { width: 100%; }

.login-card {
    background: transparent;
    padding: 0;
}

.login-card h2 {
    font-size: 28px;
    color: #fff;
    text-align: center;
    font-weight: 700;
    letter-spacing: 6px;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.45);
    font-size: 14px;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label { display: none; }

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    height: 54px;
    padding: 0 24px;
    border: none;
    border-radius: 27px;
    font-size: 16px;
    background: rgba(255,255,255,0.92);
    color: #222;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.form-group input::placeholder { color: #888; }

.form-group input:focus {
    outline: none;
    background: #fff;
}

.form-group.checkbox-group {
    margin: 8px 0 24px;
    padding-left: 8px;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f97316;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 27px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
}

.btn-primary {
    background: linear-gradient(90deg, #f97316, #ec4899);
    color: #fff;
    box-shadow: 0 8px 30px rgba(249,115,22,0.5);
}

.btn-primary:active {
    opacity: 0.9;
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: rgba(255,255,255,0.55);
    height: auto;
    padding: 12px;
    font-size: 15px;
}

.btn-secondary:active { color: #fff; }

.btn:disabled {
    background: rgba(255,255,255,0.15) !important;
    color: rgba(255,255,255,0.3) !important;
    box-shadow: none !important;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e1030;
    border-radius: 24px 24px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    position: sticky;
    top: 0;
    background: #1e1030;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-header h2 {
    margin: 0;
    font-size: 17px;
    color: #fff;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
}

#register-form, #feedback-form {
    padding: 20px;
}

#register-form .form-group input,
#feedback-form .form-group input {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

#register-form .form-group input::placeholder,
#feedback-form .form-group input::placeholder {
    color: rgba(255,255,255,0.35);
}

.form-group textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255,255,255,0.1);
    color: #fff;
    resize: none;
    box-sizing: border-box;
}

.form-group textarea::placeholder { color: rgba(255,255,255,0.35); }
.form-group textarea:focus { outline: none; background: rgba(255,255,255,0.12); }

.char-count {
    text-align: right;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    margin-top: 6px;
}

.required-mark { color: #f97316; }

/* Toast */
.toast-message {
    position: fixed;
    top: 80px;
    left: 20px;
    right: 20px;
    background: rgba(20,10,35,0.95);
    color: #fff;
    padding: 14px 18px;
    border-radius: 14px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { border-left: 3px solid #10b981; }
.toast-error { border-left: 3px solid #ef4444; }

.toast-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.toast-success .toast-icon { background: #10b981; }
.toast-error .toast-icon { background: #ef4444; }

/* 用户信息 */
.user-section {
    padding-top: 50px;
}

.user-info-card {
    text-align: center;
    position: relative;
    padding: 0;
    margin-bottom: 40px;
}

.user-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 35px rgba(249,115,22,0.4);
}

.avatar-icon { font-size: 40px; }

.user-info-card h2 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 16px;
}

/* 菜单容器 */
.menu-container {
    position: absolute;
    top: 0;
    right: 0;
}

.menu-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 50%;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    min-width: 140px;
    background: rgba(30, 20, 50, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    overflow: hidden;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.menu-dropdown.show {
    display: block;
    animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-item:hover {
    background: rgba(255,255,255,0.1);
}

.menu-icon {
    font-size: 16px;
}

.logout-btn {
    height: 40px;
    padding: 0 24px;
    background: transparent;
    color: rgba(239,68,68,0.8);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 20px;
    font-size: 14px;
}

/* 统计 */
.stats-section {
    margin-bottom: 36px;
}

.stats-section h3 {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    text-align: center;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
}

.stat-item { text-align: center; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, #f97316, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
}

/* 菜单分隔线 */
.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
}

/* ========== 可折叠区域 ========== */
.collapsible-section {
    margin-bottom: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.collapsible-header:active {
    background: rgba(255,255,255,0.05);
}

.collapsible-header h3 {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0;
    font-weight: 500;
}

.collapse-icon {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    transition: transform 0.2s;
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-section.collapsed .collapsible-content {
    max-height: 0 !important;
}


/* 自定义内容弹窗 */
#custom-content-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

#custom-content-modal.show {
    display: block;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.custom-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: linear-gradient(180deg, #2d1b4e 0%, #1a0a2e 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-modal-title {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.custom-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.custom-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.custom-modal-body {
    padding: 20px;
    max-height: calc(80vh - 60px);
    overflow-y: auto;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.7;
}

.custom-modal-body p {
    margin: 0 0 12px 0;
}

.custom-modal-body a {
    color: #a78bfa;
}

.custom-modal-body img {
    max-width: 100%;
    border-radius: 8px;
}


/* ========== 本周听书统计 ========== */
.weekly-stats-section {
    margin-bottom: 32px;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 20px;
}

.weekly-stats-section h3 {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 16px 0;
    font-weight: 500;
}

.weekly-chart {
    margin-bottom: 12px;
}

.weekly-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100px;
    gap: 8px;
    padding-top: 18px;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.bar-value {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
    min-height: 14px;
}

.bar-item .bar {
    width: 100%;
    max-width: 28px;
    background: linear-gradient(180deg, #f97316, #ec4899);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
    margin-top: auto;
}

.bar-item .bar-label {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
}

.weekly-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

#weekly-total {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

#weekly-diff {
    font-size: 12px;
}

.diff-up {
    color: #10b981;
}

.diff-down {
    color: #ef4444;
}

/* ========== 听书时段 ========== */
.time-distribution-section {
    margin-bottom: 32px;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 20px;
}

.time-distribution-section h3 {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 12px 0;
    font-weight: 500;
}

.time-label {
    display: inline-block;
    background: linear-gradient(90deg, #f97316, #ec4899);
    color: #fff;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.time-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
}

/* ========== 我最爱的书籍 ========== */
.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px 16px;
}

.favorite-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.favorite-item:active {
    background: rgba(255,255,255,0.08);
}

.favorite-rank {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #f97316, #ec4899);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.favorite-cover {
    width: 36px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

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

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

.favorite-title {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.favorite-hours {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* ========== 全站热门书籍 ========== */
.hot-books-update {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    padding: 0 16px;
    margin-bottom: 8px;
}

.hot-books-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 16px;
}

.hot-book-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.hot-book-item:active {
    background: rgba(255,255,255,0.08);
}

.hot-rank {
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}

.hot-rank.top3 {
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: #fff;
}

.hot-book-cover {
    width: 32px;
    height: 42px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

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

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

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

.hot-book-stats {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    display: flex;
    gap: 6px;
}

/* ========== 通用无数据提示 ========== */
.no-data {
    text-align: center;
    padding: 24px 16px;
    color: rgba(255,255,255,0.35);
    font-size: 13px;
}
