/* ページ全体のレイアウト */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.author-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 50px 20px 0;
    width: 100%;
}

/* プロフィールヘッダー */
.profile-header {
    display: flex;
    margin-bottom: 30px;
    gap: 30px;
}

/* プロフィール画像 */
.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* プロフィール情報 */
.profile-info {
    flex: 1;
}

.profile-username {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-username h1 {
    font-size: 28px;
    margin: 0;
}

.profile-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-value {
    font-weight: 600;
}

.profile-bio {
    color: #333;
    line-height: 1.6;
}

/* 下書き情報セクション */
.drafts-info-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.drafts-info-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.drafts-icon {
    font-size: 24px;
    color: #2196F3;
    width: 48px;
    height: 48px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drafts-details {
    flex-grow: 1;
}

.drafts-details h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.draft-last-updated {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

.draft-edit-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #2196F3;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.draft-edit-button:hover {
    background: #1976D2;
    color: white;
    text-decoration: none;
}

/* 投稿グリッド */
.profile-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.post-item {
    position: relative;
    width: 100%;
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background-color: #f5f5f5;
}

.post-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-thumbnail.no-image i {
    font-size: 24px;
    color: #999;
}

.post-info {
    padding: 8px 0;
}

.post-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.post-date {
    font-size: 12px;
    color: #666;
}

/* カテゴリー表示の改善 */
.post-categories {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
}

.post-categories i {
    margin-right: 3px;
    color: #666;
}

/* 投稿概要の追加 */
.post-excerpt {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 投稿がない場合のスタイル */
.no-posts-message {
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px 20px;
}

.camera-icon {
    font-size: 40px;
    color: #ddd;
    margin-bottom: 15px;
}

.no-posts-message h2 {
    color: #333;
    font-size: 18px;
    margin: 0 0 10px;
}

.no-posts-message p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* デバッグ情報 */
.debug-info {
    padding: 15px;
    background-color: #ffecec;
    border: 1px solid #f5aca6;
    color: #c33;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* stat-itemにアイコンのスタイリングを追加 */
.stat-item .stat-label i {
    color: #666;
    font-size: 14px;
    margin-right: 2px;
}

/* InstagramのリンクのスタイリングをCSSクラスで追加 */
.instagram-link a {
    display: inline-flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.instagram-link a i {
    margin-right: 5px;
    color: #C13584;
}

.instagram-link a:hover {
    color: #C13584;
}

/* プロフィール編集ボタンのスタイル改善 */
.profile-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f0f0f0;
    color: #333;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.3s;
}

.profile-edit-btn i {
    font-size: 14px;
}

.profile-edit-btn:hover {
    background: #e0e0e0;
    text-decoration: none;
    color: #333;
}

/* タブのスタイル改善 */
.profile-tabs {
    display: flex;
    border-top: 1px solid #dbdbdb;
    margin-bottom: 20px;
}

.tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    font-size: 12px;
    color: #8e8e8e;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-right: 60px;
}

.tab i {
    margin-right: 6px;
}

.tab.active {
    color: #262626;
    font-weight: 600;
    border-top: 1px solid #262626;
    margin-top: -1px;
}

/* ページネーションのスタイル */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    grid-column: 1 / -1;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    margin: 0 5px 5px 0;
    padding: 0 5px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #f0f0f0;
}

.pagination .current {
    background-color: #2196F3;
    color: white;
}

.pagination .prev,
.pagination .next {
    width: auto;
    padding: 0 10px;
}

/* レスポンシブ対応の改善 */
@media (max-width: 1200px) {
    .author-container {
        max-width: 90%;
    }
    
    .main-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .profile-username {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .profile-username h1 {
        font-size: 24px;
    }
    
    .profile-stats {
        justify-content: center;
        gap: 30px;
    }
    
    .profile-edit-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .profile-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .post-title {
        font-size: 13px;
    }
    
    .post-excerpt {
        font-size: 11px;
    }
    
    .drafts-info-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .drafts-actions {
        margin: 10px 0 0;
    }
}

@media (max-width: 480px) {
    .author-container {
        padding: 20px 10px 0;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
    
    .profile-username h1 {
        font-size: 20px;
    }
    
    .profile-stats {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .profile-posts {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .post-title {
        font-size: 14px;
        -webkit-line-clamp: 1;
    }
    
    .post-excerpt {
        font-size: 12px;
    }
    
    .stat-item .stat-label i {
        font-size: 12px;
    }
    
    .tab {
        margin-right: 20px;
        font-size: 11px;
    }
}