/* ==========================================================================
   用户页面专用样式 - Modern主题
   ========================================================================== */

/* 认证页面通用样式 */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.auth-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #333;
}

.input-help {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    color: #666;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 1px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.auth-footer p {
    margin: 8px 0;
}

/* 忘记密码页面特殊样式 */
.auth-card.forgot-card::before {
    background: linear-gradient(90deg, #f093fb, #f5576c);
}

.forgot-card .form-input:focus {
    border-color: #f093fb;
    box-shadow: 0 0 0 3px rgba(240, 147, 251, 0.1);
}

.forgot-card .auth-submit {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.forgot-card .auth-submit:hover {
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.3);
}

.forgot-card .auth-link {
    color: #f093fb !important;
}

/* 图标样式 */
.icon-user::before { content: "👤"; }
.icon-lock::before { content: "🔒"; }
.icon-email::before { content: "📧"; }
.icon-eye::before { content: "👁"; }
.icon-eye-off::before { content: "🙈"; }
.icon-login::before { content: "🚪"; }
.icon-register::before { content: "✨"; }
.icon-search::before { content: "🔍"; }
.icon-save::before { content: "💾"; }

/* ==========================================================================
   用户中心页面样式
   ========================================================================== */

.user-center {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: 70vh;
}

.menu-header {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

.user-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.user-info p {
    margin: 0;
    opacity: 0.8;
    font-size: 14px;
}

.menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-nav li {
    border-bottom: 1px solid #f0f0f0;
}

.menu-nav li:last-child {
    border-bottom: none;
}

.menu-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu-nav li.active a,
.menu-nav a:hover {
    background: #f8f9ff;
    color: #667eea;
}

.main-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.content-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.bookcase-stats,
.history-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

/* ==========================================================================
   书架页面样式
   ========================================================================== */

.bookcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.book-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.book-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.continue-btn {
    background: #4CAF50;
    color: white;
}

.info-btn {
    background: #2196F3;
    color: white;
}

.remove-btn {
    background: #f44336;
    color: white;
}

.action-btn:hover {
    transform: scale(1.1);
}

.book-info {
    padding: 15px;
}

.book-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.book-title a {
    color: #333;
    text-decoration: none;
}

.book-title a:hover {
    color: #667eea;
}

.book-author {
    margin: 0 0 10px 0;
    color: #888;
    font-size: 12px;
}

.book-progress {
    margin-bottom: 8px;
}

.progress-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
}

.progress-label {
    color: #666;
    min-width: 35px;
}

.progress-link {
    color: #667eea;
    text-decoration: none;
    flex: 1;
}

.progress-link:hover {
    text-decoration: underline;
}

.book-meta {
    color: #999;
    font-size: 11px;
    text-align: right;
}

.empty-bookcase,
.empty-history {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-bookcase h3,
.empty-history h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.empty-bookcase p,
.empty-history p {
    margin: 0 0 30px 0;
    font-size: 16px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* ==========================================================================
   阅读记录页面样式
   ========================================================================== */

.history-actions {
    margin-bottom: 20px;
    text-align: right;
}

.btn-secondary {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.history-cover {
    position: relative;
    width: 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.history-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-item:hover .history-overlay {
    opacity: 1;
}

.history-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    color: white;
    font-size: 10px;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.history-title a {
    color: #333;
    text-decoration: none;
}

.history-title a:hover {
    color: #667eea;
}

.history-author {
    margin: 0;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-chapter {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.chapter-label {
    color: #888;
    font-weight: 500;
    min-width: 80px;
}

.chapter-link {
    color: #667eea;
    text-decoration: none;
}

.chapter-link:hover {
    text-decoration: underline;
}

.chapter-link.latest {
    color: #28a745;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.read-time {
    color: #999;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-actions-inline {
    display: flex;
    gap: 8px;
}

.continue-btn {
    background: #4CAF50;
    color: white;
}

.continue-btn:hover {
    background: #45a049;
}

.remove-btn {
    background: #f44336;
    color: white;
}

.remove-btn:hover {
    background: #da190b;
}

/* ==========================================================================
   侧边栏样式
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar-title {
    margin: 0;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.recommend-list {
    padding: 15px;
}

.recommend-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.recommend-item:last-child {
    border-bottom: none;
}

.recommend-cover {
    width: 40px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.recommend-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-info {
    flex: 1;
    min-width: 0;
}

.recommend-info h4 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 500;
}

.recommend-info h4 a {
    color: #333;
    text-decoration: none;
}

.recommend-info h4 a:hover {
    color: #667eea;
}

.recommend-info p {
    margin: 0;
    color: #888;
    font-size: 12px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.more-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.more-link:hover {
    text-decoration: underline;
}

.stats-content {
    padding: 15px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-card:last-child {
    border-bottom: none;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.continue-reading {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
}

.continue-reading:hover {
    background: #5a6fd8;
}

/* 更多图标样式 */
.icon-book-open::before { content: "📖"; }
.icon-clock::before { content: "⏰"; }
.icon-time::before { content: "⏰"; }
.icon-empty-history::before { content: "📚"; }
.icon-user-large::before { content: "👤"; }
.icon-bookshelf::before { content: "📚"; }
.icon-history::before { content: "📖"; }
.icon-settings::before { content: "⚙️"; }
.icon-logout::before { content: "🚪"; }
.icon-book::before { content: "📘"; }
.icon-play::before { content: "▶️"; }
.icon-info::before { content: "ℹ️"; }
.icon-trash::before { content: "🗑️"; }
.icon-empty-bookshelf::before { content: "📚"; }

/* ==========================================================================
   响应式设计
   ========================================================================== */

@media (max-width: 1200px) {
    .user-center {
        grid-template-columns: 200px 1fr 250px;
        gap: 20px;
    }
    
    .bookcase-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .user-center {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        display: none;
    }
    
    .bookcase-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 20px 15px;
    }
    
    .auth-card {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .user-center {
        padding: 20px 15px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .bookcase-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .history-item {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .history-cover {
        align-self: center;
    }
    
    .history-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .history-actions-inline {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 20px 10px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .bookcase-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .book-info {
        padding: 10px;
    }
    
    .book-title {
        font-size: 12px;
    }
    
    .history-item {
        padding: 12px;
    }
    
    .history-actions-inline {
        flex-direction: column;
        gap: 5px;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 11px;
        width: auto;
        height: auto;
        border-radius: 4px;
    }
} 