:root {
    /* Title Bar Styles */
    --title-bar-bg: #1e1f22;
    --title-bar-text: #949ba4;
    
    /* Default Theme (Dark) */
    --primary-color: #5865f2;
    --bg-main: #313338;
    --bg-side: #2b2d31;
    --bg-darker: #1e1f22;
    --bg-darkest: #111214;
    --bg-modifier-hover: rgba(78, 80, 88, 0.3);
    --text-main: #dbdee1;
    --text-header: #ffffff;
    --text-muted: #949ba4;
    --msg-mine: #5865f2;
    --accent: #23a559;
    --sidebar-icon: #ffffff;
}

body.theme-light {
    --primary-color: #5865f2;
    --bg-main: #ffffff;
    --bg-side: #f2f3f5;
    --bg-darker: #ebedef;
    --bg-darkest: #e3e5e8;
    --bg-modifier-hover: rgba(106, 116, 128, 0.1);
    --text-main: #313338;
    --text-header: #060607;
    --text-muted: #5c6067;
    --msg-mine: #5865f2;
    --accent: #23a559;
    --sidebar-icon: #5c6067;
    --title-bar-bg: #ebedef;
    --title-bar-text: #313338;
}

body.theme-deep-ocean {
    --primary-color: #00d4ff;
    --bg-main: #0a192f;
    --bg-side: #050c18;
    --bg-darker: #02060c;
    --bg-darkest: #010408;
    --bg-modifier-hover: rgba(0, 212, 255, 0.1);
    --text-main: #8892b0;
    --text-header: #ccd6f6;
    --text-muted: #495670;
    --msg-mine: #00d4ff;
    --accent: #64ffda;
    --sidebar-icon: #00d4ff;
    --title-bar-bg: #02060c;
    --title-bar-text: #00d4ff;
}

body.theme-dracula {
    --primary-color: #bd93f9;
    --bg-main: #282a36;
    --bg-side: #21222c;
    --bg-darker: #191a21;
    --bg-darkest: #000000;
    --bg-modifier-hover: rgba(189, 147, 249, 0.1);
    --text-main: #f8f8f2;
    --text-header: #bd93f9;
    --text-muted: #6272a4;
    --msg-mine: #6272a4;
    --accent: #50fa7b;
    --sidebar-icon: #bd93f9;
    --title-bar-bg: #191a21;
    --title-bar-text: #bd93f9;
}

/* Base Title Bar Style */
.desktop-only-title-bar {
    display: none; /* Ukryte w przeglądarce */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: var(--title-bar-bg);
    color: var(--title-bar-text);
    z-index: 10001;
    -webkit-app-region: drag; /* Pozwala przesuwać okno */
    align-items: center;
    padding-left: 12px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0,0,0,0.2);
}

/* Pokazuj tylko w Electronie */
body.is-electron .desktop-only-title-bar {
    display: flex;
}

/* Przesunięcie całej zawartości w dół, aby pasek nic nie zasłaniał */
body.is-electron .modal, 
body.is-electron .discord-layout {
    padding-top: 32px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.settings-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--bg-main);
    color: var(--text-main);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-darker);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#join-modal {
    background-color: #0a0a0c;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.03) 1px, transparent 0),
        radial-gradient(at 0% 0%, rgba(88, 101, 242, 0.05) 0, transparent 40%), 
        radial-gradient(at 100% 100%, rgba(112, 0, 255, 0.05) 0, transparent 40%);
    background-size: 40px 40px, 100% 100%, 100% 100%;
    cursor: default; /* Changing from none to default as pulse is gone */
}

.brand-typewriter {
    position: absolute;
    top: 3rem;
    left: 3rem;
    color: white;
    z-index: 1001;
    pointer-events: none;
}

.brand-typewriter h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
    background: linear-gradient(to right, #ffffff, #7000ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-right: 3px solid #7000ff;
    width: fit-content;
    white-space: nowrap;
    overflow: hidden;
    animation: blink-caret 0.75s step-end infinite;
}

.brand-typewriter ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease-out;
}

.brand-typewriter ul.show {
    opacity: 1;
    transform: translateY(0);
}

.brand-typewriter li {
    font-size: 1.1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.brand-typewriter li::before {
    content: '>';
    color: #7000ff;
    font-weight: 800;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #7000ff }
}

.modal-content {
    background: var(--bg-main);
    padding: 2.5rem;
    width: 90%;
    max-width: 440px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 24px 36px rgba(0, 0, 0, 0.4);
    animation: fadeInScale 0.4s ease-out;
    position: relative;
    transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border 0.4s ease;
    border: 1px solid transparent; /* Prepare for glow border */
}

.modal-content.glow-active {
    box-shadow: 0 24px 36px rgba(0, 0, 0, 0.4), 0 0 60px rgba(112, 0, 255, 0.25), 0 0 20px rgba(112, 0, 255, 0.4);
    transform: scale(1.02);
    border-color: rgba(112, 0, 255, 0.5);
}

/* Custom Auth Cursor */
#custom-cursor {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid #7000ff;
    border-radius: 50%;
    box-shadow: 0 0 15px #7000ff, inset 0 0 10px #7000ff;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, width 0.3s ease, height 0.3s ease;
}

#custom-cursor.hidden-cursor {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    width: 10px;
    height: 10px;
}

#custom-cursor.is-dot {
    width: 6px;
    height: 6px;
    background: #7000ff;
    border-color: #7000ff;
    box-shadow: 0 0 10px #7000ff;
}

.modal-content h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--text-header);
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

input[type="text"], input[type="password"], input[type="email"] {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-darker);
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 4px;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 1.2rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

.input-group {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
    margin-top: -0.6rem; /* Adjust for margin-bottom of input */
}

input:focus + .input-icon, .input-group:focus-within .input-icon {
    color: var(--primary-color);
}

.input-group input {
    padding-left: 2.5rem !important;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
    margin-top: -0.6rem;
}

.toggle-password:hover {
    color: var(--text-header);
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--bg-modifier-hover);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.tab-btn.active {
    color: var(--text-header);
    border-bottom: 2px solid var(--primary-color);
}

.error-msg {
    color: #f04747;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.btn-primary {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary-color), #4752c4);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4752c4, #3a45a5);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Discord 3-Column Layout */
.hidden {
    display: none !important;
}

.discord-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: var(--bg-darker);
    overflow: hidden;
}

.sidebar-left {
    width: 240px;
    background: var(--bg-side);
    display: flex;
    flex-direction: column;
}

.sidebar-right {
    width: 240px;
    background: var(--bg-side);
    display: none;
    padding-top: 10px;
}

@media (min-width: 1024px) {
    .sidebar-right { display: flex; flex-direction: column; }
}

.sidebar-search {
    padding: 10px 10px 20px;
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search .search-icon {
    position: absolute;
    left: 22px;
    top: 10px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    opacity: 0.7;
    z-index: 2;
}

.sidebar-search input {
    width: 100%;
    height: 40px;
    padding: 10px 15px 10px 42px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    outline: none;
}

.sidebar-search input:focus {
    background: rgba(0,0,0,0.3);
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.2);
}

.online-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 5px;
}

.chat-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
    background: var(--bg-side);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--bg-darker);
    border-radius: 10px;
}

/* Sidebar Components */
.sidebar-header {
    height: 48px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    font-weight: bold;
}

.sidebar-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s, transform 0.2s;
}

.sidebar-header button:hover {
    color: var(--text-header);
    transform: rotate(90deg);
}

#shop-btn:hover {
    transform: scale(1.2) !important;
    color: #ffcc00 !important;
}

#minigames-btn:hover {
    transform: scale(1.2) !important;
    color: #bd93f9 !important;
    text-shadow: 0 0 10px #bd93f9;
}


.sidebar-section {
    padding: 1rem 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.section-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0 0.5rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

#manage-friends-btn:hover, #create-chat-btn:hover {
    color: #7000ff;
}


.item-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-list > div {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.1s, color 0.1s;
}

.item-list > div:hover, .item-list > div.active {
    background: var(--bg-modifier-hover);
    color: var(--text-header);
}

/* User Profile Bar */
.user-profile-bar {
    height: 58px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(14px);
    margin: 3px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: calc(100% - 6px); /* Full width minus 3px margin on each side */
}

.user-profile-bar:hover {
    background: rgba(40,40,40,0.5);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-medium {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-meta .username {
    font-size: 13px;
    font-weight: 600;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta .status {
    font-size: 11px;
    color: var(--text-muted);
}

.zynx-mini-btn {
    background: linear-gradient(45deg, #7000ff, #00d4ff);
    border: none;
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

/* Chat Header */
.chat-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-title .hash {
    color: var(--text-muted);
    font-size: 1.5rem;
}

.chat-title h2 {
    font-size: 15px;
    font-weight: bold;
}

/* Scrollbar Fixes */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darkest); }
::-webkit-scrollbar-thumb { background: #3c3e44; border-radius: 10px; border: 2px solid var(--bg-darkest); }
::-webkit-scrollbar-thumb:hover { background: #4e5058; }

/* Avatar Fallback */
.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    user-select: none;
    background-color: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
}

/* E2EE lock icon for encrypted groups */
.lock-icon {
    display: inline-block;
    vertical-align: middle;
    font-size: 0.9rem;
    margin-right: 4px;
    color: var(--accent);
}
.avatar-fallback.small, .avatar-small { width: 32px; height: 32px; font-size: 12px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-fallback.medium, .avatar-medium { width: 40px; height: 40px; font-size: 15px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-fallback.large, .avatar-large { width: 120px; height: 120px; font-size: 45px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* Reputation Ring */
.rep-ring {
    position: relative;
    padding: 2px;
    border-radius: 50%;
    display: inline-flex;
    transition: all 0.3s ease;
}

.rep-ring-neg {
    background: linear-gradient(45deg, #ff4e50, #f9d423);
    box-shadow: 0 0 10px rgba(255, 78, 80, 0.4);
    animation: rep-pulse-neg 2s infinite;
}

.rep-ring-neu {
    background: linear-gradient(45deg, #bdc3c7, #2c3e50);
    box-shadow: 0 0 10px rgba(189, 195, 199, 0.4);
}

.rep-ring-pos {
    background: linear-gradient(45deg, #00b09b, #96c93d);
    box-shadow: 0 0 10px rgba(0, 176, 155, 0.4);
    animation: rep-pulse-pos 2s infinite;
}

@keyframes rep-pulse-neg {
    0% { box-shadow: 0 0 5px rgba(255, 78, 80, 0.4); }
    50% { box-shadow: 0 0 15px rgba(255, 78, 80, 0.7); }
    100% { box-shadow: 0 0 5px rgba(255, 78, 80, 0.4); }
}

@keyframes rep-pulse-pos {
    0% { box-shadow: 0 0 5px rgba(0, 176, 155, 0.4); }
    50% { box-shadow: 0 0 15px rgba(0, 176, 155, 0.7); }
    100% { box-shadow: 0 0 5px rgba(0, 176, 155, 0.4); }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    background: none;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-logout:hover {
    color: white;
    border-color: white;
}

.zynx-badge-btn {
    background: linear-gradient(45deg, #7000ff, #00d4ff);
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(112, 0, 255, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.zynx-badge-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.8);
}

/* ZYNX Modal & Futuristic UI */
.futuristic-card {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(112, 0, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    width: 450px;
    max-width: 90%;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(112, 0, 255, 0.2);
}

.neon-text {
    background: linear-gradient(to right, #7000ff, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: 2px;
}

.zynx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.zynx-price {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-align: center;
}

.zynx-features {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.feature-item .icon { font-size: 1.5rem; }

.zynx-payment {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.ltc-address-box {
    background: #000;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin: 10px 0;
    word-break: break-all;
    border: 1px dashed #7000ff;
}

.btn-neon {
    background: linear-gradient(45deg, #7000ff, #00d4ff);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 10px;
    width: 100%;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(112, 0, 255, 0.4);
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-neon:hover {
    box-shadow: 0 0 40px rgba(112, 0, 255, 0.7);
    transform: translateY(-2px);
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.7rem;
    margin-left: 10px;
    background: var(--bg-modifier-hover);
    color: white;
    border: none;
    border-radius: 4px;
}

.zynx-badge {
    background: linear-gradient(to right, #7000ff, #00d4ff);
    color: white;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 900;
    margin-right: 5px;
    text-transform: uppercase;
}

.status-msg {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    color: #00d4ff;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Settings Tabs */
.settings-content, .server-settings-content {
    display: flex;
    width: 940px;
    height: 85vh;
    max-width: 95vw;
    padding: 0;
    overflow: hidden;
    background: var(--bg-main);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 60px rgba(0,0,0,0.6);
    border-radius: 20px;
}

.settings-sidebar {
    width: 250px;
    background: var(--bg-side);
    padding: 2rem 1rem;
    border-right: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0; /* Never shrink the sidebar */
}

.settings-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Crucial for preventing overflow from pushing flex sibling */
    background: var(--bg-main);
    overflow: hidden;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-tab, .server-settings-tab-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
}

.settings-tab:hover, .server-settings-tab-btn:hover {
    background: var(--bg-modifier-hover);
    color: var(--text-main);
}

.settings-tab.active, .server-settings-tab-btn.active {
    background: var(--bg-modifier-hover);
    color: var(--text-header);
    box-shadow: inset 2px 0 0 var(--accent);
}

.settings-divider {
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 0.5rem 0;
}

.tab-danger:hover {
    background: rgba(240, 71, 71, 0.1);
    color: #f04747;
}

/* Entry Cards for Lists */
.settings-entry-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.settings-entry-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.settings-entry-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-entry-title {
    color: var(--text-header);
    font-weight: 700;
    font-size: 0.95rem;
}

.settings-entry-desc {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.settings-entry-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-danger-large {
    background: rgba(240, 71, 71, 0.1);
    color: #f04747;
    border: 1px solid rgba(240, 71, 71, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-danger-large:hover {
    background: #f04747;
    color: white;
}

.channel-create-container {
    background: rgba(112, 0, 255, 0.05);
    border: 1px dashed rgba(112, 0, 255, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.settings-header {
    padding: 2rem 2.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-main);
    z-index: 5;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.settings-title-container {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    white-space: nowrap !important;
    min-width: 0;
}

.settings-title-container i {
    font-size: 1.3rem !important;
    color: var(--accent) !important;
    flex-shrink: 0 !important;
    opacity: 0.8;
}

.settings-header h2 {
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block !important;
}

/* Premium Settings Cards */
.settings-card {
    background: var(--bg-darker);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.03);
    width: 100%;
    box-sizing: border-box;
}

.settings-card-label {
    color: var(--text-main);
    font-weight: bold;
    margin-bottom: 0.8rem;
    display: block;
}

.settings-input {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-darkest);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-main);
    box-sizing: border-box;
    transition: 0.2s;
}

.settings-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}

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

.header-centered {
    justify-content: center !important;
    position: relative;
    text-align: center;
}

.header-centered > div {
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-centered .close-btn {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.settings-body {
    flex: 1;
    padding: 2rem 2.5rem 3rem;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal push */
}

.settings-list-scroll {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 1rem;
}

.settings-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.settings-list-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.settings-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.color-control {
    display: flex;
    align-items: center;
}

input[type="color"] {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

/* Social Modals */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.emoji-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.emoji-toggle-btn:hover {
    color: var(--text-header);
    transform: scale(1.1);
}

#chat-image-upload-btn:hover {
    color: var(--accent);
}

#chat-image-upload-btn.hidden {
    display: none;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #f04747;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.modal-body p {
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 600px) {
    .modal-content, .futuristic-card {
        padding: 1.5rem;
    }
}

/* Messages & Grouping */
.message {
    padding: 0.1rem 1rem;
    display: flex;
    gap: 1rem;
    line-height: 1.375rem;
}

.message.new-group {
    margin-top: 1.0625rem;
}

.message:hover {
    background-color: var(--bg-darker);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.message-avatar.hidden-avatar {
    opacity: 0;
    pointer-events: none;
    height: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.message-header {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.1rem;
}

.message-header .user {
    font-weight: 500;
    color: var(--text-header);
    font-size: 1rem;
}

.message-header .time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
    margin-left: 0.25rem;
}

.message .text {
    color: var(--text-main);
    word-break: break-word;
}

/* Profile Card Styling */
.user-profile-card {
    text-align: center;
    padding: 1rem;
}

.profile-avatar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-sizing: border-box;
    z-index: 0;
}

.profile-avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 2;
}

/* ZYNX Ring & Glow */
.profile-avatar-wrapper.zynx-ring {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.profile-avatar-wrapper.zynx-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    border-radius: 50%;
    background: linear-gradient(135deg, #7000ff, #00d4ff);
    box-shadow: 0 0 30px var(--glow-color, rgba(0, 212, 255, 0.7));
    z-index: -1;
}

.profile-info {
    text-align: left;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.profile-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.profile-name-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-username {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-header);
}

.profile-zynx-badge {
    background: linear-gradient(45deg, #7000ff, #00d4ff);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(112, 0, 255, 0.5);
}

.profile-bio {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
    font-style: italic;
    word-break: break-word;
    max-width: 100%;
}

.btn-profile-add {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-profile-add:hover {
    background: #1e8a4a;
    transform: translateY(-1px);
}

.btn-profile-add i {
    font-size: 0.9rem;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: var(--bg-darker);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 4px;
    min-width: 160px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: fadeInScale 0.15s ease-out;
}

.context-menu-item {
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.1s;
}

.context-menu-item:hover {
    background: var(--primary-color);
    color: white;
}

/* Online List ZYNX */
.online-list > div {
    cursor: pointer;
}

.online-zynx-badge {
    background: linear-gradient(to right, #7000ff, #00d4ff);
    color: white;
    font-size: 0.55rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 900;
    margin-left: 4px;
    vertical-align: middle;
}

/* Badge Styles */
.badge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.badge-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}

.badge-card:hover { transform: translateY(-2px); }
.badge-card.locked { opacity: 0.4; pointer-events: none; }
.badge-card.selected { border: 2px solid var(--accent); }

.badge-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.badge-name { font-weight: 700; font-size: 0.9rem; color: var(--text-header); }
.badge-desc { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }

.badge-rarity {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.rarity-common { color: #808080; border: 1px solid #808080; }
.rarity-uncommon { color: #2ecc71; border: 1px solid #2ecc71; text-shadow: 0 0 6px rgba(46,204,113,0.3); }
.rarity-rare { color: #3498db; border: 1px solid #3498db; text-shadow: 0 0 8px rgba(52,152,219,0.4); }
.rarity-epic { color: #9b59b6; border: 1px solid #9b59b6; text-shadow: 0 0 10px rgba(155,89,182,0.5); }
.rarity-legendary { color: #f1c40f; border: 1px solid #f1c40f; text-shadow: 0 0 12px rgba(241,196,15,0.6); }
.rarity-mythic { color: #e74c3c; border: 1px solid #e74c3c; text-shadow: 0 0 15px rgba(231,76,60,0.7); animation: mythicPulse 2s infinite; }
.rarity-special { background: linear-gradient(45deg, #7000ff, #00d4ff); color: white; border: none; box-shadow: 0 0 10px rgba(112,0,255,0.5); }

@keyframes mythicPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(231,76,60,0.3); }
    50% { box-shadow: 0 0 20px rgba(231,76,60,0.7); }
}

/* Profile Badges Display */
.profile-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.profile-badge-item {
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Spam Warning */
.spam-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(240, 71, 71, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    animation: fadeInScale 0.2s ease-out;
}

/* Self-profile clickable */
.user-profile-bar {
    cursor: pointer;
}

.chat-footer {
    padding: 0 8px 1.5rem 8px; /* 8px spacing from sides */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.edit-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(112, 0, 255, 0.1);
    border-left: 3px solid var(--accent);
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    animation: slideUp 0.15s ease-out;
}

.edit-banner.hidden {
    display: none;
}

.cancel-edit-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}

.cancel-edit-btn:hover {
    color: white;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

#chat-form {
    background: var(--bg-modifier-hover);
    border-radius: 8px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
}

#chat-form input {
    background: none;
    border: none;
    padding: 1rem 0;
    margin-bottom: 0;
}

.status-dot.offline {
    background: #747f8d;
}

/* Server Sidebar */
.sidebar-server-list {
    width: 72px;
    background: var(--bg-darkest);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.server-icon-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    background: var(--bg-side);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: var(--text-muted);
}

.server-icon-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.server-icon-wrapper i {
    font-size: 1.2rem;
}

.server-icon-wrapper:hover, .server-icon-wrapper.active {
    border-radius: 16px;
    background: var(--primary-color);
    color: white;
}

/* Active indicator pill */
.server-icon-wrapper.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 40px;
    background: white;
    border-radius: 0 4px 4px 0;
}

.server-icon-wrapper:hover:not(.active)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: white;
    border-radius: 0 4px 4px 0;
}

.server-divider {
    width: 32px;
    height: 2px;
    background: var(--bg-modifier-hover);
    margin-bottom: 8px;
}

.add-server {
    color: #23a559;
}

.add-server:hover {
    background: #23a559 !important;
    color: white;
}

/* Better Channel Creation UI */
.channel-create-container {
    background: rgba(112, 0, 255, 0.08); /* More visible */
    border: 2px solid rgba(112, 0, 255, 0.3); /* Thicker border */
    border-radius: 12px;
    padding: 2rem; /* More padding */
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 5; /* Ensure it is on top */
}

.channel-input-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.premium-input {
    flex: 1;
    background: #000 !important; /* Pure black for contrast */
    border: 2px solid rgba(112, 0, 255, 0.5) !important;
    padding: 1.2rem !important; /* Larger padding */
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    cursor: text !important;
    display: block !important;
    width: 100% !important;
}

.premium-input:focus {
    border-color: #00d4ff !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    background: #080808 !important;
}

.premium-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.channel-item {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    transition: 0.2s;
    cursor: default;
}

.channel-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateX(5px);
}

.channel-item .hash {
    color: #00d4ff;
    font-size: 1.6rem;
    font-weight: 900;
    margin-right: 15px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.channel-item .name {
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Premium Switch (iOS Style) */
.premium-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.premium-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.premium-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-darkest);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.1);
}

.premium-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .premium-slider {
    background: linear-gradient(45deg, var(--primary-color), #00d4ff);
}

input:focus + .premium-slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .premium-slider:before {
    transform: translateX(24px);
}

/* Message Actions & Reactions */
.message {
    position: relative;
}

.message-actions {
    position: absolute;
    right: 1rem;
    top: -0.5rem;
    background: var(--bg-darker);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border-radius: 4px;
    display: none;
    padding: 2px;
    z-index: 10;
}

.message:hover .message-actions {
    display: flex;
}

.message-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: 0.2s;
}

.message-actions button:hover {
    background: var(--bg-modifier-hover);
    color: var(--text-header);
}

/* Search Modal / Results Close Button */
.results-close-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.results-close-btn:hover {
    background: #f04747;
    border-color: #f04747;
    transform: rotate(90deg);
}

.message-reactions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.reaction-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s;
    user-select: none;
}

.reaction-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.reaction-pill.active {
    background: rgba(88, 101, 242, 0.2);
    border-color: var(--primary-color);
}

.reaction-pill .count {
    color: var(--text-muted);
    font-weight: bold;
}

.reaction-pill.active .count {
    color: var(--primary-color);
}

/* Unread Indicators & Pings */
.unread-dot {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    margin-left: auto; /* Push to right */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.ping-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #f04747;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 12px;
    border: 2px solid var(--bg-darker);
    line-height: 1;
    z-index: 10;
}
/* Premium UI Elements */
.premium-select-wrapper {
    position: relative;
    display: inline-block;
    background: #000;
    border-radius: 8px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.premium-select-wrapper:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.2);
}

.premium-select {
    background: transparent;
    color: #fff;
    border: none;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    min-width: 120px;
}

.premium-select option {
    background: #111;
    color: #fff;
}

.btn-danger-large {
    background: rgba(240, 71, 71, 0.1);
    color: #f04747;
    border: 1px solid rgba(240, 71, 71, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-large:hover {
    background: #f04747;
    color: white;
    box-shadow: 0 0 15px rgba(240, 71, 71, 0.4);
    transform: translateY(-1px);
}

.permission-toggle {
    cursor: pointer;
    display: block;
}

.permission-toggle input {
    display: none;
}

.toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.permission-toggle input:checked + .toggle-button {
    background: rgba(88, 101, 242, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.2);
}

.permission-toggle input:checked + .toggle-button i {
    color: var(--primary-color);
}

.premium-color-picker {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.premium-color-picker:hover {
    transform: scale(1.1);
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FRIENDS VIEW STYLES */
.friends-tab-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.friends-tab-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-header);
}

.friends-tab-btn.active {
    background: rgba(255,255,255,0.1);
    color: var(--text-header);
}

.friends-tab-btn.add-friend-btn {
    background: #23a559;
    color: white;
    font-weight: bold;
}

.friends-tab-btn.add-friend-btn.active, .friends-tab-btn.add-friend-btn:hover {
    background: #1a7d43;
}

.friends-list-header {
    color: var(--text-header);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

/* ==== New Friend Grid & Glassmorphism Styles ==== */
#friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    padding: 1rem;
}

.friend-card.glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.friend-card.glass:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.friend-card .avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    position: relative;
}

.friend-card .info {
    margin-bottom: 0.5rem;
}

.friend-card .info .name {
    display: block;
    font-weight: 600;
    color: var(--text-header);
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-card .info .status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pill-button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pill-button:hover { background: #4752c4; }
.pill-button.remove { background: #f04747; }
.pill-button.remove:hover { background: #da3737; }
.pill-button.accept { background: #23a559; }
.pill-button.accept:hover { background: #1f8b4c; }
.pill-button.reject { background: #f04747; }
.pill-button.reject:hover { background: #da3737; }

.friend-card .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    border-radius: 12px;
    z-index: 10;
    pointer-events: none;
}

.friend-card.loading .overlay {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 0.8s linear infinite;
}

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

/* Base friend tab reset */
.friends-list-header {
    color: var(--text-header);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    margin-top: 10px;
    padding-left: 1rem;
}

/* Adjust old animations */
.btn-friend-action.confetti {
    animation: confetti-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-flash {
    animation: successColorFlash 0.6s;
}

@keyframes successColorFlash {
    0% { background-color: #23a559; }
    100% { }
}

@keyframes confetti-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Premium Profile Polish */
.modal-content.premium-polish {
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.premium-polish .modal-header {
    padding: 1.5rem 2rem 1rem;
    margin-bottom: 0;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2;
    position: relative;
}

.modal-body.polished-body {
    position: relative;
    padding: 2rem;
    z-index: 1;
}

.modal-body.polished-body::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.15;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

.profile-glass-card {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.profile-glass-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}


/* Contest Styles */
.contest-banner {
    background: linear-gradient(135deg, #1a1b1e 0%, #2b2d31 100%);
    border: 2px solid #5865f2;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
    text-align: center;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.2);
    position: relative;
    overflow: hidden;
}

.contest-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(88,101,242,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.contest-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(88,101,242,0.5);
    margin-bottom: 0.5rem;
}

.contest-details {
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.contest-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-join-contest {
    background: #5865f2;
    color: white;
    border: none;
    padding: 0.6rem 2rem;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(88,101,242,0.4);
}

.btn-join-contest:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88,101,242,0.6);
    background: #4752c4;
}

.contest-timer {
    margin-top: 0.75rem;
    font-family: monospace;
    color: #23a559;
    font-weight: bold;
}

.contest-ended {
    margin-top: 0.75rem;
    color: #f04747;
    font-weight: bold;
    text-transform: uppercase;
}

/* Official System Messages */
.official-tag {
    background: linear-gradient(90deg, #ffcc00, #ff9900);
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    vertical-align: middle;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
    display: inline-block;
}

.message-item[data-user="[SERVER]"] {
    background: rgba(255, 204, 0, 0.03) !important;
    border-left: 3px solid #ffcc00;
}

.message-item[data-user="[SERVER]"] .user-name {
    color: #ffcc00 !important;
}

/* Settings Icons Styling */
.settings-tab i {
    width: 20px;
    margin-right: 12px;
    color: var(--text-muted);
    transition: color 0.2s;
    text-align: center;
}

.settings-tab:hover i,
.settings-tab.active i {
    color: #fff;
}

.settings-tab.tab-danger i {
    color: #f04747;
}

.settings-tab.active {
    background: var(--bg-modifier-hover);
    color: var(--text-header);
}

/* Custom Emojis */
.bc-emoji {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: sub;
    margin: 0 1px;
}

.bc-emoji svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Emoji Picker */
.emoji-picker-container {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 340px;
    height: 420px;
    background: var(--bg-side);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    z-index: 1000;
    margin-bottom: 12px;
    overflow: hidden;
    animation: fadeInScale 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.emoji-picker-header {
    padding: 14px;
    background: var(--bg-darker);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-header);
    letter-spacing: 0.5px;
}

.emoji-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.emoji-category-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 14px 6px 8px;
    letter-spacing: 1px;
    font-weight: 600;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.emoji-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255,255,255,0.02);
}

.emoji-item:hover {
    background: var(--bg-modifier-hover);
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.emoji-item svg {
    width: 26px;
    height: 26px;
}



.chat-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.emoji-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.emoji-toggle-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Login Panel Language Switcher */
.lang-switch-container {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.lang-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lang-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 34px;
}

.lang-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(112, 0, 252, 0.6);
}

.lang-switch input:checked + .lang-slider {
    background: linear-gradient(90deg, #7000ff, #00d4ff);
}

.lang-switch input:checked + .lang-slider:before {
    transform: translateX(18px);
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

.lang-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-muted);
}



.thread-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 12px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.thread-link-pill:hover {
    background: var(--primary-color);
    color: white;
}

/* Reputation Buttons */
.rep-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.rep-btn.plus {
    background: rgba(35, 165, 89, 0.15);
    color: #23a559;
    border: 1px solid rgba(35, 165, 89, 0.3);
}

.rep-btn.plus:hover {
    background: #23a559;
    color: white;
    box-shadow: 0 0 15px rgba(35, 165, 89, 0.4);
}

.rep-btn.minus {
    background: rgba(240, 71, 71, 0.15);
    color: #f04747;
    border: 1px solid rgba(240, 71, 71, 0.3);
}

.rep-btn.minus:hover {
    background: #f04747;
    color: white;
    box-shadow: 0 0 15px rgba(240, 71, 71, 0.4);
}

@media (max-width: 768px) {
    .brand-typewriter {
        display: none;
    }
}

/* Reply box styling */
.reply-box {
    background: var(--bg-darker);
    border-left: 4px solid var(--accent);
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}
.reply-box:hover {background: rgba(0,0,0,0.2);}

/* Reply Styles */
.reply-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: 4px;
    width: fit-content;
    transition: 0.2s;
    border-left: 2px solid var(--primary-color);
}
.reply-indicator:hover {
    background: rgba(255, 255, 255, 0.08);
}
.reply-user {
    font-weight: bold;
    color: var(--primary-color);
}
.reply-preview-text {
    font-style: italic;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}
/* Discovery & Pins */
.server-card-discovery {
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
}
.server-card-discovery:hover {
    transform: translateY(-3px);
    border-color: #23a559;
    box-shadow: 0 5px 15px rgba(35, 165, 89, 0.2);
}
.pin-item {
    transition: 0.2s;
}
.pin-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}
/* Help Button Pulsing */
#help-hints-btn i {
    transition: 0.3s;
}
#help-hints-btn:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Pins Dropdown */
.pins-dropdown {
    position: absolute;
    top: 50px;
    right: 20px;
    width: 300px;
    max-height: 400px;
    background: rgba(30, 31, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}
.pins-dropdown-header {
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pins-dropdown-list {
    overflow-y: auto;
    flex: 1;
}
.pin-item-dropdown {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: 0.2s;
}
.pin-item-dropdown:hover {
    background: rgba(255, 255, 255, 0.05);
}
.pin-user {
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 4px;
}
.pin-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    float: right;
    font-weight: normal;
}
.pin-text {
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.3;
}
/* Discovery Redesign */
.server-micro-profile:hover {
    transform: translateY(-5px);
    border-color: rgba(35, 165, 89, 0.6) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background: rgba(35, 165, 89, 0.05) !important;
}
/* Global Modal Rounding - Reverted to default, specific modals will override */
.modal-content.futuristic-card {
    border-radius: 20px;
    overflow: hidden;
}


/* ZYNX Custom Styles */
@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#zynx-days-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #333;
    border-radius: 5px;
    outline: none;
}

#zynx-days-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.btn-neon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Shop Button Animation */
#shop-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#shop-btn:hover {
    color: #ffcc00;
    transform: scale(1.2) rotate(15deg);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

/* Terminal & Shop Buttons */
.term-btn { 
    background: rgba(0,0,0,0.3); 
    border: 1px solid #23a559; 
    color: #23a559; 
    padding: 6px 12px; 
    cursor: pointer; 
    font-family: inherit; 
    font-size: 0.8rem; 
    transition: all 0.2s; 
    border-radius: 4px;
}
.term-btn:hover, .term-btn.active { 
    background: #23a559; 
    color: #000; 
    box-shadow: 0 0 10px rgba(35, 165, 89, 0.5);
}

.shop-cat-btn {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shop-cat-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.shop-cat-btn.active {
    background: linear-gradient(135deg, #7000ff, #00d4ff);
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(112, 0, 255, 0.5);
    transform: scale(1.02);
}

.shop-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.shop-scroll-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.shop-scroll-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7000ff, #00d4ff);
    border-radius: 10px;
}

.shop-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #00d4ff;
}

/* --- RAINBOW POWER --- */
.rainbow-text {
    background: linear-gradient(
        to right, 
        #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000
    );
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-animation 3s linear infinite;
    font-weight: bold;
    display: inline-block;
}

@keyframes rainbow-animation {
    0% { background-position: 0% center; }
    100% { background-position: 400% center; }
}

.rainbow-badge {
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
    background-size: 200% 200%;
    animation: rainbow-bg 2s linear infinite;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 900;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

@keyframes rainbow-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- ZYNX Layout Customization --- */

/* Horizontal Layout (Servers & Channels at the top) */
body.layout-horizontal #chat-container {
    flex-direction: column !important;
}

/* Make Server Sidebar horizontal */
body.layout-horizontal .sidebar-server-list {
    width: 100% !important;
    height: 64px !important;
    flex-direction: row !important;
    padding: 0 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.layout-horizontal .server-icon-wrapper {
    margin: 0 5px !important;
    margin-bottom: 0 !important;
}

body.layout-horizontal .server-divider {
    width: 2px !important;
    height: 32px !important;
    margin: 0 8px !important;
}

/* Make Channels Sidebar horizontal */
body.layout-horizontal .sidebar-left {
    width: 100% !important;
    height: 60px !important;
    flex-direction: row !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.layout-horizontal .sidebar-left .sidebar-header {
    width: auto !important;
    border-bottom: none !important;
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 0 15px !important;
    height: 100% !important;
}

body.layout-horizontal .sidebar-left .user-profile-bar {
    width: auto !important;
    border-top: none !important;
    border-left: 1px solid rgba(255,255,255,0.05);
    padding: 0 15px !important;
    margin-left: auto !important;
}

body.layout-horizontal #unified-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 10px !important;
    align-items: center;
}

body.layout-horizontal .channel-item, body.layout-horizontal .chat-item {
    padding: 0 15px !important;
    height: 40px !important;
    margin-bottom: 0 !important;
    margin-right: 10px !important;
    white-space: nowrap;
}

/* Inverted Layout (Right-to-Left) */
body.layout-inverted #chat-container {
    flex-direction: row-reverse !important;
}

/* Icons Only Channels Mode */
body.icons-only-channels .sidebar-left {
    width: 80px !important;
    transition: width 0.3s ease;
}

body.icons-only-channels .channel-item span:not(.hash), 
body.icons-only-channels .chat-item > span:not(.avatar-small),
body.icons-only-channels .sidebar-header h3,
body.icons-only-channels .section-header span {
    display: none !important;
}

/* Make headers stack buttons vertically */
body.icons-only-channels .sidebar-header > div,
body.icons-only-channels .section-header > div {
    flex-direction: column !important;
    gap: 15px !important;
    width: 100%;
}

body.icons-only-channels .sidebar-header {
    height: auto !important;
    padding: 15px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.icons-only-channels .section-header {
    justify-content: center !important;
    padding: 15px 0 !important;
}

/* Shape channels and chats as circles */
body.icons-only-channels .channel-item, 
body.icons-only-channels .chat-item {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 10px auto !important;
}

body.icons-only-channels .channel-item .hash {
    margin: 0 !important;
    font-size: 1.6rem !important;
}

body.icons-only-channels .chat-item .avatar-small {
    margin: 0 !important;
}

/* Fix User Profile Bar */
body.icons-only-channels .user-profile-bar .user-meta,
body.icons-only-channels .user-profile-bar #zynx-btn {
    display: none !important;
}

body.icons-only-channels .user-profile-bar {
    justify-content: center !important;
    padding: 15px 0 !important;
}


