/* FoxRide Account Styles */

/* ========================================
   Account Page
   ======================================== */

.account-section {
    min-height: calc(100vh - 80px);
    padding: 120px 0 60px;
    background: var(--background-alt);
}

.account-loading {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
}

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

.account-loading p {
    color: var(--text-secondary);
}

.account-content {
    max-width: 800px;
    margin: 0 auto;
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.account-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.account-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.account-info p {
    color: var(--text-secondary);
    margin: 4px 0 0;
}

.account-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.account-card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.account-card-header.clickable {
    cursor: pointer;
    transition: background 0.2s ease;
}

.account-card-header.clickable:hover {
    background: var(--background-alt);
}

.account-card-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-card-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.license-count-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    line-height: 20px;
    text-align: center;
}

.collapse-icon {
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.account-licenses {
    padding: 16px;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.account-licenses.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 16px;
}

.account-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-secondary);
}

.license-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--background-alt);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.license-item:last-child {
    margin-bottom: 0;
}

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

.license-name {
    font-weight: 600;
    color: var(--text-primary);
}

.license-key {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-family: monospace;
}

.license-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.license-status.active,
.status-active {
    background: rgba(0, 200, 83, 0.15);
    color: #00C853;
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.account-licenses,
.account-routes,
.account-workouts,
.account-ghosts,
.account-dashboards,
.account-bikes,
.account-backup,
.account-settings {
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.account-licenses.collapsed,
.account-routes.collapsed,
.account-workouts.collapsed,
.account-ghosts.collapsed,
.account-dashboards.collapsed,
.account-bikes.collapsed,
.account-backup.collapsed,
.account-settings.collapsed {
    max-height: 0 !important;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
}

.account-card-header.clickable {
    cursor: pointer;
    user-select: none;
}

.account-card-header.clickable:hover {
    opacity: 0.8;
}

.account-card-header .collapse-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.status-inactive {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

.account-routes,
.account-workouts,
.account-ghosts,
.account-dashboards,
.account-bikes,
.account-backup,
.account-licenses,
.account-settings {
    padding: 8px 24px;
}

.tool-button {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin: 8px 0;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.tool-button:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateX(4px);
}

.tool-icon {
    font-size: 2rem;
    line-height: 1;
}

.tool-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-info strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tool-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tool-arrow {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.tool-button:hover .tool-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

/* Saved Routes Section */
.saved-routes-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

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

.saved-routes-header.clickable {
    cursor: pointer;
    padding: 8px;
    margin: -8px -8px 12px -8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.saved-routes-header.clickable:hover {
    background: var(--background-alt);
}

.saved-routes-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.routes-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.saved-routes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.saved-route-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.saved-route-item:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.saved-route-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.saved-route-link:hover .saved-route-name {
    color: var(--accent);
}

.saved-route-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.saved-route-info {
    flex: 1;
    min-width: 0;
}

.saved-route-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Published Badge (Unified Tables) */
.published-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    background: #22c55e;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.saved-route-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.saved-route-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.saved-route-publish {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: 8px;
}

.btn-with-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-xs {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-danger {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.routes-empty,
.routes-loading,
.workouts-empty,
.workouts-loading,
.ghosts-empty,
.ghosts-loading,
.dashboards-empty,
.dashboards-loading,
.bikes-empty,
.bikes-loading,
.backup-empty,
.backup-loading {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Workouts / Ghosts / Dashboards / Bikes Section */
.saved-workouts-section,
.saved-ghosts-section,
.saved-dashboards-section,
.saved-bikes-section {
    margin-top: 16px;
}

.saved-workouts-header,
.saved-ghosts-header,
.saved-dashboards-header,
.saved-bikes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.saved-workouts-header.clickable,
.saved-ghosts-header.clickable,
.saved-dashboards-header.clickable,
.saved-bikes-header.clickable {
    cursor: pointer;
}

.saved-workouts-header h3,
.saved-ghosts-header h3,
.saved-dashboards-header h3,
.saved-bikes-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.workouts-count,
.ghosts-count,
.dashboards-count,
.bikes-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.saved-workouts-list,
.saved-ghosts-list,
.saved-dashboards-list,
.saved-bikes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.saved-routes-list.scrollable,
.saved-workouts-list.scrollable,
.saved-ghosts-list.scrollable,
.saved-dashboards-list.scrollable,
.saved-bikes-list.scrollable {
    max-height: 340px;
    overflow-y: auto;
}

.saved-workout-item,
.saved-ghost-item,
.saved-dashboard-item,
.saved-bike-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.saved-workout-item:hover,
.saved-ghost-item:hover,
.saved-dashboard-item:hover,
.saved-bike-item:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.saved-workout-icon,
.saved-ghost-icon,
.saved-dashboard-icon,
.saved-bike-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.saved-workout-info,
.saved-ghost-info,
.saved-dashboard-info,
.saved-bike-info {
    flex: 1;
    min-width: 0;
}

.saved-workout-name,
.saved-ghost-name,
.saved-dashboard-name,
.saved-bike-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.saved-workout-meta,
.saved-ghost-meta,
.saved-dashboard-meta,
.saved-bike-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.saved-workout-actions,
.saved-ghost-actions,
.saved-dashboard-actions,
.saved-bike-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.saved-ghost-publish {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: 8px;
}

.saved-workout-publish {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: 8px;
}

.visibility-select {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.visibility-select-outline {
    border: 1px solid #d1d5db;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.visibility-select:hover {
    border-color: var(--accent);
}

.visibility-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

.visibility-select.visibility-updated {
    border-color: var(--success);
    background: rgba(var(--success-rgb), 0.1);
}

.no-workouts-license,
.no-ghosts-license,
.no-dashboards-license,
.no-bikes-license,
.no-backup-license {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: 10px;
    text-align: center;
}

.no-workouts-license p,
.no-ghosts-license p,
.no-dashboards-license p,
.no-bikes-license p,
.no-backup-license p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.no-routes-license {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: 10px;
    text-align: center;
}

.no-routes-license p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Backup Info Card */
.backup-info-section {
    margin-top: 16px;
}

.backup-info-card {
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.backup-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.backup-meta-row:last-of-type {
    border-bottom: none;
}

.backup-meta-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.backup-meta-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
}

.backup-delete-btn {
    width: 100%;
    margin-top: 16px;
}

.account-settings {
    padding: 8px 24px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.setting-row:last-child {
    border-bottom: none;
}

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

.setting-info strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.setting-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.account-not-logged {
    max-width: 400px;
    margin: 0 auto;
}

.account-not-logged .login-card {
    text-align: center;
    padding: 48px;
}

.account-not-logged .info-icon {
    width: 64px;
    height: 64px;
    background: rgba(60, 161, 233, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 24px;
}

.account-not-logged h2 {
    font-size: 1.5rem;
    margin: 0 0 12px;
}

.account-not-logged p {
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .account-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .account-user {
        flex-direction: column;
    }

    .account-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* =============================================
   Social Profile Section (Account Page)
   ============================================= */

.account-social-profile {
    padding: 20px;
}

.social-profile-display {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-profile-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.social-profile-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 250px;
}

.social-profile-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.social-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.social-profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.social-displayname {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.social-username {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.social-bio-container {
    margin-top: 12px;
}

.social-bio {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    padding: 8px 12px;
    background: #f0f7ff;
    border-radius: 10px;
    border-left: 3px solid #3b82f6;
    margin: 0;
}

.social-stats {
    display: flex;
    gap: 24px;
}

.social-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.social-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.social-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-profile-edit {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.privacy-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.social-privacy-status {
    display: flex;
    gap: 8px;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    font-size: 14px;
    line-height: 1;
    text-align: center;
    opacity: 1;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.privacy-badge.disabled {
    background: var(--border-color);
    opacity: 0.5;
}

/* Social Medals */
.social-medals {
    width: 100%;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f5 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e0e4ea;
    margin-top: 16px;
}

.profile-edit-btn {
    width: 100%;
    margin-top: 16px;
}

.social-medals h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.medals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin: 0 !important;
    padding: 4px 0;
}

.medals-header:hover {
    color: #3b82f6 !important;
}

.medals-collapse-icon {
    font-size: 0.75rem;
    color: #888;
    background: #fff;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: color 0.2s;
}

.medals-header:hover .medals-collapse-icon {
    color: #3b82f6;
}

.medals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    padding-top: 12px;
}

.medals-grid.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

.medal-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #ffffff;
    border-left: 4px solid;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.medal-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.medal-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.medal-name {
    display: block;
    font-size: 0.75rem;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    max-width: 100%;
    text-align: center;
}

.medal-tier {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.medal-more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #f5f7fa;
    border: 2px dashed #d0d5dd;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

.medals-empty {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: 20px;
    grid-column: 1 / -1;
}

/* Visibility Options */
.visibility-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.radio-row:hover {
    border-color: var(--primary);
    background: rgba(255, 108, 51, 0.05);
}

.radio-row input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-label {
    font-weight: 600;
    color: var(--text-primary);
}

.radio-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =============================================
   Friends Section (Account Page)
   ============================================= */

.account-friends-content {
    padding: 0;
}

.friends-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
}

.friends-tab {
    flex: 1;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.friends-tab:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.friends-tab.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border-bottom: 2px solid #3b82f6;
    margin-bottom: -1px;
}

.friends-list {
    max-height: 400px;
    overflow-y: auto;
}

.friends-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.friends-empty-list {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.friend-item:last-child {
    border-bottom: none;
}

.friend-item:hover {
    background: var(--background-alt);
}

.friend-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.friend-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-username {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-xs {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Account Page Dark Mode */
[data-theme="dark"] .social-bio {
    color: #cbd5e1;
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
}

[data-theme="dark"] .social-medals {
    background: linear-gradient(135deg, #1e1e2e 0%, #252535 100%);
    border-color: var(--border);
}

[data-theme="dark"] .social-medals h4 {
    color: var(--text-secondary);
}

[data-theme="dark"] .medals-collapse-icon {
    color: var(--text-secondary);
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .medal-item {
    background: var(--surface);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .medal-name {
    color: var(--text-primary);
}

[data-theme="dark"] .medal-more {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="dark"] .medals-empty {
    color: var(--text-secondary);
}

[data-theme="dark"] .friends-tabs {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .friends-tab:hover {
    background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .friends-tab.active {
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .visibility-select-outline {
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .radio-row {
    border-color: var(--border);
}

[data-theme="dark"] .radio-row:hover {
    background: rgba(59, 130, 246, 0.05);
}

