/* ===================== */
/* Profile hover card */
/* ===================== */

.profile-card {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px;
    z-index: 20001;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
    min-width: 200px;
    border: 1px solid #e4e6eb;

    /* Handle oversized cards */
    max-width: min(400px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    overflow: auto;
    box-sizing: border-box;
}

.profile-card.show {
    opacity: 1;
}

.profile-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    border: 3px solid #1877f2;
}

.profile-card-username {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color: #333;
    margin-bottom: 8px;
}

.profile-card-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.profile-card-rank-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.profile-card-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.profile-card-stat {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f0f2f5;
}

.profile-card-stat:last-child {
    border-bottom: none;
}

.profile-card-label {
    font-weight: 500;
}

.profile-card-value {
    font-weight: bold;
    color: #1877f2;
}

.profile-card-moderator-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================== */
/* Profile Card Actions */
/* ===================== */

.profile-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e4e6eb;
}

.btn-mute,
.btn-report {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-mute {
    background: #f0f2f5;
    color: #333;
}

.btn-mute:hover {
    background: #e4e6eb;
    transform: translateY(-1px);
}

.btn-report {
    background: #fff3cd;
    color: #856404;
}

.btn-report:hover {
    background: #ffeaa7;
    transform: translateY(-1px);
}

/* ===================== */
/* Report Dialog */
/* ===================== */

.report-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-dialog-overlay.show {
    opacity: 1;
}

.report-dialog {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 480px;
    width: calc(100% - 40px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.report-dialog.show {
    transform: scale(1);
    opacity: 1;
}

.report-dialog h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.report-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-form label {
    font-weight: 600;
    font-size: 14px;
    color: #555;
    margin-bottom: 4px;
    display: block;
}

.report-select {
    padding: 10px 12px;
    border: 2px solid #e4e6eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.report-select:focus {
    outline: none;
    border-color: #1877f2;
}

.report-notes {
    padding: 10px 12px;
    border: 2px solid #e4e6eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.report-notes:focus {
    outline: none;
    border-color: #1877f2;
}

.report-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-submit,
.btn-cancel {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit {
    background: #1877f2;
    color: white;
}

.btn-submit:hover:not(:disabled) {
    background: #166fe5;
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: #b0b3b8;
    cursor: not-allowed;
}

.btn-cancel {
    background: #f0f2f5;
    color: #333;
}

.btn-cancel:hover {
    background: #e4e6eb;
    transform: translateY(-1px);
}

.report-status {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.report-status.success {
    background: #d4edda;
    color: #155724;
}

.report-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* ===================== */
/* Message Context Menu */
/* ===================== */

.message-context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid #e4e6eb;
    overflow: hidden;
    z-index: 3000;
    min-width: 160px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.15s ease;
}

.message-context-menu.show {
    opacity: 1;
    transform: scale(1);
}

.context-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid #f0f2f5;
}

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

.context-menu-item:hover {
    background: #f0f2f5;
}

.context-menu-item:active {
    background: #e4e6eb;
}


.profile-card-tally {
    font-family: monospace;
    font-size: 13px;
    margin-top: 4px;
    color: #555;
}
.tg {
    position: relative;
    display: inline-block;
    letter-spacing: 0px;
    font-family: monospace;
}
.tg::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 65%;
    width: calc(100% + 4px);
    height: 1.5px;
    background: currentColor;
    transform: rotate(-12deg);
    transform-origin: left center;
}
.tg.tg-d::after {
    top: 35%;
    transform: rotate(12deg);
}
