/* ===================================
   PROFILE PAGE — Premium Redesign
   Zero inline styles. Full theme support.
   =================================== */

/* ═══ ANIMATIONS ═══ */
@keyframes profileFadeSlide {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes profileCardEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══ CONTAINER ═══ */
.profile-container {
    max-width: 720px;
    margin: var(--space-lg) auto var(--space-2xl);
    width: 92%;
}

/* ═══ HERO CARD ═══ */
.profile-hero {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: profileCardEnter 0.4s ease both;
}

.profile-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary, var(--accent-primary)));
    opacity: 0.8;
    z-index: 2;
}

/* Banner */
.profile-hero-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.profile-hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            var(--bg-surface) 100%);
}

.profile-hero--has-banner {
    padding-top: calc(100px + var(--space-xl));
}

.profile-hero--has-banner .profile-hero-avatar-wrap {
    z-index: 1;
}

.profile-hero--has-banner .profile-hero-info {
    z-index: 1;
}

.profile-hero--has-banner .profile-hero-avatar {
    border-color: var(--bg-surface);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="deep-ether"] .profile-hero-banner::after {
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(14, 21, 40, 0.88) 100%);
}

[data-theme="deep-ether"] .profile-hero {
    background: rgba(14, 21, 40, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(99, 140, 230, 0.10);
}

[data-theme="deep-ether"] .profile-hero::before {
    background: linear-gradient(90deg, var(--primary-azure), #5B9BFF);
}

/* Avatar */
.profile-hero-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-hero-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.profile-hero-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-glow-soft, rgba(168, 197, 69, 0.2));
}

[data-theme="deep-ether"] .profile-hero-avatar {
    border-color: var(--primary-azure);
}

[data-theme="deep-ether"] .profile-hero-avatar:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.30);
}

.profile-hero-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid var(--bg-surface);
}

.profile-hero-status--banned {
    background: var(--accent-danger);
    color: white;
}

/* Hero Info */
.profile-hero-info {
    flex: 1;
    min-width: 0;
}

.profile-hero-name {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 var(--space-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    line-height: 1.3;
}

.profile-hero-meta {
    margin-bottom: var(--space-md);
}

.profile-hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.profile-stat {
    display: flex;
    flex-direction: column;
}

.profile-stat-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    font-feature-settings: 'tnum' 1;
}

.profile-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.profile-stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color);
}

[data-theme="deep-ether"] .profile-stat-divider {
    background: rgba(99, 140, 230, 0.12);
}

/* ═══ TABS ═══ */
.profile-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding: 4px;
    background: var(--bg-surface-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    animation: profileCardEnter 0.4s ease both;
    animation-delay: 0.1s;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

[data-theme="deep-ether"] .profile-tabs {
    background: rgba(14, 21, 40, 0.75);
    border-color: rgba(99, 140, 230, 0.10);
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-tab:hover {
    color: var(--text-main);
    background: var(--bg-surface);
}

[data-theme="deep-ether"] .profile-tab:hover {
    background: rgba(99, 140, 230, 0.08);
}

.profile-tab.active {
    background: var(--bg-surface);
    color: var(--text-main);
    box-shadow: var(--shadow-card);
}

[data-theme="deep-ether"] .profile-tab.active {
    background: rgba(99, 140, 230, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.profile-tab i {
    font-size: 13px;
}

.profile-tab.active i {
    color: var(--accent-primary);
}

[data-theme="deep-ether"] .profile-tab.active i {
    color: var(--primary-azure);
}

.profile-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent-primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
}

[data-theme="deep-ether"] .profile-tab-count {
    background: var(--primary-azure);
}

/* ═══ PANELS ═══ */
.profile-panel {
    display: none;
}

.profile-panel.active {
    display: block;
    animation: profileFadeSlide 0.3s ease both;
}

/* ═══ CARDS ═══ */
.profile-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-md);
    animation: profileCardEnter 0.3s ease both;
}

[data-theme="deep-ether"] .profile-card {
    background: rgba(14, 21, 40, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(99, 140, 230, 0.10);
}

.profile-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 var(--space-md) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.profile-card-title i {
    color: var(--accent-primary);
    font-size: 14px;
}

[data-theme="deep-ether"] .profile-card-title i {
    color: var(--primary-azure);
}

.profile-card-title--danger {
    color: var(--accent-danger);
}

.profile-card-title--danger i {
    color: var(--accent-danger) !important;
}

.profile-card-subtitle {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    margin: var(--space-lg) 0 var(--space-sm) 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.profile-card-centered {
    text-align: center;
}

.profile-card-danger {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    padding: var(--space-md) 0 0;
    backdrop-filter: none;
}

[data-theme="deep-ether"] .profile-card-danger {
    background: transparent;
    backdrop-filter: none;
}

.profile-card-mod {
    border-color: rgba(255, 59, 48, 0.2);
}

[data-theme="deep-ether"] .profile-card-mod {
    border-color: rgba(255, 59, 48, 0.15);
}

/* ═══ FORM ENHANCEMENTS ═══ */
.profile-form .form-group {
    margin-bottom: var(--space-lg);
}

.form-label-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* Avatar upload zone */
.avatar-upload-zone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.avatar-upload-zone:hover,
.avatar-upload-zone.dragover {
    border-color: var(--accent-primary);
    background: var(--accent-highlight, rgba(168, 197, 69, 0.03));
}

[data-theme="deep-ether"] .avatar-upload-zone:hover,
[data-theme="deep-ether"] .avatar-upload-zone.dragover {
    border-color: var(--primary-azure);
    background: rgba(59, 130, 246, 0.08);
}

.avatar-upload-zone.has-file {
    border-color: var(--accent-success);
    border-style: solid;
}

.avatar-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.avatar-upload-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.avatar-upload-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

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

.avatar-upload-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.avatar-upload-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-main);
}

.avatar-upload-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Banner upload zone */
.banner-upload-zone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.banner-upload-zone:hover,
.banner-upload-zone.dragover {
    border-color: var(--accent-primary);
    background: var(--accent-highlight, rgba(168, 197, 69, 0.03));
}

[data-theme="deep-ether"] .banner-upload-zone:hover,
[data-theme="deep-ether"] .banner-upload-zone.dragover {
    border-color: var(--primary-azure);
    background: rgba(59, 130, 246, 0.08);
}

.banner-upload-zone.has-file {
    border-color: var(--accent-success);
    border-style: solid;
}

.banner-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.banner-upload-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.banner-upload-preview {
    width: 160px;
    height: 54px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.banner-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-upload-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-alt);
    color: var(--text-muted);
    font-size: 20px;
}

.banner-upload-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.banner-upload-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-main);
}

.banner-upload-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* "Recadrer" button below the upload zone */
.banner-recrop-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-sm);
    padding: 7px 14px;
    background: var(--bg-surface-alt);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.banner-recrop-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: var(--accent-highlight, rgba(168, 197, 69, 0.06));
}

[data-theme="deep-ether"] .banner-recrop-btn:hover {
    color: var(--primary-azure);
    border-color: var(--primary-azure);
    background: rgba(59, 130, 246, 0.08);
}

.banner-recrop-btn i {
    font-size: 11px;
}

/* ═══ BANNER CROP MODAL ═══ */
.crop-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: var(--space-md);
}

.crop-modal-overlay.active {
    opacity: 1;
}

.crop-modal {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.crop-modal-overlay.active .crop-modal {
    transform: translateY(0) scale(1);
}

[data-theme="deep-ether"] .crop-modal {
    background: rgba(14, 21, 40, 0.95);
    border-color: rgba(99, 140, 230, 0.15);
}

.crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="deep-ether"] .crop-modal-header {
    border-color: rgba(99, 140, 230, 0.10);
}

.crop-modal-title {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.crop-modal-title i {
    color: var(--accent-primary);
    font-size: 16px;
}

[data-theme="deep-ether"] .crop-modal-title i {
    color: var(--primary-azure);
}

.crop-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.crop-modal-close:hover {
    color: var(--text-main);
    background: var(--bg-surface-alt);
}

.crop-modal-hint {
    margin: 0;
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.crop-canvas-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.15);
    min-height: 200px;
    overflow: hidden;
}

[data-theme="deep-ether"] .crop-canvas-wrap {
    background: rgba(0, 0, 0, 0.25);
}

.crop-canvas-wrap canvas {
    border-radius: var(--radius-sm);
    max-width: 100%;
    display: block;
    touch-action: none;
}

.crop-modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-color);
}

[data-theme="deep-ether"] .crop-modal-actions {
    border-color: rgba(99, 140, 230, 0.10);
}

.crop-btn-cancel {
    background: var(--bg-surface-alt) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-color) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    padding: 8px 18px;
}

.crop-btn-cancel:hover {
    color: var(--text-main) !important;
    background: var(--bg-surface) !important;
}

.crop-btn-confirm {
    background: var(--accent-primary) !important;
    color: white !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 8px 22px;
}

.crop-btn-confirm:hover {
    filter: brightness(1.1);
}

[data-theme="deep-ether"] .crop-btn-confirm {
    background: var(--primary-azure) !important;
}

/* Responsive crop modal */
@media (max-width: 600px) {
    .crop-modal {
        max-width: 100%;
        border-radius: var(--radius-md);
    }

    .crop-modal-header {
        padding: var(--space-sm) var(--space-md);
    }

    .crop-modal-actions {
        padding: var(--space-sm) var(--space-md);
    }

    .crop-modal-hint {
        padding: var(--space-xs) var(--space-md);
    }

    .crop-canvas-wrap {
        padding: var(--space-sm);
    }
}

.profile-save-btn {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ═══ LOGOUT / BLOCK BUTTONS ═══ */
.profile-logout-btn {
    background: var(--accent-danger) !important;
    color: white !important;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    justify-content: center;
}

.profile-block-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 160px;
    justify-content: center;
}

.profile-block-btn--block {
    background: var(--accent-danger) !important;
    color: white !important;
}

.profile-block-btn--unblock {
    background: var(--accent-success) !important;
    color: white !important;
}

.profile-block-notice {
    color: var(--accent-danger);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

/* ═══ BIO / SIGNATURE (viewing) ═══ */
.profile-bio-text {
    font-size: var(--text-base);
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.profile-signature-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

[data-theme="deep-ether"] .profile-signature-section {
    border-color: rgba(99, 140, 230, 0.10);
}

.profile-signature-content {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* ═══ POST LIST ═══ */
.profile-post-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.profile-post-item {
    display: block;
    padding: var(--space-md);
    background: var(--bg-surface-alt);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.profile-post-item:hover {
    background: var(--bg-surface);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}

[data-theme="deep-ether"] .profile-post-item {
    background: rgba(10, 16, 30, 0.65);
    border-color: rgba(99, 140, 230, 0.08);
}

[data-theme="deep-ether"] .profile-post-item:hover {
    background: rgba(14, 21, 40, 0.80);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.profile-post-topic {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: 6px;
}

[data-theme="deep-ether"] .profile-post-topic {
    color: var(--primary-azure);
}

.profile-post-topic i {
    font-size: 10px;
    opacity: 0.7;
}

.profile-post-excerpt {
    font-size: var(--text-base);
    color: var(--text-main);
    line-height: 1.5;
    max-height: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.profile-post-date {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-xs);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ═══ USER CHIPS (blocked users) ═══ */
.profile-user-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.profile-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-surface-alt);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.2s ease;
}

.profile-user-chip:hover {
    background: var(--bg-surface);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-card);
}

[data-theme="deep-ether"] .profile-user-chip {
    background: rgba(10, 16, 30, 0.65);
    border-color: rgba(99, 140, 230, 0.10);
}

[data-theme="deep-ether"] .profile-user-chip:hover {
    border-color: var(--primary-azure);
    background: rgba(59, 130, 246, 0.10);
}

.profile-user-chip-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* ═══ TIMELINE (block history) ═══ */
.profile-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 360px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.profile-timeline::-webkit-scrollbar {
    width: 3px;
}

.profile-timeline::-webkit-scrollbar-track {
    background: transparent;
}

.profile-timeline::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.profile-timeline-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-surface-alt);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    border-left: 3px solid transparent;
}

.profile-timeline-item--danger {
    border-left-color: var(--accent-danger);
}

.profile-timeline-item--success {
    border-left-color: var(--accent-success);
}

[data-theme="deep-ether"] .profile-timeline-item {
    background: rgba(10, 16, 30, 0.55);
}

.profile-timeline-icon {
    flex-shrink: 0;
    font-size: 11px;
}

.profile-timeline-item--danger .profile-timeline-icon {
    color: var(--accent-danger);
}

.profile-timeline-item--success .profile-timeline-icon {
    color: var(--accent-success);
}

.profile-timeline-body {
    flex: 1;
    min-width: 0;
}

.profile-timeline-actor {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
}

.profile-timeline-actor:hover {
    text-decoration: underline;
}

.profile-timeline-action {
    color: var(--text-muted);
    margin: 0 4px;
}

.profile-timeline-time {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text-muted);
}

/* ═══ MOD ACTIONS ═══ */
.mod-lock-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 60, 60, 0.1);
    color: #ff4444;
    font-size: var(--text-xs);
    font-weight: 600;
    border: 1px solid rgba(255, 60, 60, 0.2);
}

/* ═══ MODAL ═══ */
.profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.profile-modal-overlay.visible {
    opacity: 1;
}

.profile-modal {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s var(--ease-spring);
}

.profile-modal-overlay.visible .profile-modal {
    transform: scale(1) translateY(0);
}

[data-theme="deep-ether"] .profile-modal {
    background: rgba(10, 16, 30, 0.95);
    backdrop-filter: blur(20px);
    border-color: rgba(99, 140, 230, 0.12);
}

.profile-modal--danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.profile-modal-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 var(--space-md) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.profile-modal-title--danger {
    color: var(--accent-danger);
}

.profile-modal-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 var(--space-lg) 0;
}

.profile-modal-warning {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--text-main);
    line-height: 1.6;
}

.profile-modal-warning ul {
    margin: var(--space-sm) 0 0;
    padding-left: var(--space-lg);
    color: var(--text-muted);
}

.profile-modal-warning li {
    margin-bottom: var(--space-xs);
}

.profile-modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.profile-modal-cancel {
    background: var(--bg-surface-alt) !important;
    color: var(--text-main) !important;
}

.profile-modal-confirm {
    background: var(--accent-warning) !important;
    color: white !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-modal-confirm--danger {
    background: var(--accent-danger) !important;
}

/* ═══ RESPONSIVE — MOBILE ═══ */
@media (max-width: 768px) {
    .profile-container {
        width: 100%;
        max-width: 100%;
        padding: 0 var(--space-sm);
        margin: var(--space-sm) auto var(--space-xl);
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .profile-hero {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md) var(--space-sm);
        gap: var(--space-md);
        box-shadow: none;
    }

    .profile-hero-avatar {
        width: 72px;
        height: 72px;
    }

    .profile-hero--has-banner {
        padding-top: calc(60px + var(--space-md));
    }

    .profile-hero-banner {
        height: 100px;
    }

    .banner-upload-content {
        flex-direction: column;
        text-align: center;
    }

    .banner-upload-preview {
        width: 100%;
        height: 48px;
    }

    .profile-hero-name {
        justify-content: center;
        font-size: var(--text-xl);
    }

    .profile-hero-meta {
        display: flex;
        justify-content: center;
    }

    .profile-hero-stats {
        justify-content: center;
    }

    .profile-tabs {
        margin-top: var(--space-md);
        margin-bottom: var(--space-md);
    }

    .profile-tab {
        padding: 8px 12px;
        font-size: var(--text-xs);
    }

    .profile-tab span {
        display: none;
    }

    .profile-tab i {
        font-size: 16px;
    }

    .profile-tab.active span {
        display: inline;
    }

    .profile-card {
        padding: var(--space-md);
        box-shadow: none;
        overflow-x: hidden;
    }

    .profile-post-item {
        padding: var(--space-sm) var(--space-md);
    }

    .profile-timeline-item {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--text-xs);
    }

    .profile-timeline-time {
        font-size: 10px;
    }

    .profile-user-chip {
        font-size: var(--text-xs);
        padding: 3px 8px 3px 3px;
    }

    .profile-user-chip-avatar {
        width: 20px;
        height: 20px;
    }

    .mod-actions {
        flex-direction: column;
    }

    .mod-btn {
        width: 100%;
        justify-content: center;
    }

    .avatar-upload-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-modal {
        width: 95%;
        padding: var(--space-lg);
    }

    /* Mobile Enhancements for Logout & Settings */
    .profile-save-btn,
    .banner-recrop-btn {
        display: flex;
        width: 100%;
        min-height: 48px;
        border-radius: 24px;
        font-size: 16px;
        font-weight: bold;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        margin-top: 8px;
    }

    .profile-logout-btn {
        display: flex;
        width: 100%;
        min-height: 48px;
        border-radius: 24px;
        font-size: 16px;
        font-weight: bold;
        padding: 14px 20px;
        box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
    }
}

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {

    .profile-hero,
    .profile-card,
    .profile-panel.active,
    .profile-tabs {
        animation: none !important;
    }

    .profile-hero-avatar:hover {
        transform: none;
    }
}

/* ═══════════════════════════════════════════
   MP LEVEL CONFIG — Premium Component
   ═══════════════════════════════════════════ */

.mp-config-card {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.mp-config-card:hover {
    border-color: var(--accent-primary);
}

.mp-config-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary, var(--accent-primary)));
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.mp-config-card:hover::before {
    opacity: 1;
}

[data-theme="deep-ether"] .mp-config-card {
    background: rgba(14, 21, 40, 0.65);
    border-color: rgba(99, 140, 230, 0.10);
}

[data-theme="deep-ether"] .mp-config-card:hover {
    border-color: rgba(99, 140, 230, 0.25);
}

[data-theme="deep-ether"] .mp-config-card::before {
    background: linear-gradient(90deg, var(--primary-azure), #5B9BFF);
}

.mp-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.mp-config-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.01em;
}

.mp-config-title i {
    color: var(--accent-primary);
    font-size: 14px;
}

[data-theme="deep-ether"] .mp-config-title i {
    color: var(--primary-azure);
}

.mp-config-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

/* Slider container */
.mp-config-slider-wrap {
    position: relative;
    padding: 4px 0;
}

.mp-config-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mp-config-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 3px solid var(--bg-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mp-config-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.mp-config-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 3px solid var(--bg-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="deep-ether"] .mp-config-slider::-webkit-slider-thumb {
    background: var(--primary-azure);
    border-color: rgba(14, 21, 40, 0.88);
}

[data-theme="deep-ether"] .mp-config-slider::-moz-range-thumb {
    background: var(--primary-azure);
    border-color: rgba(14, 21, 40, 0.88);
}

/* Presets */
.mp-config-presets {
    display: flex;
    gap: 6px;
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.mp-preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mp-preset-chip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-highlight, rgba(168, 197, 69, 0.06));
}

.mp-preset-chip.active {
    border-color: var(--accent-primary);
    color: white;
    background: var(--accent-primary);
}

[data-theme="deep-ether"] .mp-preset-chip:hover {
    border-color: var(--primary-azure);
    color: var(--primary-azure);
    background: rgba(59, 130, 246, 0.08);
}

[data-theme="deep-ether"] .mp-preset-chip.active {
    border-color: var(--primary-azure);
    background: var(--primary-azure);
}

/* Info bar */
.mp-config-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-sm);
    padding: 6px 10px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.mp-config-info i {
    font-size: 10px;
    opacity: 0.6;
}

[data-theme="deep-ether"] .mp-config-info {
    background: rgba(14, 21, 40, 0.5);
}

/* Responsive */
@media (max-width: 480px) {
    .mp-config-card {
        padding: var(--space-sm) var(--space-md);
    }

    .mp-config-presets {
        gap: 4px;
    }

    .mp-preset-chip {
        padding: 3px 8px;
        font-size: 10px;
    }
}