/* Profile Page Styles */

.profile-main {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 100%);
}

/* Profile Header */
.profile-header-section {
    padding: 60px 0 40px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.3);
    text-transform: uppercase;
    line-height: 1;
}

.profile-info {
    flex: 1;
}

.profile-username {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-joined {
    font-size: 14px;
    color: var(--neutral-400);
    margin-bottom: 16px;
}

.profile-bio {
    font-size: 16px;
    color: var(--neutral-200);
    line-height: 1.6;
}

.profile-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.btn-follow,
.btn-unfollow {
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-follow {
    background: linear-gradient(135deg, var(--primary-500), var(--accent-purple));
    color: white;
    border-color: var(--primary-500);
}

.btn-follow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.btn-unfollow {
    background: transparent;
    color: var(--neutral-400);
    border-color: var(--glass-border);
}

.btn-unfollow:hover {
    border-color: var(--neutral-400);
    color: var(--neutral-200);
}

/* Takip Ettiklerim sekmesi */
.following-section {
    padding: 0;
}

.following-title,
.following-feed-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--neutral-100);
    margin-bottom: 16px;
}

.following-feed-title {
    margin-top: 32px;
}

.following-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.following-user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    max-width: 320px;
}

.following-user-card:hover {
    border-color: var(--primary-500);
    transform: translateY(-2px);
}

.following-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.following-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.following-user-name {
    font-weight: 600;
    color: var(--neutral-100);
}

.following-user-stats {
    font-size: 13px;
    color: var(--neutral-400);
}

/* Tıklanabilir istatistik (Takipçi / Takip listesi) */
.stat-item-clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}
.stat-item-clickable:hover {
    color: var(--primary-500);
}
.stat-item-clickable:hover .stat-value {
    color: var(--primary-500);
}

/* Takipçi / Takip listesi modal */
.users-list-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.users-list-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.users-list-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.users-list-modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 70vh;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.users-list-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}
.users-list-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--neutral-100);
    margin: 0;
}
.users-list-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--neutral-400);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 12px;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.users-list-modal-close:hover {
    color: var(--neutral-100);
    background: var(--glass-border);
}
.users-list-modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.users-list-loading-text,
.users-list-empty {
    text-align: center;
    color: var(--neutral-400);
    padding: 32px 16px;
    margin: 0;
}
.users-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid transparent;
    margin-bottom: 8px;
}
.users-list-item:last-child {
    margin-bottom: 0;
}
.users-list-item:hover {
    background: rgba(255, 107, 157, 0.08);
    border-color: var(--glass-border);
}
.users-list-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    text-transform: uppercase;
}
.users-list-item-name {
    font-weight: 600;
    color: var(--neutral-100);
    font-size: 16px;
}

.empty-following {
    color: var(--neutral-400);
    font-size: 15px;
    padding: 24px 0;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 48px;
    align-items: flex-start;
    row-gap: 24px;
}

.profile-stats .stat-item {
    text-align: center;
    min-width: 64px;
    padding: 8px 4px;
    flex-shrink: 0;
}

.profile-stats .stat-value {
    display: block;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: var(--primary-500);
    line-height: 1.2;
}

.profile-stats .stat-label {
    display: block;
    font-size: clamp(12px, 1.5vw, 14px);
    color: var(--neutral-400);
    margin-top: 6px;
    line-height: 1.3;
}

/* İtibar açıklama popover */
.reputation-stat-wrap {
    position: relative;
}

.reputation-stat-wrap .stat-label {
    display: inline-flex;
    align-items: center;
}

.reputation-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.2);
    color: var(--primary-500);
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.2s, color 0.2s;
}

.reputation-info-btn:hover {
    background: var(--primary-500);
    color: white;
}

.reputation-popover {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 260px;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
    font-size: 13px;
    line-height: 1.5;
}

.reputation-popover[hidden] {
    display: none !important;
}

.reputation-popover.is-open {
    display: block;
}

.reputation-popover-title {
    font-weight: 700;
    color: var(--neutral-100);
    margin-bottom: 10px;
    font-size: 14px;
}

.reputation-popover-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reputation-popover-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: var(--neutral-300);
}

.reputation-popover-list .rep-point {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--primary-500);
    min-width: 24px;
}

/* Profile Content */
.profile-content-section {
    padding: 40px 0 80px;
}

/* Tabs */
.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--glass-border);
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--neutral-400);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--neutral-200);
}

.tab-btn.active {
    color: var(--primary-500);
    border-bottom-color: var(--primary-500);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
}

.comment-card:hover {
    border-color: var(--primary-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.1);
}

.comment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comment-card-post-title {
    font-size: 14px;
    color: var(--neutral-400);
}

.comment-card-date {
    font-size: 12px;
    color: var(--neutral-500);
}

.comment-card-content {
    font-size: 15px;
    color: var(--neutral-200);
    line-height: 1.6;
}

/* Settings */
.settings-container {
    max-width: 600px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
}

.settings-container h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.setting-item {
    margin-bottom: 24px;
}

.setting-item label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--neutral-300);
    margin-bottom: 8px;
}

.setting-item textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--neutral-100);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: all 0.2s ease;
}

.setting-item textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    background: rgba(255, 255, 255, 0.08);
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--neutral-400);
    margin-top: 6px;
}

.settings-container hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 40px 0;
}

.btn-danger {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 68, 68, 0.4);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--neutral-400);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 968px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar-large {
        margin: 0 auto;
    }
    
    .profile-stats {
        justify-content: center;
        gap: 32px 40px;
        row-gap: 20px;
    }
    
    .profile-stats .stat-item {
        min-width: 56px;
        padding: 6px 2px;
    }
    
    .profile-stats .stat-value {
        font-size: 28px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .profile-stats {
        gap: 24px 32px;
        row-gap: 16px;
    }
    
    .profile-stats .stat-item {
        min-width: 52px;
        padding: 4px 0;
    }
    
    .profile-stats .stat-value {
        font-size: 24px;
    }
    
    .profile-stats .stat-label {
        font-size: 12px;
        margin-top: 4px;
    }
}