/* Unified Social Hub - Modern social interface matching Hollowcore V2 style */

/* ========================================
   PANEL CONTAINER (Match Hollowcore V2)
   ======================================== */

:root {
    --hc-gap-xs: 3px;
    --hc-gap-sm: 4px;
    --hc-gap-md: 6px;
    --hc-gap-lg: 8px;
    --hc-pad-xs: 4px;
    --hc-pad-sm: 6px;
    --hc-pad-md: 8px;
    --hc-pad-lg: 12px;

    /* Morrhollow Terminal Colors */
    --hc-bg-dark: rgba(15, 15, 25, 0.95);
    --hc-bg-darker: rgba(8, 8, 15, 0.98);
    --hc-blue-glow: #93C5FD;
    --hc-blue-accent: #00d4ff;
    --hc-gold-accent: rgba(212, 175, 55, 0.9);
    --hc-gold-border: rgba(212, 175, 55, 0.4);
}

.panel-social {
    position: fixed;
    top: 50px;
    left: 10px;
    width: min(1000px, calc(100vw - 20px));
    max-width: 1000px;
    height: calc(100vh - 100px);
    max-height: 700px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 40px rgba(147, 197, 253, 0.15),
        0 0 20px rgba(212, 175, 55, 0.1);
    border: 1px solid var(--hc-gold-border);
    font-family: 'RemiliaMincho', serif;
    font-size: 12px;
    color: #E5E7EB;
    user-select: none;
    background: transparent;
    animation: hc-panel-slide-in 0.3s ease-out;
    margin: 0;
    padding: 0;
}

.panel-social .panel-content {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.panel-social .panel-close {
    display: none !important;
}

@keyframes hc-panel-slide-in {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.panel-social::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        var(--hc-bg-dark) 0%,
        var(--hc-bg-darker) 50%,
        var(--hc-bg-dark) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

/* ========================================
   HEADER (Compact like Hollowcore V2)
   ======================================== */

.unified-social-hub-header {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.95) 0%,
        rgba(51, 65, 85, 0.98) 100%);
    min-height: 30px;
    max-height: 30px;
    border-bottom: 1px solid var(--hc-gold-border);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(147, 197, 253, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
    gap: 8px;
}

.unified-social-hub-header h2 {
    font-size: 11px;
    color: var(--hc-gold-accent);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    opacity: 0.9;
    white-space: nowrap;
    text-shadow:
        0 0 10px rgba(147, 197, 253, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.8);
}

.unified-social-hub-header .wallet-actions {
    display: flex;
    gap: 2px;
    align-items: center;
}

/* Compact header buttons */
.unified-social-hub-header .refresh-btn,
.unified-social-hub-header .close-btn,
.unified-social-hub-header .icon-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.7) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 3px;
    color: rgba(186, 166, 116, 0.8);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.unified-social-hub-header .refresh-btn:hover,
.unified-social-hub-header .close-btn:hover,
.unified-social-hub-header .icon-btn:hover {
    background: linear-gradient(135deg,
        rgba(147, 197, 253, 0.3) 0%,
        rgba(59, 130, 246, 0.4) 100%);
    border-color: var(--hc-blue-glow);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 10px rgba(147, 197, 253, 0.3);
}

.unified-social-hub-header .refresh-btn.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   TABS - Compact Morrhollow Style (Match Hollowcore V2)
   ======================================== */

.unified-social-tabs {
    display: flex;
    gap: var(--hc-gap-sm);
    padding: var(--hc-pad-sm) var(--hc-pad-sm);
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.2) 100%);
    border-bottom: 1px solid var(--hc-gold-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    min-height: 2.25rem;
}

.unified-social-tab {
    flex: 1;
    padding: var(--hc-pad-sm) var(--hc-pad-md);
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.4) 100%);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.3);
}

.unified-social-tab .tab-icon {
    font-size: 10px;
    opacity: 0.7;
}

.unified-social-tab .tab-text {
    font-size: 9px;
}

.unified-social-tab .tab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 7px;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.unified-social-tab .tab-badge.pulse {
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
        transform: scale(1.05);
    }
}

.unified-social-tab:hover {
    background: linear-gradient(135deg,
        rgba(30, 41, 59, 0.5) 0%,
        rgba(51, 65, 85, 0.6) 100%);
    border-color: rgba(147, 197, 253, 0.4);
    color: var(--hc-blue-glow);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 8px rgba(147, 197, 253, 0.2);
}

.unified-social-tab.active {
    background: linear-gradient(135deg,
        rgba(147, 197, 253, 0.25) 0%,
        rgba(59, 130, 246, 0.3) 100%);
    border-color: var(--hc-blue-glow);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 15px rgba(147, 197, 253, 0.3),
        0 2px 10px rgba(147, 197, 253, 0.2);
}

.unified-social-tab.active .tab-icon {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(147, 197, 253, 0.6));
}

/* ========================================
   BODY - Compact with proper sizing (Match Hollowcore V2)
   ======================================== */

.unified-social-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--hc-pad-lg);
    background: transparent;
    position: relative;
    z-index: 10;
    /* Calculated height: panel max-height (700px) - header (30px) - tabs (~36px) = ~634px */
    max-height: 634px;
}

/* Custom scrollbar */
.unified-social-body::-webkit-scrollbar {
    width: 8px;
}

.unified-social-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.unified-social-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #6366f1);
    border-radius: 4px;
}

.unified-social-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a78bfa, #818cf8);
}

/* ========================================
   CONTENT CONTAINERS - Prevent overflow
   ======================================== */

.social-content-modern {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    overflow: hidden; /* FIX: Contain all children */
}

/* ========================================
   STATS BAR - Compact
   ======================================== */

.social-stats-bar {
    display: flex;
    gap: var(--hc-gap-sm);
    flex-wrap: wrap;
    margin-bottom: var(--hc-gap-md);
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 10px;
    font-size: 9px;
    color: rgba(186, 166, 116, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-chip.warning {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 8px rgba(251, 191, 36, 0.2);
}

.stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.stat-dot.online {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* ========================================
   SECTIONS - Compact Style
   ======================================== */

.social-section {
    background: rgba(30, 41, 59, 0.2);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 4px;
    padding: var(--hc-pad-md);
    margin-bottom: var(--hc-gap-md);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 1px 3px rgba(0, 0, 0, 0.3);
}

.section-title-modern {
    font-size: 10px;
    font-weight: 700;
    color: var(--hc-gold-accent);
    margin-bottom: var(--hc-gap-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(147, 197, 253, 0.3);
}

/* ========================================
   FRIENDS LIST
   ======================================== */

.friends-list-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.friend-card-modern {
    display: flex;
    align-items: center;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-sm) var(--hc-pad-md);
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 4px;
    transition: all 0.2s;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.friend-card-modern:hover {
    border-color: rgba(147, 197, 253, 0.4);
    background: rgba(30, 41, 59, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 8px rgba(147, 197, 253, 0.2);
}

.friend-card-modern.pending {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 8px rgba(251, 191, 36, 0.15);
}

.friend-avatar-modern {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(59, 130, 246, 0.5));
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(147, 197, 253, 0.2);
    overflow: hidden;
}

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

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #0f0d15;
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.offline {
    background: #6b7280;
}

.friend-info-modern {
    flex: 1;
    min-width: 0; /* FIX: Allow text truncation */
}

.friend-name-modern {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-status-modern {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.7);
}

.friend-actions-modern {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.friend-action-btn {
    padding: 3px 8px;
    border: none;
    border-radius: 3px;
    font-family: 'RemiliaMincho', serif;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.friend-action-btn.accept {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.6), rgba(22, 163, 74, 0.7));
    color: #fff;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.2);
}

.friend-action-btn.accept:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(22, 163, 74, 0.9));
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.friend-action-btn.decline {
    background: rgba(30, 41, 59, 0.4);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(147, 197, 253, 0.2);
}

.friend-action-btn.decline:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

.friend-action-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 10px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.friend-action-icon:hover {
    background: rgba(147, 197, 253, 0.3);
    border-color: rgba(147, 197, 253, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 8px rgba(147, 197, 253, 0.3);
}

/* ========================================
   DMs
   ======================================== */

.dm-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.new-dm-btn-modern {
    padding: 8px 16px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: none;
    border-radius: 8px;
    font-family: 'RemiliaMincho', serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.new-dm-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.dm-conversations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dm-conversation-preview {
    display: flex;
    align-items: center;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-sm) var(--hc-pad-md);
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.dm-conversation-preview:hover {
    border-color: rgba(147, 197, 253, 0.4);
    background: rgba(30, 41, 59, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 8px rgba(147, 197, 253, 0.2);
}

.dm-conversation-preview.unread {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 8px rgba(59, 130, 246, 0.2);
}

.dm-avatar {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(59, 130, 246, 0.5));
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(147, 197, 253, 0.2);
}

.dm-preview-info {
    flex: 1;
    min-width: 0;
}

.dm-preview-name {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-preview-last {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-unread-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

/* DM Conversation View */
.dm-conversation-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.dm-conversation-header,
.dm-header-modern,
.chat-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-sm) var(--hc-pad-md);
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 4px;
    margin-bottom: var(--hc-gap-md);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.back-btn-modern {
    padding: 4px 10px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 3px;
    font-family: 'RemiliaMincho', serif;
    font-size: 8px;
    font-weight: 600;
    color: rgba(186, 166, 116, 0.9);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.back-btn-modern:hover {
    background: rgba(147, 197, 253, 0.3);
    border-color: rgba(147, 197, 253, 0.5);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 8px rgba(147, 197, 253, 0.3);
}

.dm-conversation-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--hc-gold-accent);
}

.dm-avatar-small {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(59, 130, 246, 0.5));
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 0 6px rgba(147, 197, 253, 0.2);
}

.chat-status {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.chat-status.connected {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.2);
}

.chat-status.disconnected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.dm-messages-container,
.chat-messages-container {
    flex: 1;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow:
        inset 0 1px 0 rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.dm-message {
    max-width: 95%;
    padding: 4px 8px;
    border-radius: 6px;
    word-wrap: break-word;
}

.dm-message.own {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(59, 130, 246, 0.5));
    border: 1px solid rgba(147, 197, 253, 0.3);
    color: #fff;
    box-shadow: 0 0 6px rgba(147, 197, 253, 0.2);
}

.dm-message.other {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(147, 197, 253, 0.2);
    color: #fff;
}

.dm-message-content {
    font-size: 9px;
    line-height: 1.4;
    margin-bottom: 2px;
}

.dm-message-time {
    font-size: 7px;
    color: rgba(186, 166, 116, 0.6);
}

.dm-input-container,
.chat-input-container {
    display: flex;
    gap: 4px;
}

.dm-input-modern,
.chat-input-modern {
    flex: 1;
    padding: 4px 8px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 4px;
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

.dm-input-modern:focus,
.chat-input-modern:focus {
    outline: none;
    border-color: rgba(147, 197, 253, 0.5);
    background: rgba(30, 41, 59, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(0, 0, 0, 0.3),
        0 0 8px rgba(147, 197, 253, 0.2);
}

.dm-send-btn-modern,
.chat-send-btn-modern {
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(59, 130, 246, 0.5));
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 4px;
    font-family: 'RemiliaMincho', serif;
    font-size: 8px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 8px rgba(147, 197, 253, 0.2);
}

.dm-send-btn-modern:hover,
.chat-send-btn-modern:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.6), rgba(59, 130, 246, 0.7));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 12px rgba(147, 197, 253, 0.4);
}

.dm-send-btn-modern:disabled,
.chat-send-btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   GLOBAL CHAT
   ======================================== */

.chat-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chat-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.chat-status.connected {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.chat-status.disconnected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.chat-messages-container {
    height: 400px;
    overflow-y: auto;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.chat-message-modern {
    padding: 4px;
    font-size: 9px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-username {
    font-weight: 600;
    color: var(--hc-blue-glow);
    margin-right: 4px;
}

.chat-text {
    color: rgba(255, 255, 255, 0.9);
}


.chat-input-container {
    display: flex;
    gap: 8px;
}

.chat-input-modern {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: 'RemiliaMincho', serif;
    font-size: 14px;
    color: #fff;
}

.chat-input-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input-modern:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.chat-send-btn-modern {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: none;
    border-radius: 8px;
    font-family: 'RemiliaMincho', serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-send-btn-modern:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.chat-send-btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   EMPTY STATE - Compact
   ======================================== */

.empty-state-modern {
    padding: 24px 12px;
    text-align: center;
}

.empty-icon-modern {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.3;
}

.empty-text-modern {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
    margin-bottom: 8px;
}

.add-friend-btn-modern,
.new-dm-btn-modern {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(59, 130, 246, 0.5));
    border: 1px solid rgba(147, 197, 253, 0.3);
    border-radius: 4px;
    font-family: 'RemiliaMincho', serif;
    font-size: 8px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 8px rgba(147, 197, 253, 0.2);
}

.add-friend-btn-modern:hover,
.new-dm-btn-modern:hover {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.6), rgba(59, 130, 246, 0.7));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 12px rgba(147, 197, 253, 0.4);
}

/* ========================================
   VOICE CHAT - Compact Style
   ======================================== */

.voice-content-modern {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-md);
    height: 100%;
}

.voice-status-card-compact {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 4px;
    padding: var(--hc-pad-md);
    text-align: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 1px 3px rgba(0, 0, 0, 0.3);
}

.voice-status-card-compact.connected {
    background: rgba(59, 165, 92, 0.2);
    border-color: rgba(59, 165, 92, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 10px rgba(59, 165, 92, 0.2);
}

.voice-status-icon-compact {
    font-size: 24px;
    margin-bottom: 4px;
}

.voice-status-text-compact {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.voice-controls-compact {
    display: flex;
    justify-content: center;
}

.voice-connect-btn-compact {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(59, 165, 92, 0.6), rgba(34, 139, 77, 0.7));
    border: 1px solid rgba(59, 165, 92, 0.4);
    border-radius: 4px;
    color: white;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 8px rgba(59, 165, 92, 0.2);
}

.voice-connect-btn-compact:hover {
    background: linear-gradient(135deg, rgba(59, 165, 92, 0.8), rgba(34, 139, 77, 0.9));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 12px rgba(59, 165, 92, 0.4);
}

.voice-active-controls-compact {
    display: flex;
    gap: 6px;
}

.voice-control-btn-compact {
    padding: 8px 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 4px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.3);
}

.voice-control-btn-compact:hover {
    background: rgba(147, 197, 253, 0.3);
    border-color: rgba(147, 197, 253, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 8px rgba(147, 197, 253, 0.3);
}

.voice-control-btn-compact.muted {
    background: rgba(237, 66, 69, 0.6);
    border-color: rgba(237, 66, 69, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 8px rgba(237, 66, 69, 0.2);
}

.voice-control-btn-compact.muted:hover {
    background: rgba(237, 66, 69, 0.8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 12px rgba(237, 66, 69, 0.4);
}

.voice-control-btn-compact.voice-disconnect {
    background: rgba(237, 66, 69, 0.6);
    border-color: rgba(237, 66, 69, 0.4);
}

.voice-control-btn-compact.voice-disconnect:hover {
    background: rgba(237, 66, 69, 0.8);
}

.voice-participants-section-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.participants-header-compact {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--hc-gold-accent);
    margin-bottom: var(--hc-gap-sm);
    letter-spacing: 0.5px;
}

.participants-container-compact {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.empty-participants-compact {
    text-align: center;
    color: rgba(186, 166, 116, 0.5);
    font-size: 8px;
    padding: 12px;
}

.participant-item-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 4px;
    transition: background 0.15s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.participant-item-compact:hover {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(147, 197, 253, 0.3);
}

.participant-avatar-compact {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(59, 130, 246, 0.5));
    border: 1px solid rgba(147, 197, 253, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 600;
    color: white;
    box-shadow: 0 0 6px rgba(147, 197, 253, 0.2);
}

.participant-info-compact {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participant-name-compact {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.participant-status-compact {
    font-size: 10px;
}

.participant-status-compact.speaking {
    color: #3ba55c;
    animation: speaking-pulse 0.5s ease-in-out infinite;
}

@keyframes speaking-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   STREAM - Compact Style
   ======================================== */

.stream-content-modern {
    display: flex;
    flex-direction: column;
    gap: var(--hc-gap-md);
    height: 100%;
}

.stream-video-wrapper-compact {
    position: relative;
    width: 100%;
    height: 400px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(147, 197, 253, 0.15);
    box-shadow:
        inset 0 1px 0 rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.5);
}

.stream-video-compact {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stream-overlay-compact {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-offline-message-compact {
    text-align: center;
    color: rgba(186, 166, 116, 0.6);
}

.offline-icon-compact {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.stream-offline-message-compact h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.stream-offline-message-compact p {
    margin: 0;
    font-size: 10px;
}

.stream-controls-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hc-gap-md);
    padding: var(--hc-pad-sm);
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(147, 197, 253, 0.15);
    border-radius: 4px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.stream-control-btn-compact {
    padding: 4px 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.9);
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.stream-control-btn-compact:hover {
    background: rgba(147, 197, 253, 0.3);
    border-color: rgba(147, 197, 253, 0.5);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 8px rgba(147, 197, 253, 0.3);
}

.stream-status-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stream-live-indicator-text {
    color: #ef4444;
    animation: pulse-live 2s infinite;
}

.stream-offline-text {
    color: rgba(186, 166, 116, 0.6);
}

.stream-live-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

@keyframes pulse-live {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
    .unified-social-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .unified-social-tab {
        padding: 10px 16px;
        font-size: 12px;
    }

    .friend-card-modern,
    .dm-conversation-preview {
        padding: 10px 12px;
    }

    .dm-message {
        max-width: 90%;
    }

    .dm-messages-container,
    .chat-messages-container {
        height: 300px;
    }
}
