/* ============================================
   PROFILE MODAL
   ============================================ */

.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: overlayIn var(--duration-fast) var(--ease-out);
}

.profile-modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    width: 420px;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalIn var(--duration-normal) var(--ease-out);
}

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-medium);
}

.profile-modal-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.profile-modal-close {
    background: none;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color var(--duration-fast) var(--ease-out);
}

.profile-modal-close:hover {
    color: var(--text-primary);
}

.profile-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* ---- Avatar Section ---- */
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    margin-bottom: 12px;
}

.profile-name {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.profile-username {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* ---- Stats Grid ---- */
.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.profile-stat-value {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
    line-height: 1;
    margin-bottom: 4px;
}

.profile-stat-label {
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- Meta Info ---- */
.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.profile-meta-label {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.profile-meta-value {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* ---- Color Picker (own profile) ---- */
.profile-color-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-color-label {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.profile-color-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: all var(--duration-fast) var(--ease-out);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.profile-color-swatch:hover {
    transform: scale(1.15);
}

.profile-color-swatch.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--bg-base), 0 0 8px rgba(255, 255, 255, 0.2);
}

.profile-color-custom-wrap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    background: conic-gradient(#ef4444, #eab308, #10b981, #3b82f6, #8b5cf6, #ef4444);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: transform var(--duration-fast) var(--ease-out);
}

.profile-color-custom-wrap:hover {
    transform: scale(1.15);
}

.profile-color-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

/* ---- Logout Button ---- */
.profile-logout-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: center;
}

.profile-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

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

.profile-logout-btn svg {
    flex-shrink: 0;
}
