/* -------------------------
   GENERAL STYLES
-------------------------- */

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", sans-serif;
    background: #202225;
    color: #fff;
    overflow: hidden;
}

.hidden { display: none !important; }

.error {
    color: #ff4b4b;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

/* -------------------------
   LOGIN PAGE
-------------------------- */

.login-body {
    background: #2f3136;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    width: 380px;
    padding: 30px;
    background: #36393f;
    border-radius: 10px;
    box-shadow: 0 0 20px #00000055;
}

.login-title {
    text-align: center;
    margin-bottom: 20px;
}

.login-box {
    display: flex;
    flex-direction: column;
}

.login-box input {
    margin: 7px 0;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #202225;
    color: white;
}

.login-box button {
    margin-top: 10px;
    padding: 12px;
    background: #5865f2;
    border: none;
    color: white;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.switch {
    margin-top: 10px;
    text-align: center;
    color: #b9bbbe;
    cursor: pointer;
}

/* -------------------------
   MAIN APP LAYOUT
-------------------------- */

.app-body {
    display: grid;
    grid-template-columns: 72px 240px 1fr 240px;
    height: 100vh;
}

/* -------------------------
   LEFT SIDEBAR (GROUPS)
-------------------------- */

.sidebar-groups {
    background: #202225;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    gap: 10px;
    border-right: 1px solid #1c1d1f;
}

.sidebar-groups .group-icon {
    width: 48px;
    height: 48px;
    background: #36393f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 22px;
}

.sidebar-groups .group-icon:hover {
    background: #5865f2;
}

/* Add Group Button */
.add-group-btn {
    width: 48px;
    height: 48px;
    background: #3ba55d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
}

/* -------------------------
   CHANNEL SIDEBAR
-------------------------- */

.sidebar-channels {
    background: #2f3136;
    padding: 10px;
    overflow-y: auto;
}

.channels-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: bold;
}

#channels-list .channel {
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 4px;
    color: #b9bbbe;
}

#channels-list .channel:hover {
    background: #3a3c42;
}

#channels-list .channel.active {
    background: #5865f2;
    color: white;
}

/* Sub-channels */
.sub-channel {
    margin-left: 16px;
    font-size: 14px;
    opacity: 0.85;
}

/* -------------------------
   CHAT AREA
-------------------------- */

.chat-area {
    background: #36393f;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid #1c1d1f;
    border-right: 1px solid #1c1d1f;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #1c1d1f;
}

#typing-indicator {
    font-size: 12px;
    opacity: 0.7;
}

.messages-container {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}
 
.message-username {
    font-weight: bold;
    margin-right: 8px;
}

.message-text {
    color: #dcddde;
}

/* -------------------------
   MESSAGE INPUT
-------------------------- */

.message-input-area {
    padding: 10px;
    background: #40444b;
    display: flex;
    gap: 10px;
}

.message-input-area input {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #2f3136;
    color: white;
}

.message-input-area button {
    padding: 12px 18px;
    background: #5865f2;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

/* -------------------------
   RIGHT SIDEBAR (USERS)
-------------------------- */

.sidebar-users {
    background: #2f3136;
    overflow-y: auto;
    padding: 10px;
}

.sidebar-users h3 {
    margin-top: 0;
}

.user-item {
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-online {
    color: #3ba55d;
}

.user-offline {
    color: #ff4b4b;
}
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-window {
    background: #2f3136;
    padding: 20px;
    border-radius: 8px;
    min-width: 300px;
    color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    animation: popIn 0.15s ease-out;
}

@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-buttons {
    text-align: right;
    margin-top: 15px;
}

.popup-buttons button {
    background: #5865f2;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    margin-left: 10px;
}

.popup-buttons button:hover {
    background: #4752c4;
}

.hidden {
    display: none !important;
}
.add-members-btn {
    background: #5865f2;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
}

.add-members-btn:hover {
    background: #4752c4;
}
.dm-item, .groupchat-item {
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    cursor: pointer;
    color: #ddd;
    transition: background 0.15s;
}

.dm-item:hover,
.groupchat-item:hover {
    background: rgba(255,255,255,0.12);
}

.dm-item.active,
.groupchat-item.active {
    background: rgba(88,101,242,0.3);
    color: white;
}

.dm-section-title,
.gc-section-title {
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #ccc;
    text-transform: uppercase;
    font-weight: 600;
}
/* ============================================
   NOTIFICATION DOT - PULSATING RED DOT
   Adaugă aceste stiluri în style.css
============================================ */

/* Bulina de notificare - roșie și pulsantă */
.notify-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: #ed4245;
    border-radius: 50%;
    border: 2px solid #2f3136;
    box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.7);
    animation: pulse-notification 2s infinite;
    z-index: 10;
}

/* Animație de pulsare */
@keyframes pulse-notification {
    0% {
        box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.7);
        transform: scale(1);
    }
    
    50% {
        box-shadow: 0 0 0 8px rgba(237, 66, 69, 0);
        transform: scale(1.1);
    }
    
    100% {
        box-shadow: 0 0 0 0 rgba(237, 66, 69, 0);
        transform: scale(1);
    }
}

/* Variație pentru animație mai rapidă (opțional) */
.notify-dot.urgent {
    animation: pulse-notification 1s infinite;
    background: #ff0000;
}

/* Variație pentru animație mai lentă (opțional) */
.notify-dot.slow {
    animation: pulse-notification 3s infinite;
}

/* Pentru DM-uri */
.dm-item .notify-dot,
.groupchat-item .notify-dot {
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
}

/* Pentru canale */
.channel .notify-dot {
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
}

/* Pentru grupuri (group icons) */
.group-icon .notify-dot {
    top: -2px;
    right: -2px;
}

/* Hover effect - crește intensitatea */
.dm-item:hover .notify-dot,
.groupchat-item:hover .notify-dot,
.channel:hover .notify-dot,
.group-icon:hover .notify-dot {
    animation: pulse-notification-fast 1s infinite;
}

@keyframes pulse-notification-fast {
    0% {
        box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.9);
        transform: scale(1);
    }
    
    50% {
        box-shadow: 0 0 0 10px rgba(237, 66, 69, 0);
        transform: scale(1.15);
    }
    
    100% {
        box-shadow: 0 0 0 0 rgba(237, 66, 69, 0);
        transform: scale(1);
    }
}

/* Glow effect pentru mai multă atenție */
.notify-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: glow-pulse 2s infinite;
    opacity: 0.6;
}

@keyframes glow-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Pentru dark mode sau fundal închis */
body.dark-theme .notify-dot,
body.dark-mode .notify-dot {
    border-color: #1e1f22;
}

/* Counter pentru numărul de notificări (opțional) */
.notify-dot.with-count {
    width: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

/* Poziționare specifică pentru elementele din sidebar */
.sidebar-channels .channel {
    position: relative;
}

.sidebar-channels .dm-item,
.sidebar-channels .groupchat-item {
    position: relative;
}

.sidebar-groups .group-icon {
    position: relative;
}
/* -------------------------
   EMOJI STYLES
-------------------------- */

.emoji-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.emoji-btn:hover {
    background: rgba(255,255,255,0.1);
}

.emoji-panel {
    position: absolute;
    bottom: 70px;
    left: 20px;
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
    background: #202225;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    padding: 10px;
    z-index: 1000;
    border: 1px solid #424549;
}

.emoji-category {
    margin-bottom: 15px;
}

.emoji-category h4 {
    margin: 0 0 8px 0;
    color: #b9bbbe;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.emoji-grid span {
    font-size: 22px;
    text-align: center;
    padding: 5px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    user-select: none;
}

.emoji-grid span:hover {
    background: #5865f2;
    transform: scale(1.1);
}
.emoji-inline {
    font-size: 1.2em;
    vertical-align: middle;
    display: inline-block;
}
/* -------------------------
   MESSAGE ACTIONS ABOVE MESSAGE
-------------------------- */


 

.message-item.message-saved {
    border-left: 3px solid #3ba55d;
    background: rgba(59, 165, 93, 0.05);
}

.message-item.message-saved:hover {
    background: rgba(59, 165, 93, 0.1);
}

/* Butoanele de acțiune DEASUPRA mesajului */
.message-actions-top {
    position: absolute;
    /* top: -25px; */
    right: 10px;
    display: none;
    background: #202225;
    border-radius: 6px 6px 0 0;
    padding: 4px 8px;
    gap: 5px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 10;
}

.message-item:hover .message-actions-top {
    display: flex;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header-ul mesajului (username + time) */
.message-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.message-username {
    font-weight: bold;
    color: #fff;
    font-size: 15px;
}

.message-time {
    color: #72767d;
    font-size: 12px;
}

/* Textul mesajului */
.message-text {
    color: #dcddde;
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Butoane individuale */
.save-btn, .unsave-btn, .reply-btn {
    background: rgba(32, 34, 37, 0.9);
    border: 1px solid #424549;
    color: #b9bbbe;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #3ba55d;
    color: white;
    border-color: #3ba55d;
}

.unsave-btn {
    background: rgba(59, 165, 93, 0.2);
    color: #3ba55d;
    border-color: #3ba55d;
}

.unsave-btn:hover {
    background: #ff4b4b;
    color: white;
    border-color: #ff4b4b;
}

.reply-btn:hover {
    background: #5865f2;
    color: white;
    border-color: #5865f2;
}

/* Indicator că mesajul e salvat (mic icon în colț) */
.saved-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #3ba55d;
    font-size: 12px;
    display: none;
}

.message-saved .saved-indicator {
    display: block;
}
/* -------------------------
   REPLY PREVIEW STYLES
-------------------------- */
 
 
 

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

 /* Reply Preview */
.reply-preview {
    background: rgba(88, 101, 242, 0.1);
    border-left: 3px solid #5865f2;
    padding: 8px 12px;
    margin: 0 10px 8px 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-preview.hidden {
    display: none;
}

.reply-preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reply-preview-label {
    font-size: 12px;
    color: #b9bbbe;
}

.reply-preview-text {
    font-size: 13px;
    color: #dcddde;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.reply-cancel-btn {
    background: transparent;
    border: none;
    color: #b9bbbe;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: color 0.15s;
}

.reply-cancel-btn:hover {
    color: #fff;
}

 
/* -------------------------
   STICKER STYLES
-------------------------- */

.sticker-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sticker-btn:hover {
    background: rgba(255,255,255,0.1);
}

.sticker-panel {
    position: absolute;
    bottom: 70px;
    left: 60px; /* Mutat puțin la dreapta pentru a nu se suprapune cu emoji */
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
    background: #202225;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    padding: 10px;
    z-index: 1000;
    border: 1px solid #424549;
}

.sticker-category {
    margin-bottom: 15px;
}

.sticker-category h4 {
    margin: 0 0 8px 0;
    color: #b9bbbe;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sticker-item {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    padding: 4px;
}

.sticker-item:hover {
    transform: scale(1.1);
    background: rgba(88,101,242,0.3);
}

.sticker-item img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.sticker-in-message {
    max-width: 128px;
    max-height: 128px;
    border-radius: 8px;
    vertical-align: middle;
    margin: 2px;
}
/* Stil pentru picker activ */
.sticker-panel.active {
    border-color: #5865f2;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
}

/* Indicator că e în modul selectare sticker */
.message-input-area.sticker-mode input {
    border-color: #5865f2;
    background: rgba(88, 101, 242, 0.1);
}

/* Sugestie în placeholder când e în modul sticker */
.message-input-area.sticker-mode input::placeholder {
    color: #5865f2;
}
.chat-kpi {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
    line-height: 1.3;
    color: #b9bbbe;
}
.reminder-btn {
    background: rgba(32, 34, 37, 0.9);
    border: 1px solid #424549;
    color: #b9bbbe;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
}

.reminder-btn:hover {
    background: #f39c12;
    color: white;
    border-color: #f39c12;
}
.reminders-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.reminders-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reminder-item {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #ddd;
    border-left: 3px solid #f39c12;
}

.reminder-header {
    font-weight: bold;
    margin-bottom: 4px;
}

.reminder-time {
    font-size: 12px;
    opacity: 0.7;
}

.reminder-delete {
    background: #ff4b4b;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 5px;
}

.reminder-delete:hover {
    background: #d93636;
}
 
 

.reply-label {
    color: #b9bbbe;
    margin-right: 5px;
}
  
/* Stil pentru butonul de adăugare membri */
.add-members-btn {
    background: #5865f2;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
    transition: background 0.2s;
}

.add-members-btn:hover {
    background: #4752c4;
}

/* Stil pentru lista membrilor în header */
.member-count {
    font-size: 14px;
    color: #b9bbbe;
    margin-top: 5px;
}

.member-list-btn {
    background: none;
    border: none;
    color: #4dabf7;
    cursor: pointer;
    text-decoration: underline;
    font-size: 12px;
    padding: 0;
    margin-left: 5px;
}

.member-list-btn:hover {
    color: #2d8bff;
}

/* Stil pentru popup-ul cu lista membrilor */
.members-popup {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 6px;
    margin-top: 10px;
}

.member-item {
    padding: 5px 10px;
    border-radius: 4px;
    margin: 3px 0;
    background: rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-item:hover {
    background: rgba(255,255,255,0.1);
}

.remove-member-btn {
    background: #ff4b4b;
    border: none;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.remove-member-btn:hover {
    background: #d93636;
}
/* Stiluri pentru membri în sidebar */
#users-list h3 {
    margin-top: 0;
    color: #fff;
    font-size: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #444;
    margin-bottom: 10px;
}

.user-item {
    padding: 8px 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-online {
    color: #3ba55d;
    font-size: 12px;
}

.user-offline {
    color: #72767d;
    font-size: 12px;
}

/* Stil pentru chat header */
.chat-kpi {
    font-size: 13px;
    color: #b9bbbe;
    margin-top: 5px;
}
/* -------------------------
   MESSAGE REACTIONS STYLES
-------------------------- */

/* Container pentru reacții */
.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Fiecare reacție individuală */
.reaction-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(79, 84, 92, 0.3);
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.reaction-item:hover {
    background: rgba(79, 84, 92, 0.5);
    transform: translateY(-1px);
}

/* Reacția utilizatorului curent */
.reaction-item.user-reacted {
    background: rgba(88, 101, 242, 0.3);
    border-color: #5865f2;
}

.reaction-item.user-reacted:hover {
    background: rgba(88, 101, 242, 0.5);
}

/* Emoji din reacție */
.reaction-emoji {
    font-size: 14px;
    line-height: 1;
}

/* Număr de reacții */
.reaction-count {
    color: #b9bbbe;
    font-weight: 500;
    min-width: 16px;
    text-align: center;
}

/* Buton pentru a adăuga reacții */
.add-reaction-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(79, 84, 92, 0.3);
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    color: #b9bbbe;
    transition: all 0.2s;
}

.add-reaction-btn:hover {
    background: rgba(79, 84, 92, 0.5);
    color: white;
}

 /* ========================================
   MESSAGE ITEM - Needs relative positioning
======================================== */
.message-item {
   position: relative !important; /* IMPORTANT pentru picker */
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #2f3136;
    transition: background 0.2s;
}

.message-item:hover {
    background: #32353b;
}

/* ========================================
   REACTION PICKER
======================================== */
.reaction-picker {
    position: absolute;
    bottom: 100%; /* Deasupra mesajului */
    left: 50%;
    transform: translateX(-50%);
    background: #2f3136;
    border: 2px solid #5865f2;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    min-width: 320px;
    margin-bottom: 8px;
    display: block !important; /* Forțează vizibilitatea */
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.reaction-picker.hidden {
    display: none !important;
}

.reaction-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #5865f2;
}

.reaction-picker-header span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.close-picker-btn {
    background: transparent;
    border: none;
    color: #b9bbbe;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s;
    border-radius: 4px;
}

.close-picker-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.reaction-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.reaction-option {
    font-size: 32px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.15s;
    text-align: center;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-option:hover {
    background: rgba(88, 101, 242, 0.3);
    transform: scale(1.3);
}

.reaction-option:active {
    transform: scale(1.1);
}

 /* ========================================
   FILE UPLOAD BUTTON
======================================== */
.file-upload-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    color: #b9bbbe;
    transition: all 0.2s;
    border-radius: 4px;
}

.file-upload-btn:hover {
    background: rgba(79, 84, 92, 0.4);
    color: #fff;
}

/* File Preview Area */
.file-preview-area {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin: 8px 12px;
    flex-wrap: wrap;
    max-height: 200px;
    overflow-y: auto;
}

.file-preview-area.hidden {
    display: none;
}

.file-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #202225;
}

.file-preview-item img,
.file-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-remove:hover {
    background: #f04747;
}

.file-preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

/* ========================================
   MESSAGE ATTACHMENTS
======================================== */
.message-attachment {
    margin: 8px 0;
    border-radius: 12px;
    overflow: hidden;
    max-width: 400px;
}

.message-attachment img {
    width: 100%;
    cursor: pointer;
    display: block;
    transition: transform 0.2s;
}

.message-attachment img:hover {
    transform: scale(1.02);
}

.message-attachment video {
    width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

/* Lightbox pentru imagini */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 32px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   REMINDER COUNTDOWN BOX STYLES
   Adaugă aceste stiluri în style.css
============================================ */

/* Reminder countdown box în mesaj */
.reminder-countdown-box {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.5);
    border-radius: 4px;
    padding: 6px 10px;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.reminder-countdown-box:hover {
    background: rgba(88, 101, 242, 0.25);
    border-color: rgba(88, 101, 242, 0.8);
}

.reminder-countdown-time {
    color: #b9bbbe;
    font-weight: 500;
}

/* Stiluri pentru reminder items din sidebar */
.reminder-item {
    padding: 12px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.reminder-item:hover {
    background: rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.5);
    transform: translateX(2px);
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 600;
}

.reminder-time {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.reminder-delete {
    background: #ed4245;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    margin-top: 8px;
    transition: background 0.2s;
}

.reminder-delete:hover {
    background: #c93134;
}

/* Animation pentru reminder expirat */
@keyframes pulse-reminder {
    0%, 100% {
        background: rgba(237, 66, 69, 0.2);
        border-color: rgba(237, 66, 69, 0.5);
    }
    50% {
        background: rgba(237, 66, 69, 0.4);
        border-color: rgba(237, 66, 69, 0.8);
    }
}

.reminder-countdown-box.expired {
    animation: pulse-reminder 2s ease-in-out infinite;
}

.chat-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chat-header-top h2 {
    margin: 0;
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-members-btn {
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
/* ========================================
   CHANNEL CATEGORIES STYLING
======================================== */

/* Category Container */
.channel-category {
    margin-bottom: 15px;
}

/* Category Header */
.channel-category-header {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
    transition: background 0.2s;
    position: relative;
}

.channel-category-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Category Icon */
.category-icon {
    font-size: 14px;
    margin-right: 6px;
}

/* Category Name */
.category-name {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #96989d;
    flex: 1;
}

/* Category Delete Button */
.category-delete-btn {
    opacity: 0;
    background: none;
    border: none;
    color: #ed4245;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.2s;
}

.channel-category-header:hover .category-delete-btn {
    opacity: 1;
}

.category-delete-btn:hover {
    background: rgba(237, 66, 69, 0.2);
}

/* Category Content */
.channel-category-content {
    padding-left: 8px;
    margin-top: 4px;
}

/* Channel Item (under category) */
.channel-category-content .channel-item {
    padding: 6px 10px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    color: #96989d;
    font-size: 15px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
}

.channel-category-content .channel-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #dcddde;
}

.channel-category-content .channel-item.active {
    background: rgba(88, 101, 242, 0.2);
    color: #ffffff;
    font-weight: 500;
}

/* Add Category Button */
#add-category-btn {
    background: #4f545c;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

#add-category-btn:hover {
    background: #5865f2;
}

/* Collapsed Category */
.channel-category-content[style*="display: none"] + .channel-category-header .category-icon::before {
    content: '▶';
}

/* Expanded Category */
.channel-category-content[style*="display: block"] + .channel-category-header .category-icon::before {
    content: '▼';
}

/* Animation pentru collapse */
.channel-category-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Empty category message */
.category-empty {
    padding: 8px 10px;
    color: #72767d;
    font-size: 13px;
    font-style: italic;
}

/* Drag and drop styling (optional - pentru viitor) */
.channel-item.dragging {
    opacity: 0.5;
}

.channel-category.drop-target {
    background: rgba(88, 101, 242, 0.1);
    border: 2px dashed #5865f2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-name {
        font-size: 11px;
    }
    
    .channel-category-content .channel-item {
        font-size: 14px;
        padding: 5px 8px;
    }
}

/* Dark theme compatibility */
body.dark-theme .channel-category-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-theme .channel-category-content .channel-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Light theme (if needed) */
body.light-theme .channel-category-header {
    color: #4f5660;
}

body.light-theme .channel-category-header:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .channel-category-content .channel-item {
    color: #4f5660;
}

body.light-theme .channel-category-content .channel-item:hover {
    background: rgba(0, 0, 0, 0.07);
}

body.light-theme .channel-category-content .channel-item.active {
    background: rgba(88, 101, 242, 0.15);
    color: #1e1f22;
}
/* ========================================
   NOTIFICATION BADGES STYLING
======================================== */

/* Notification badge pe canale/DMs (bulina roșie) */
.notification-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ed4245;
    border-radius: 50%;
    margin-left: 8px;
    animation: pulse-notification 2s infinite;
    flex-shrink: 0;
}

/* Pulsing animation pentru badge */
@keyframes pulse-notification {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Badge numeric pe nav-dot (💬, 🟣) */
.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ed4245;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    text-align: center;
    line-height: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
}

/* Nav-dot trebuie să fie relative pentru badge absolut */
.nav-dot {
    position: relative;
}

/* Nav-dot cu notificare - pulsing effect */
.nav-dot.has-notification {
    animation: pulse-nav-dot 2s infinite;
}

@keyframes pulse-nav-dot {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.05);
    }
}

/* Item cu notificare - mai bold și vizibil */
.channel-item.has-notification,
.dm-item.has-notification,
.groupchat-item.has-notification {
    font-weight: bold;
    background: rgba(88, 101, 242, 0.05);
}

.channel-item.has-notification:hover,
.dm-item.has-notification:hover,
.groupchat-item.has-notification:hover {
    background: rgba(88, 101, 242, 0.1);
}

/* Badge pe channel item (în sidebar channels) */
.channel-item .notification-badge,
.channel .notification-badge {
    margin-left: auto;
}

/* Badge pe DM item */
.dm-item .notification-badge,
.groupchat-item .notification-badge {
    margin-left: auto;
}

/* Responsive pentru mobile */
@media (max-width: 768px) {
    .nav-badge {
        font-size: 9px;
        padding: 1px 4px;
        min-width: 14px;
        height: 14px;
        line-height: 12px;
    }
    
    .notification-badge {
        width: 6px;
        height: 6px;
        margin-left: 6px;
    }
}

/* Dark theme compatibility */
body.dark-theme .notification-badge,
body.dark-theme .nav-badge {
    background: #ed4245;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Light theme */
body.light-theme .notification-badge,
body.light-theme .nav-badge {
    background: #d32f2f;
}

body.light-theme .channel-item.has-notification,
body.light-theme .dm-item.has-notification {
    background: rgba(88, 101, 242, 0.08);
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   Adăugat pentru funcționalitate mobile
======================================== */

/* -------------------------
   SIDEBAR TOGGLE BUTTON
-------------------------- */

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 82px;
    z-index: 1000;
    background: #5865f2;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: #4752c4;
    transform: scale(1.1);
}

.sidebar-toggle.active {
    left: 262px;
}

/* -------------------------
   MEDIA QUERIES
-------------------------- */

/* Tablet și ecrane mici (max 1024px) */
@media (max-width: 1024px) {
    /* Ascunde complet sidebar-users pe ecrane mici */
    .sidebar-users {
        display: none !important;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    /* Sidebar channels devine overlay pe mobile */
    .sidebar-channels {
        position: fixed;
        left: 72px;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .sidebar-channels.active {
        transform: translateX(0);
    }
    
    /* Afișează toggle button pe mobile */
    .sidebar-toggle {
        display: flex;
    }
    
    /* Ascunde complet sidebar-users pe mobile */
    .sidebar-users {
        display: none !important;
    }
    
    /* Ajustări pentru chat header */
    .chat-header-top h2 {
        font-size: 16px;
    }
    
    /* Ajustări pentru mesaje */
    .messages-container {
        padding: 10px;
    }
    
    /* Ajustări pentru input */
    .message-input-area {
        padding: 8px;
        gap: 6px;
    }
    
    .message-input-area button {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Categorii mai compacte */
    .category-name {
        font-size: 11px;
    }
    
    .channel-category-content .channel-item {
        font-size: 14px;
        padding: 5px 8px;
    }
    
    /* Badges mai mici */
    .nav-badge {
        font-size: 9px;
        padding: 1px 4px;
        min-width: 14px;
        height: 14px;
        line-height: 12px;
    }
    
    .notification-badge {
        width: 6px;
        height: 6px;
        margin-left: 6px;
    }
}

/* Very small mobile (max 480px) */
@media (max-width: 480px) {
    .sidebar-groups {
        width: 60px;
    }
    
    .nav-dot {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .sidebar-toggle {
        left: 70px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .sidebar-toggle.active {
        left: 250px;
    }
    
    .sidebar-channels {
        left: 60px;
        width: 240px;
    }
    
    .login-container {
        width: 90%;
        padding: 20px;
    }
    
    .popup-window {
        width: 90%;
        min-width: auto;
    }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar-channels {
        width: 220px;
    }
    
    .messages-container {
        padding: 8px;
    }
}
.channel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    transition: background 0.2s;
}

.channel-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.channel-item:hover .manage-channel-members-btn {
    opacity: 1 !important;
}

.manage-channel-members-btn:hover {
    background: rgba(88, 101, 242, 0.2) !important;
    border-radius: 4px;
}