/* ============================================================================
   UNIXBG PROFESSIONAL PROFILE - GitHub-Inspired Modern Design
   Chrome Compatible + Navigation Arrows
   ============================================================================ */

/* ============================================================================
   DESKTOP LAYOUT
   ============================================================================ */

.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* ============================================================================
   PROFILE SIDEBAR - Card Style
   ============================================================================ */

.profile-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-card:hover {
    box-shadow: 0 8px 24px var(--shadow);
}

/* Profile Header with Cover */
.profile-card-header {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    height: 100px;
    position: relative;
}

.profile-card-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    text-align: center;
    margin-top: -50px;
}

.profile-avatar-large {
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.profile-avatar-large img,
.avatar-placeholder-xl {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 4px solid var(--card-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.profile-avatar-large:hover img,
.profile-avatar-large:hover .avatar-placeholder-xl {
    transform: scale(1.05);
}

.avatar-placeholder-xl {
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
}

/* Username & Rank */
.profile-username {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.profile-rank {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.875rem;
    background: var(--secondary-bg);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

/* Rank Progress Bar */
.rank-progress {
    margin: 1rem 0;
    padding: 0.875rem;
    background: var(--secondary-bg);
    border-radius: 8px;
}

.rank-progress-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.rank-progress-bar {
    height: 6px;
    background: var(--primary-bg);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.rank-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
}

.rank-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Status Badge */
.profile-status {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.profile-banned {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

/* Stats Grid - GitHub Style */
.profile-stats-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 0.5rem;
    background: var(--card-bg);
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
}

.profile-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.profile-stat-item:hover {
    background: var(--secondary-bg);
    transform: translateY(-2px);
}

.profile-stat-item:nth-child(1):hover::before {
    background: var(--accent-color);
}

.profile-stat-item:nth-child(2):hover::before {
    background: var(--success);
}

.profile-stat-item:nth-child(3):hover::before {
    background: var(--warning);
}

.profile-stat-item .stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.3rem;
    transition: transform 0.2s ease;
}

.profile-stat-item:hover .stat-value {
    transform: scale(1.1);
}

.profile-stat-item:nth-child(1) .stat-value {
    color: var(--accent-color);
}

.profile-stat-item:nth-child(2) .stat-value {
    color: var(--success);
}

.profile-stat-item:nth-child(3) .stat-value {
    color: var(--warning);
}

.profile-stat-item .stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Info List - Clean Rows */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    padding: 0.75rem 0.875rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.profile-info-item:last-child {
    border-bottom: none;
}

.profile-info-item:hover {
    background: var(--secondary-bg);
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.7rem;
}

/* Action Buttons */
.profile-actions {
    margin-top: 1.25rem;
}

.profile-actions .btn {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
}

.profile-mod-actions {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.profile-mod-actions h4 {
    font-size: 0.8rem;
    margin-bottom: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ============================================================================
   PROFILE MAIN - Content Area
   ============================================================================ */

.profile-main {
    min-width: 0;
}

/* Tabs - GitHub Style with Navigation Arrows */
.profile-tabs-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.profile-tabs {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 0 40px;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

/* Navigation Arrows - Desktop Only */
.tabs-nav-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-bottom: none;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
    color: var(--text-secondary);
}

.tabs-nav-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}

.tabs-nav-arrow:hover {
    background: var(--secondary-bg);
    color: var(--accent-color);
}

.tabs-nav-arrow:active {
    -webkit-transform: scale(0.95);
    -ms-transform: scale(0.95);
    transform: scale(0.95);
}

.tabs-nav-arrow-left {
    left: 0;
    border-right: 1px solid var(--border-color);
}

.tabs-nav-arrow-right {
    right: 0;
    border-left: 1px solid var(--border-color);
}

.tabs-nav-arrow i {
    font-size: 0.9rem;
}

.profile-tab {
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.9rem;
    font-weight: 600;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.profile-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color);
    -webkit-transform: scaleX(0);
    -ms-transform: scaleX(0);
    transform: scaleX(0);
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: -webkit-transform 0.3s ease;
    -o-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

.profile-tab:hover:not(.active) {
    color: var(--text-primary);
    background: var(--secondary-bg);
}

.profile-tab.active {
    color: var(--accent-color);
}

.profile-tab.active::after {
    -webkit-transform: scaleX(1);
    -ms-transform: scaleX(1);
    transform: scaleX(1);
}

.tab-badge {
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Content Box */
.content-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.content-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.5rem;
}

/* Activity List - Timeline Style */
.activity-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
    margin-left: 1rem;
}

.activity-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 0.875rem;
    padding: 1rem 0;
    border-bottom: 1px solid transparent;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border: 2px solid var(--card-bg);
    border-radius: 50%;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--secondary-bg);
    border-radius: 8px;
    padding-left: 1rem;
    margin-left: -1rem;
}

.activity-item:hover::before {
    -webkit-transform: scale(1.3);
    -ms-transform: scale(1.3);
    transform: scale(1.3);
    -webkit-box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.activity-icon {
    font-size: 1.25rem;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background: var(--secondary-bg);
    border-radius: 8px;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.activity-item:hover .activity-icon {
    background: var(--accent-color);
    color: white;
    -webkit-transform: rotate(5deg);
    -ms-transform: rotate(5deg);
    transform: rotate(5deg);
}

.activity-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.activity-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.activity-title a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.activity-excerpt {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.activity-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 0.75rem;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.activity-meta span {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.25rem;
}

/* Messages - Card List */
.messages-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.messages-header h3 {
    margin-bottom: 0;
}

.messages-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1px;
    background: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.message-item {
    padding: 1.25rem;
    background: var(--card-bg);
    border-left: 4px solid transparent;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    cursor: pointer;
}

.message-item:hover {
    background: var(--secondary-bg);
    border-left-color: var(--border-color);
}

.message-unread {
    background: rgba(59, 130, 246, 0.05);
    border-left-color: var(--accent-color);
}

.message-unread:hover {
    background: rgba(59, 130, 246, 0.1);
}

.message-sender {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.message-sender-avatar,
.message-sender-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.message-sender-avatar-placeholder {
    background: var(--accent-color);
    color: white;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    -webkit-animation: pulse 2s infinite;
    animation: pulse 2s infinite;
}

@-webkit-keyframes pulse {
    0%, 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
    50% { opacity: 0.5; -webkit-transform: scale(0.9); transform: scale(0.9); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
    50% { opacity: 0.5; -webkit-transform: scale(0.9); transform: scale(0.9); }
}

.message-subject {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.message-subject a {
    color: var(--text-primary);
    text-decoration: none;
}

.message-subject a:hover {
    color: var(--accent-color);
}

.message-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Notifications - Similar to Messages */
.notifications-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1px;
    background: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.notification-item {
    background: var(--card-bg);
    border-left: 4px solid transparent;
    padding: 1.25rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1rem;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--secondary-bg);
    border-left-color: var(--border-color);
}

.notification-unread {
    background: rgba(59, 130, 246, 0.05);
    border-left-color: var(--accent-color);
}

.notification-icon {
    font-size: 1.5rem;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background: var(--secondary-bg);
    border-radius: 8px;
}

.notification-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.notification-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.notification-text a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.notification-text a:hover {
    color: var(--accent-color);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Linked Accounts */
.linked-accounts-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.linked-account-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.linked-account-item:hover {
    -webkit-box-shadow: 0 4px 12px var(--shadow);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--accent-color);
}

.linked-account-avatar img,
.linked-account-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    -o-object-fit: cover;
    object-fit: cover;
}

.linked-account-placeholder {
    background: var(--accent-color);
    color: white;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.linked-account-info {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.linked-account-username {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.linked-account-rank {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-link-danger {
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    -o-transition: all 0.2s;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-link-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Topics List Simple */
.topics-list-simple {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 1px;
    background: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.topic-item-simple {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 1.25rem;
    background: var(--card-bg);
    gap: 1rem;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.topic-item-simple:hover {
    background: var(--secondary-bg);
}

.topic-item-main {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
}

.topic-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.topic-item-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.topic-item-title a:hover {
    color: var(--accent-color);
}

.topic-item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1rem;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.topic-item-stats {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Settings */
.settings-divider {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.settings-form {
    margin-bottom: 2rem;
}

.settings-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.settings-subtitle {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    color: var(--text-primary);
}

.settings-form-compact {
    max-width: 500px;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert strong {
    display: block;
    margin-bottom: 0.5rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info);
    color: var(--info);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.info-box {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.info-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.info-box ul {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-box li {
    margin-bottom: 0.5rem;
}

.oauth-connection {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 1rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.oauth-connection-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 1rem;
}

.oauth-icon {
    font-size: 1rem;
    font-weight: 600;
}

.oauth-status {
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
}

.text-muted {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--secondary-bg);
    border-radius: 12px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Pagination */
.pagination {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.page-btn,
.page-number,
.page-current {
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.page-btn {
    background: var(--secondary-bg);
    color: var(--text-primary);
    text-decoration: none;
}

.page-btn:hover {
    background: var(--accent-color);
    color: white;
}

.page-number {
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
}

.page-number:hover {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

.page-current {
    background: var(--accent-color);
    color: white;
}

.page-dots {
    padding: 0.5rem;
    color: var(--text-secondary);
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
    -webkit-transition: color 0.2s ease;
    -o-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

.password-input {
    padding-right: 3rem;
}

/* ============================================================================
   MOBILE OPTIMIZATIONS (max-width: 767px)
   ============================================================================ */

@media (max-width: 767px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1rem;
    }
    
    .profile-sidebar {
        position: static;
    }
    
    /* Profile Card Header */
    .profile-card-header {
        height: 80px;
    }
    
    .profile-card-body {
        padding: 0 1.5rem 1.5rem 1.5rem;
        margin-top: -40px;
    }
    
    .profile-avatar-large img,
    .avatar-placeholder-xl {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }
    
    .avatar-placeholder-xl {
        font-size: 2rem;
    }
    
    .profile-username {
        font-size: 1.1rem;
    }
    
    .profile-rank {
        font-size: 0.7rem;
        padding: 0.25rem 0.75rem;
    }
    
    /* Rank Progress */
    .rank-progress {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .rank-progress-label {
        font-size: 0.65rem;
    }
    
    /* Stats Grid */
    .profile-stats-card {
        grid-template-columns: repeat(3, 1fr);
        margin-bottom: 1.25rem;
    }
    
    .profile-stat-item {
        padding: 0.75rem 0.5rem;
    }
    
    .profile-stat-item .stat-value {
        font-size: 1.2rem;
    }
    
    .profile-stat-item .stat-label {
        font-size: 0.6rem;
    }
    
    /* Info List */
    .profile-info {
        margin-bottom: 1.25rem;
    }
    
    .profile-info-item {
        font-size: 0.7rem;
        padding: 0.65rem 0.75rem;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-label {
        font-size: 0.65rem;
    }
    
    .info-value {
        font-size: 0.75rem;
    }
    
    /* Hide navigation arrows on mobile */
    .tabs-nav-arrow {
        display: none;
    }
    
    /* Tabs */
    .profile-tabs-wrapper {
        margin-bottom: 1.5rem;
    }
    
    .profile-tabs {
        gap: 0.5rem;
        padding: 0 0 0.5rem 0;
    }
    
    .profile-tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        border-radius: 8px 8px 0 0;
    }
    
    /* Content Box */
    .content-box {
        padding: 1.25rem;
    }
    
    .content-box h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }
    
    /* Activity Timeline */
    .activity-list {
        padding-left: 1.5rem;
        margin-left: 0.75rem;
    }
    
    .activity-item {
        padding: 1rem 0;
        gap: 0.75rem;
    }
    
    .activity-item::before {
        left: -2rem;
        top: 1.25rem;
        width: 10px;
        height: 10px;
    }
    
    .activity-item:hover {
        padding-left: 0.875rem;
        margin-left: -0.875rem;
    }
    
    .activity-icon {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
    
    .activity-title {
        font-size: 0.9rem;
    }
    
    .activity-excerpt {
        font-size: 0.8rem;
    }
    
    .activity-meta {
        font-size: 0.7rem;
    }
    
    /* Messages */
    .messages-header {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .messages-header .btn {
        width: 100%;
    }
    
    .message-item {
        padding: 1rem;
    }
    
    .message-sender {
        font-size: 0.85rem;
    }
    
    .message-sender-avatar,
    .message-sender-avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    /* Linked Accounts */
    .linked-account-item {
        padding: 1rem;
    }
    
    .linked-account-avatar img,
    .linked-account-placeholder {
        width: 44px;
        height: 44px;
    }
    
    .linked-account-placeholder {
        font-size: 1.1rem;
    }
    
    /* Topics */
    .topic-item-simple {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .topic-item-stats {
        width: 100%;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
    }
    
    /* Settings */
    .settings-form-compact {
        max-width: 100%;
    }
    
    .form-input,
    .form-textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    /* OAuth */
    .oauth-connection {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .oauth-connection .btn {
        width: 100%;
    }
    
    /* Empty State */
    .empty-state {
        padding: 3rem 1.5rem;
    }
    
    .empty-state-icon {
        font-size: 3.5rem;
    }
    
    .empty-state h3 {
        font-size: 1.1rem;
    }
    
    .empty-state p {
        font-size: 0.85rem;
    }
    
    /* Pagination */
    .pagination {
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .page-btn,
    .page-number,
    .page-current {
        min-width: 44px;
        min-height: 44px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    
    /* Hide middle page numbers */
    .pagination .page-number:nth-child(n+5):nth-last-child(n+4) {
        display: none;
    }
    
    /* Touch Optimizations */
    * {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    }
}

/* GitHub-style avatar edit hover */
.profile-avatar-large a {
    display: block;
    position: relative;
}

.profile-avatar-large a::after {
    content: '\f013';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--accent-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 3px solid var(--card-bg);
}

.profile-avatar-large a:hover::after {
    opacity: 1;
}

/* Small Phones */
@media (max-width: 374px) {
    .profile-avatar-large img,
    .avatar-placeholder-xl {
        width: 70px;
        height: 70px;
    }
    
    .profile-stat-item .stat-value {
        font-size: 1.05rem;
    }
    
    .profile-stat-item .stat-label {
        font-size: 0.55rem;
    }
}

/* Dark Mode Enhancements */
[data-theme="dark"] .profile-card-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(37, 99, 235, 0.8) 100%);
}

[data-theme="dark"] .activity-icon,
[data-theme="dark"] .notification-icon {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .profile-avatar-large img,
[data-theme="dark"] .avatar-placeholder-xl {
    border-color: var(--primary-bg);
}

[data-theme="dark"] .tabs-nav-arrow {
    background: var(--primary-bg);
}