/* static/css/users/reader_profile.css - 整理版 */

.reader-profile-container {
    background: #f5f7fa;
    min-height: 100vh;
}

/* ========== 封面區域 - 等級背景 ========== */
.profile-cover {
    padding: 2rem 0 1.5rem;
    position: relative;
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 讀者等級背景圖片（與 level_effects.css 對應） */
.profile-cover.level-bg-1 { background: linear-gradient(135deg, #6c757d, #495057); }
.profile-cover.level-bg-2 { background: linear-gradient(135deg, #8b5a2b, #6b4a2b); }
.profile-cover.level-bg-3 { background: linear-gradient(135deg, #cd7f32, #ad6f22); }
.profile-cover.level-bg-4 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); }
.profile-cover.level-bg-5 { background: linear-gradient(135deg, #20c997, #12b886); }
.profile-cover.level-bg-6 { background: linear-gradient(135deg, #ffd700, #ffaa00); }
.profile-cover.level-bg-7 { 
    background-image: url('/media/background/DiamondReader.png');
    background-size: cover;
    background-position: center;
}
.profile-cover.level-bg-8 { 
    background-image: url('/media/background/LegendaryReader.png');
    background-size: cover;
    background-position: center;
}
.profile-cover.level-bg-9 { 
    background-image: url('/media/background/InternationalReader.png');
    background-size: cover;
    background-position: center;
}
.profile-cover.level-bg-10 { 
    background-image: url('/media/background/BookDemon.png');
    background-size: cover;
    background-position: center;
}
.profile-cover.level-bg-11 { 
    background-image: url('/media/background/BookGod.png');
    background-size: cover;
    background-position: center;
}

/* 加強遮罩層，確保白色文字可讀 */
.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.profile-header-info {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* 編輯資料按鈕 - 左上角 */
.profile-edit-action {
    position: absolute;
    top: -0.5rem;
    left: 0;
}

/* 頭像和資訊區域 */
.profile-main-info {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex: 1;
    margin-left: 200px;
}

.profile-avatar-wrapper {
    flex-shrink: ;
}

.profile-avatar-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.profile-basic-info {
    flex: 1;
    padding-bottom: 0.5rem;
}

.profile-display-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.profile-username {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0.25rem 0 0.5rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.profile-level-badge {
    margin: 0.5rem 0;
}

.profile-bio {
    margin-top: 0.75rem;
    opacity: 0.95;
    max-width: 500px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* 讀者積分資訊 */
.reader-points-info {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reader-points-info .points-label {
    font-size: 0.95rem;
    opacity: 0.9;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.reader-points-info .points-label i {
    color: #ffd966;
    margin-right: 4px;
}

.reader-points-info .points-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffd966;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* 操作按鈕 - 右上角 */
.profile-action-buttons {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}

.profile-action-buttons .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.profile-action-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* ========== 內容區域 ========== */
.profile-content {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
}

/* ========== 側邊欄 ========== */
.sidebar-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.fan-levels-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fan-level-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fan-novel-link {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.fan-novel-link:hover {
    color: #667eea;
}

/* ========== 足跡統計 ========== */
.stats-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.footprint-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.footprint-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footprint-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f0f3ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footprint-icon i {
    font-size: 1.5rem;
    color: #667eea;
}

.footprint-info {
    display: flex;
    flex-direction: column;
}

.footprint-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.footprint-label {
    font-size: 0.85rem;
    color: #888;
}

/* ========== 最近活躍 ========== */
.activity-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.timeline-icon.bg-success { background: #28a745; }
.timeline-icon.bg-primary { background: #0d6efd; }
.timeline-icon.bg-warning { background: #f39c12; }

.timeline-content {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}

.timeline-action {
    color: #666;
}

.timeline-novel {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.timeline-novel:hover {
    color: #667eea;
}

.timeline-count {
    color: #f39c12;
    font-weight: 500;
}

.timeline-time {
    margin-left: auto;
    color: #aaa;
    font-size: 0.8rem;
}

/* ========== 響應式 ========== */
@media (max-width: 768px) {
    .profile-header-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-main-info {
        flex-direction: column;
        align-items: center;
        margin-left: 0;
    }
    
    .profile-basic-info {
        text-align: center;
    }
    
    .profile-level-badge {
        justify-content: center;
    }
    
    .profile-bio {
        margin-left: auto;
        margin-right: auto;
    }
    
    .profile-action-buttons {
        justify-content: center;
    }
    
    .profile-edit-action {
        position: static;
        margin-bottom: 0.5rem;
    }
    
    .reader-points-info {
        justify-content: center;
    }
    
    .footprint-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footprint-item {
        justify-content: center;
    }
    
    .profile-avatar-img {
        width: 300px;
        height: 300px;
    }
    
    .profile-display-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .footprint-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-time {
        margin-left: 0;
    }
}