/* static/css/users/author_profile.css - 整理版 */

.author-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;
}

/* 各等級背景圖片（與 dashboard 一致） */
.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, #3a86ff, #2c6ecc); }
.profile-cover.level-bg-5 { background: linear-gradient(135deg, #ff99cc, #ff66b5); }
.profile-cover.level-bg-6 { background: linear-gradient(135deg, #e8e8e8, #c0c0c0); }
.profile-cover.level-bg-7 { background: linear-gradient(135deg, #ffd700, #ffaa00); }
.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/NationalTreasure.png'); background-size: cover; background-position: center; }
.profile-cover.level-bg-10 { background-image: url('/media/background/MythicalAuthor.png'); background-size: cover; background-position: center; }
.profile-cover.level-bg-11 { background-image: url('/media/background/AbsoluteGod.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: 0;
}

.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-bio {
    margin-top: 0.75rem;
    opacity: 0.95;
    max-width: 500px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* 作者積分資訊 */
.author-points-info {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.author-points-info .points-label {
    font-size: 0.95rem;
    opacity: 0.9;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.author-points-info .points-label i {
    color: #ffd966;
    margin-right: 4px;
}

.author-points-info .points-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffd966;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.author-points-info .royalty-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.author-points-info .royalty-badge i {
    margin-right: 4px;
}

/* 作者等級徽章 */
.author-badge {
    font-size: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-left: 0.75rem;
    vertical-align: middle;
}

/* 操作按鈕 - 右上角 */
.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;
}

/* 統計卡片 */
.author-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
}

/* 區塊標題 */
.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
}

/* ========== 主要內容區域（左作品 + 右榮譽） ========== */
.main-content-row {
    display: flex;
    gap: 1.5rem;
}

.works-column {
    flex: 1;
    min-width: 0;
}

.honors-column {
    width: 220px;
    flex-shrink: 0;
}

.section-block {
    margin-bottom: 2rem;
}

/* 作品網格 - 3列 */
.novel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

/* 作品卡片 */
.novel-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
    display: block;
}

.novel-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.novel-cover-link {
    display: block;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f0f0f0;
}

.novel-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.novel-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.novel-info {
    padding: 1rem;
}

.novel-title {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
}

.novel-title:hover {
    color: #667eea;
}

.novel-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.novel-category {
    color: #666;
}

.novel-status {
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.status-ongoing {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-completed {
    background: #e3f2fd;
    color: #1565c0;
}

.status-paused {
    background: #fff3e0;
    color: #e65100;
}

.novel-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #888;
}

.novel-stats i {
    margin-right: 0.25rem;
}

.novel-description {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* 歷史榮譽 - 垂直右側 */
.honors-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 20px;
}

.honors-section .section-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.honors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.honor-card {
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.honor-card:last-child {
    border-bottom: none;
}

.honor-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.honor-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.honor-desc {
    font-size: 0.75rem;
    color: #888;
}

/* ========== 響應式 ========== */
@media (max-width: 992px) {
    .main-content-row {
        flex-direction: column;
    }
    
    .honors-column {
        width: 100%;
    }
    
    .honors-section {
        position: static;
    }
    
    .honors-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .honor-card {
        border-bottom: none;
    }
    
    .novel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@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-bio {
        margin-left: auto;
        margin-right: auto;
    }
    
    .profile-action-buttons {
        justify-content: center;
    }
    
    .profile-edit-action {
        position: static;
        margin-bottom: 0.5rem;
    }
    
    .author-points-info {
        justify-content: center;
    }
    
    .author-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .profile-avatar-img {
        width: 150px;
        height: 150px;
    }
    
    .profile-display-name {
        font-size: 1.5rem;
    }
    
    .novel-grid {
        grid-template-columns: 1fr;
    }
    
    .honors-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .author-points-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}