:root {
    --accent:           #ff007f;
    --accent-dim:       rgba(255, 0, 127, 0.15);
    --accent-glow:      rgba(255, 0, 127, 0.35);
    --accent-hover:     #ff3399;
    --bg-main:          #060608;
    --bg-panel:         #0d0d12;
    --bg-header:        #0a0a0f;
    --bg-input:         #111118;
    --bg-elevated:      #15151f;
    --bg-overlay:       rgba(7, 7, 10, 0.98);
    --border:           rgba(255, 255, 255, 0.04);
    --border-subtle:    rgba(255, 255, 255, 0.08);
    --border-accent:    rgba(255, 0, 127, 0.3);
    --text-main:        #e2e8f0;
    --text-dim:         #64748b;
    --text-muted:       #3f3f46;
    --text-white:       #ffffff;
    --color-success:    #4ade80;
    --color-warning:    #fbbf24;
    --color-danger:     #f87171;
    --color-info:       #60a5fa;
    --color-purple:     #818cf8;
    --color-teal:       #2dd4bf;
    --color-gold:       #d4af37;
    --color-gold-text:  #ffd700;
    --header-h:         60px;
    --sidebar-w:        260px;
    --shadow:           0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-heavy:     0 20px 50px rgba(0, 0, 0, 0.9);
    --radius-sm:        8px;
    --radius-md:        12px;
    --radius-lg:        16px;
    --radius-xl:        20px;
    --radius-pill:      50px;
    --transition:       0.2s ease;
    --transition-slow:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="rosa"] {
    --accent:        #ff007f;
    --accent-dim:    rgba(255, 0, 127, 0.15);
    --accent-glow:   rgba(255, 0, 127, 0.35);
    --accent-hover:  #ff3399;
    --border-accent: rgba(255, 0, 127, 0.3);
}
[data-theme="azul"] {
    --accent:        #007fff;
    --accent-dim:    rgba(0, 127, 255, 0.15);
    --accent-glow:   rgba(0, 127, 255, 0.35);
    --accent-hover:  #3399ff;
    --border-accent: rgba(0, 127, 255, 0.3);
}
[data-theme="purpura"] {
    --accent:        #9333ea;
    --accent-dim:    rgba(147, 51, 234, 0.15);
    --accent-glow:   rgba(147, 51, 234, 0.35);
    --accent-hover:  #a855f7;
    --border-accent: rgba(147, 51, 234, 0.3);
}
[data-theme="verde"] {
    --accent:        #00c896;
    --accent-dim:    rgba(0, 200, 150, 0.15);
    --accent-glow:   rgba(0, 200, 150, 0.35);
    --accent-hover:  #00e6aa;
    --border-accent: rgba(0, 200, 150, 0.3);
}
[data-theme="naranja"] {
    --accent:        #f97316;
    --accent-dim:    rgba(249, 115, 22, 0.15);
    --accent-glow:   rgba(249, 115, 22, 0.35);
    --accent-hover:  #fb923c;
    --border-accent: rgba(249, 115, 22, 0.3);
}
.theme-picker {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
}
.theme-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition);
    flex-shrink: 0;
}
.theme-dot:hover {
    transform: scale(1.2);
}
.theme-dot.active {
    border-color: var(--text-main);
    transform: scale(1.15);
}
.theme-dot[data-theme="rosa"]    { background: #ff007f; }
.theme-dot[data-theme="azul"]    { background: #007fff; }
.theme-dot[data-theme="purpura"] { background: #9333ea; }
.theme-dot[data-theme="verde"]   { background: #00c896; }
.theme-dot[data-theme="naranja"] { background: #f97316; }
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: fixed;
}
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar          { width: 4px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
.global-header {
    height: var(--header-h);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    z-index: 1100;
    flex-shrink: 0;
}
.header-left-group {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 280px;
    flex-shrink: 0;
}
.header-right-group {
    width: 280px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}
.header-center-group {
    flex: 1;
    display: flex;
    justify-content: center;
    text-align: center;
    min-width: 0;
    padding: 0 15px;
}
.buffer-info {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.buffer-info h2 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: lowercase;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	line-height: 1.2;
}
.topic-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.75rem;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	line-height: 1.2;
}
.topic-container i {
    font-size: 0.6rem;
    opacity: 0.5;
    flex-shrink: 0;
}
.icon-btn {
    background: #111118;
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.icon-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}
.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}
.sidebar-left,
.sidebar-right {
    background: var(--bg-panel);
    display: flex;
    flex-direction: column;
    transition: var(--transition-slow);
    z-index: 1050;
    overflow: hidden;
}
.sidebar-left {
    width: var(--sidebar-w);
    border-right: 1px solid var(--border);
}
.sidebar-right {
    width: 240px;
    border-left: 1px solid var(--border);
}
.sidebar-left.hidden {
    width: 0 !important;
    transform: translateX(-100%);
    opacity: 0;
}
.sidebar-right.hidden {
    width: 0 !important;
    transform: translateX(100%);
    opacity: 0;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.visible {
    display: block;
}
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at center, #0e0e14 0%, #060608 100%);
    min-height: 0;
    height: 100%;
    overflow: hidden;
}
.chat-viewport {
    scroll-behavior: smooth;
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 10px 30px;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}
.chat-buffer {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    flex: 0 0 auto;
}
.chat-buffer.active {
    display: flex;
}
.nav-scrollbox {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}
.nav-section {
    margin-bottom: 25px;
}
.section-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0 24px 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.nav-item {
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
}
.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}
.nav-item.active {
    color: var(--accent);
    background: var(--accent-dim);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}
.nav-label {
    flex: 1;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-muted);
    transition: var(--transition);
    opacity: 0;
    z-index: 2;
}
.nav-item:hover .nav-close    { opacity: 1; }
.nav-item.active .nav-close   { opacity: 0.6; color: var(--accent); }
.nav-close:hover {
    background: var(--accent-dim);
    color: var(--accent);
    transform: scale(1.1);
}
.unread-dot {
    display: none;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--accent);
    z-index: 5;
}
.nav-item.unread .nav-label {
    color: var(--text-white);
    text-shadow: 0 0 5px var(--accent-dim);
}
.nav-item.unread .unread-dot,
#nav-status.unread .unread-dot {
    display: block;
}
.user-profile-card {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}
.profile-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #16161d;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
}
.profile-avatar {
    width: 38px;
    height: 38px;
    background: #22222b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
}
.profile-data {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.profile-nick {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-white);
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-status {
    font-size: 0.65rem;
    color: var(--color-success);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}
.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-success);
}
.settings-mini-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-mini-btn:hover {
    color: var(--text-main);
}
#my-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}
.nicklist-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.user-count {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
}
.nicklist-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 20px;
    scrollbar-gutter: stable;
}
.nicklist-scroll::-webkit-scrollbar       { width: 4px; }
.nicklist-scroll::-webkit-scrollbar-track { background: transparent; }
.nicklist-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
.nicklist-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.u-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 2px;
    user-select: none;
}
.u-card:hover  { background: rgba(255, 255, 255, 0.05); transform: translateX(5px); }
.u-card:active { background: rgba(255, 255, 255, 0.10); transform: scale(0.96) translateX(5px); }
.u-avatar-wrapper {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.u-avatar-mini {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.u-avatar-mini.big {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    margin: 0 auto 15px;
    border-radius: 15px;
}
.u-avatar--photo {
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,0.1);
}
.u-rank-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-panel);
    color: var(--text-white);
    font-size: 9px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.rank-founder { background: #b91c1c; }
.rank-admin   { background: #c2410c; }
.rank-op      { background: #15803d; }
.rank-halfop  { background: #1d4ed8; }
.rank-voice   { background: #b45309; }
.u-nick {
    margin-left: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.u-nick--ranked {
    font-weight: 700;
    color: var(--text-white);
}
.nick-colored {
    font-weight: bold;
}
.msg-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    margin-bottom: 5px;
}
.msg-left  { align-self: flex-start; }
.msg-right { align-self: flex-end; align-items: flex-end; }
.bubble {
    padding: 9px 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: normal;
    overflow-wrap: break-word;
    border-radius: 25px;
}
.msg-left .bubble {
    background: #1c1c24;
    color: var(--text-main);
    border: 0.5px solid #808080;
    border-top-left-radius: 5px;
}
.msg-right .bubble {
    background: var(--accent);
    color: var(--text-white) !important;
    font-weight: 500;
    box-shadow: 0 4px 15px var(--accent-glow);
    border-top-right-radius: 5px;
}
.msg-info {
    font-size: 0.75rem;
    margin: 0 5px 4px;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
	flex-direction: row-reverse;
    justify-content: flex-end;
}
.msg-right .msg-info {
	flex-direction: row;
    justify-content: flex-end;
}
.msg-time {
    color: var(--text-dim);
    font-weight: 400;
    text-transform: none;
    font-size: 0.65rem;
    opacity: 0.8;
}
.action-msg {
    background: rgba(244, 114, 182, 0.05) !important;
    border-left: 3px solid #f472b6 !important;
    font-weight: 500;
}
.msg-system {
    color: var(--color-danger);
    font-style: italic;
    background: rgba(248, 113, 113, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    margin: 5px 0;
    border-left: 3px solid var(--color-danger);
}
.msg-mention .bubble {
    background: var(--text-muted) !important;
}
.modo-lite .msg-wrapper {
    display: block;
    max-width: 100%;
    padding: 2px 8px;
    background: none !important;
    border-radius: 0;
    margin-bottom: 0;
}
.modo-lite .msg-wrapper:hover {
    background: rgba(255,255,255,0.03) !important;
}
.modo-lite .msg-right,
.modo-lite .msg-left {
    align-self: unset;
    max-width: 100%;
}
.modo-lite .msg-right {
    background: var(--accent-dim) !important;
}
.modo-lite .msg-info,
.modo-lite .msg-right .msg-info {
    display: inline;
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
}
.modo-lite .msg-time {
    color: var(--text-main);
    font-size: 0.8rem;
    margin-right: 4px;
    font-weight: 400;
}
.modo-lite .msg-time::before {
    content: '[';
}
.modo-lite .msg-time::after {
    content: ']';
}
.modo-lite .msg-nick-label::after {
    content: ':';
}
.modo-lite .bubble {
    display: inline;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 0 0 4px !important;
    box-shadow: none !important;
    color: var(--text-main) !important;
    font-size: 0.88rem;
    font-weight: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}
.modo-lite .msg-right .bubble {
    color: var(--text-main) !important;
    font-weight: normal;
}
.modo-lite .msg-mention {
    background: var(--accent-dim) !important;
    border-left: 3px solid var(--accent) !important;
}
.irc-event {
    padding: 6px 12px;
    margin: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: var(--text-dim);
    animation: fadeInEvent 0.3s ease;
}
.event-icon  { width: 20px; text-align: center; font-size: 0.75rem; flex-shrink: 0; margin-right: 8px; }
.event-text  { flex: 1; min-width: 0; word-break: break-word; font-size: 0.85rem; }
.event-label { text-transform: uppercase; font-size: 0.7rem; margin-right: 5px; letter-spacing: 0.5px; }
.event--join   { border-left: 3px solid var(--color-success);  background: linear-gradient(90deg, rgba(74, 222, 128, 0.06) 0%, transparent 100%); }
.event--join   .event-icon, .event--join   .event-label { color: var(--color-success); }
.event--part,
.event--quit   { border-left: 3px solid var(--color-danger);   background: linear-gradient(90deg, rgba(248, 113, 113, 0.06) 0%, transparent 100%); }
.event--part   .event-icon, .event--part   .event-label,
.event--quit   .event-icon, .event--quit   .event-label { color: var(--color-danger); }
.event--kick   { border-left: 3px solid var(--color-warning);  background: linear-gradient(90deg, rgba(251, 191, 36, 0.06) 0%, transparent 100%); }
.event--kick   .event-icon, .event--kick   .event-label { color: var(--color-warning); }
.event--mode   { border-left: 3px solid var(--color-purple);   background: linear-gradient(90deg, rgba(129, 140, 248, 0.06) 0%, transparent 100%); }
.event--mode   .event-icon, .event--mode   .event-label { color: var(--color-purple); }
.event--nick   { border-left: 3px solid var(--color-teal);     background: linear-gradient(90deg, rgba(45, 212, 191, 0.06) 0%, transparent 100%); }
.event--nick   .event-icon, .event--nick   .event-label { color: var(--color-teal); }
.event--topic  { border-left: 3px solid var(--color-info);     background: linear-gradient(90deg, rgba(96, 165, 250, 0.06) 0%, transparent 100%); }
.event--topic  .event-icon, .event--topic  .event-label { color: var(--color-info); }
.event--notice { border-left: 2px solid var(--color-warning); }
.event--notice .event-icon, .event--notice .event-label { color: var(--color-warning); }
.event--system { border-left: 3px solid #94a3b8;               background: linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0%, transparent 100%); }
.event--system .event-icon, .event--system .event-label { color: #94a3b8; }
.modo-lite .irc-event {
    display: block;
    padding: 1px 8px;
    margin: 0;
    border-left: none;
    border-radius: 0;
    background: none !important;
    font-size: 0.8rem;
}
.modo-lite .irc-event .event-icon {
    display: inline;
    width: auto;
    margin-right: 4px;
    font-size: 0.75rem;
}
.modo-lite .irc-event .event-label {
    display: inline;
    font-size: 0.75rem;
}
.modo-lite .irc-event .event-text {
    display: inline;
    font-size: 0.8rem;
}
.modo-lite .irc-event .msg-time {
    display: none;
}
@keyframes fadeInEvent {
    from { opacity: 0; transform: translateX(-5px); }
    to   { opacity: 1; transform: translateX(0); }
}
.emojmov-inline-img {
    height: 1.6em;
    width: auto;
    vertical-align: middle;
    margin: 0 3px;
    display: inline-block;
}
.chat-input-zone {
    display: flex;
    flex-direction: column;
    padding: 0 30px;
    background: var(--bg-main);
    flex-shrink: 0;
}
.input-container {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    padding: 0;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    position: relative;
}
.input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
#user-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-white);
    padding: 0 15px;
    font-size: 1rem;
    outline: none;
}
.send-button {
    background: var(--accent);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}
.send-button:hover {
    background: var(--accent-hover);
}
#user-input::-webkit-search-cancel-button {
    display: none;
}
.my-nick-badge {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.my-nick-badge:hover {
    color: var(--accent);
}
#emojmov-utility-bar {
    background: transparent;
    border-bottom: none;
    padding: 0 10px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.emojmov-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.emojmov-container:hover {
    scrollbar-color: var(--border) transparent;
}
.emojmov-container::-webkit-scrollbar {
    height: 3px;
}
.emojmov-container::-webkit-scrollbar-track {
    background: transparent;
}
.emojmov-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
}
.emojmov-container:hover::-webkit-scrollbar-thumb {
    background: var(--border);
}
.emojmov-btn {
    height: 28px;
    width: auto;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    filter: grayscale(0.3);
}
.emojmov-btn:hover {
    transform: scale(1.3);
    filter: grayscale(0);
}
.sticker-panel {
    width: 100%;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
}
.sticker-panel.hidden { display: none; }
.sticker-tab-bar {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
}
.sticker-tab {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.sticker-tab.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}
.sticker-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.sticker-grid.hidden { display: none; }
.sticker-grid-item {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    cursor: pointer;
    border-radius: 6px;
    padding: 3px;
    transition: background var(--transition), transform var(--transition);
}
.sticker-grid-item:active {
    background: var(--accent-dim);
    transform: scale(1.15);
}
#btn-sticker-mobile { display: none; }
#emojmov-dynamic-container { display: flex; }
.social-extra-buttons {
    display: flex;
    gap: 12px;
    margin-left: auto;
}
.social-util-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
}
.social-util-btn:hover {
    color: var(--accent);
    transform: translateY(-2px);
}
.scroll-alert {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    border: none;
}
.scroll-alert.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}
.scroll-alert i {
    animation: bounce 2s infinite;
}
.scroll-alert .badge {
    background: white;
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40%                      { transform: translateY(-5px); }
    60%                      { transform: translateY(-3px); }
}
.context-menu {
    position: fixed;
    display: none;
    background: rgba(13, 13, 18, 0.95);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    width: 200px;
    z-index: 5000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    overflow: hidden;
}
.menu-header {
    padding: 12px;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 800;
    font-size: 0.8rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.menu-item {
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}
.menu-item:hover {
    background: var(--accent);
    color: white !important;
}
.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 5px 0;
}
.menu-item--success   { color: var(--color-success); }
.menu-item--warn      { color: var(--color-warning); }
.menu-item--info      { color: var(--color-info); }
.menu-item--danger    { color: var(--color-danger); }
.menu-item--muted     { color: #999; }
.menu-item-danger:hover {
    background: #ff4a4a !important;
    color: white !important;
}
.mention-menu {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 0;
    background: #18181f;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    width: 240px;
	overflow-y: auto;
    max-height: 300px;
}
.mention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    cursor: pointer;
    color: #bbb;
    transition: var(--transition);
}
.mention-item:hover,
.mention-item.selected {
    background: #252531;
    color: white;
}
.mini-av,
.u-mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.u-mini-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}
.modal-overlay,
.social-modal-overlay,
.book-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
    z-index: 10;
}
.close-btn:hover { color: var(--accent); }
.hidden { display: none !important; }
.whois-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    width: 90%;
    max-width: 350px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 0, 127, 0.05);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transform: scale(0.95);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.whois-header {
    background: linear-gradient(180deg, var(--accent-dim) 0%, transparent 100%);
    padding: 20px 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.whois-avatar-container {
    position: relative;
    margin-bottom: 5px;
}
.whois-avatar {
    width: 140px;
    height: 140px;
    background: var(--accent);
    border-radius: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 3.5rem;
    color: var(--text-white);
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--bg-elevated);
    outline: 2px solid var(--accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whois-avatar-container:hover .whois-avatar {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px var(--accent-glow);
}
.status-badge {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    border: 2px solid var(--bg-elevated);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}
.status-online  { background: linear-gradient(135deg, #00b09b, #96c93d); }
.status-offline { background: linear-gradient(135deg, #8e9eab, #eef2f3); color: #333; }
.whois-title { text-align: center; margin-top: 0; }
#whois-nick {
    margin: 0;
    font-size: 1.6rem;
    color: var(--text-white);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
#whois-idle {
    font-size: 0.8rem;
    color: #aaa;
    display: block;
    margin-top: 4px;
}
.whois-stats-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 5px;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 25px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #eee;
}
.whois-body {
    padding: 12px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.status-civil-line {
    background: linear-gradient(135deg, var(--accent-dim), rgba(255, 126, 179, 0.05));
    padding: 8px 15px;
    border-radius: var(--radius-md);
    justify-content: center !important;
    border: 1px solid var(--border-accent);
    color: var(--text-white) !important;
    font-weight: 600;
    box-shadow: inset 0 0 10px rgba(255, 0, 127, 0.05);
}
.whois-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.whois-line {
    font-size: 0.85rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 12px;
}
.whois-line i {
    color: var(--accent);
    width: 20px;
    text-align: center;
    font-size: 1rem;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}
.whois-line span {
    word-break: break-all;
    line-height: 1.4;
    flex: 1;
}
.settings-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 400px;
    max-height: 80dvh;
    overflow-y: auto;
    color: #eee;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.settings-header {
    background: #252525;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.1rem;
}
.settings-header i.fa-cog,
.close-modal-btn {
    color: #888;
    transition: color var(--transition);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
}
.settings-header i.fa-cog:hover,
.close-modal-btn:hover { color: var(--text-white); }
.settings-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
#settings-preview,
.big-preview {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-white);
    background-size: cover;
    background-position: center;
    border: 2px solid var(--border-subtle);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.big-preview {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 20px;
    font-size: 2rem;
    border-color: var(--accent);
}
.avatar-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}
.btn-sm {
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid #444;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-sm:hover        { background: #333; color: var(--text-white); border-color: #555; }
.btn-danger-sm       { color: #ff6b6b; border-color: #5a2a2a; }
.btn-danger-sm:hover { background: #4a2020; border-color: #ff6b6b; color: var(--text-white); }
.settings-input-group label {
    display: block;
    color: #aaa;
    font-size: 0.8rem;
    margin-bottom: 6px;
    font-weight: 600;
}
.settings-input-group label i {
    margin-right: 5px;
    color: var(--accent);
}
.settings-input-group input[type="text"],
.settings-input-group input[type="password"],
.settings-input-group select {
    width: 100%;
    background: #161616;
    border: 1px solid #333;
    color: var(--text-white);
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: border-color var(--transition);
    appearance: none;
    outline: none;
}
.settings-input-group select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23AAAAAA%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
}
.settings-input-group input:focus,
.settings-input-group select:focus { border-color: var(--accent); }
.password-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}
#nick-pass-input { width: 100%; padding-right: 40px !important; }
.password-eye {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    transition: color var(--transition);
    z-index: 10;
}
.password-eye:hover { color: var(--accent); }
.settings-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.settings-checkbox-group label {
    color: #eee;
    font-size: 0.9rem;
    user-select: none;
    cursor: pointer;
}
.settings-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}
.btn-save-settings {
    width: 100%;
    background: var(--accent);
    color: var(--text-white);
    border: none;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, background var(--transition);
    margin-top: 10px;
}
.btn-save-settings:hover  { background: var(--accent-hover); }
.btn-save-settings:active { transform: scale(0.98); }
.listban-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.listban-hidden { display: none !important; }
.listban-container {
    background: var(--bg-panel);
    width: 90%;
    max-width: 480px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: listban-fade 0.3s ease;
}
@keyframes listban-fade {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.listban-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.listban-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-white);
    font-weight: 600;
}
.listban-title-group i { color: var(--accent); }
.listban-btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}
.listban-btn-close:hover { color: var(--text-white); }
.listban-body {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
}
.listban-body::-webkit-scrollbar       { width: 4px; }
.listban-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
#listban-target { list-style: none; padding: 0; margin: 0; }
.listban-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.listban-item:hover { background: rgba(255, 255, 255, 0.03); }
.listban-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}
.listban-info       { display: flex; flex-direction: column; gap: 2px; }
.listban-mask       { color: #eee; font-family: monospace; font-size: 0.85rem; }
.listban-meta       { color: var(--text-muted); font-size: 0.7rem; }
.listban-footer {
    padding: 16px;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border);
}
.listban-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}
.listban-btn-danger              { background: #e53935; color: var(--text-white); }
.listban-btn-danger:hover:not(:disabled) { background: #c62828; }
.listban-btn-danger:disabled     { opacity: 0.3; cursor: not-allowed; }
.listban-btn-warning             { background: #333; color: #ccc; border: 1px solid #444; }
.listban-btn-warning:hover       { background: #444; color: var(--text-white); }
.listban-empty,
.listban-loading-msg {
    padding: 20px;
    text-align: center;
    color: #888;
}
#modern-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#modern-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modern-alert-box {
    background: #1a1a24;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 85%;
    width: 320px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 0, 127, 0.05);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
#modern-alert-overlay.show .modern-alert-box {
    transform: translateY(0) scale(1);
}
.modern-alert-icon    { font-size: 45px; margin-bottom: 12px; }
.modern-alert-title   { margin: 0 0 10px; color: var(--text-white); font-size: 1.3rem; font-weight: 600; }
.modern-alert-message { margin: 0 0 24px; color: #b3b3b3; font-size: 0.95rem; line-height: 1.5; }
.modern-alert-input {
    width: 100%;
    background: #0f0f15;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    color: var(--text-white);
    font-size: 1rem;
    margin-bottom: 20px;
    box-sizing: border-box;
    outline: none;
    transition: all var(--transition-slow);
}
.modern-alert-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-dim);
}
.modern-alert-buttons { display: flex; gap: 10px; }
.modern-alert-btn {
    background: linear-gradient(135deg, #ff7eb3 0%, var(--accent) 100%);
    color: var(--text-white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-slow);
    box-shadow: 0 4px 15px var(--accent-glow);
}
.modern-alert-btn:hover {
    box-shadow: 0 6px 20px var(--accent-glow);
    transform: translateY(-2px);
}
.modern-alert-btn:active { transform: translateY(1px); }
.modern-alert-btn.cancel {
    background: #2a2a36;
    color: #b3b3b3;
    box-shadow: none;
}
.modern-alert-btn.cancel:hover {
    background: #3a3a4a;
    color: var(--text-white);
    transform: translateY(-2px);
}
.social-popover {
    position: absolute;
    bottom: 85px;
    right: 15px;
    width: 280px;
    background: rgba(15, 15, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 3000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.social-popover.hidden { display: none; }
.social-popover-header {
    padding: 10px 15px;
    background: var(--accent-dim);
    color: var(--text-white);
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.social-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
}
.social-popover-grid {
    padding: 15px;
    max-height: 350px;
    overflow-y: auto;
}
.social-category-section  { margin-bottom: 20px; }
.social-category-title {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 800;
}
.social-items-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.social-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all var(--transition);
    height: 100px;
}
.social-item-card:hover:not(.disabled) {
    background: var(--accent-dim);
    border-color: var(--accent);
}
.social-item-card.disabled {
    opacity: 0.4;
    filter: grayscale(100%);
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.02);
}
.social-item-name {
    font-size: 0.6rem;
    color: #eee;
    text-align: center;
    line-height: 1.1;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.social-item-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.4));
}
.social-item-price {
    font-size: 0.65rem;
    color: var(--color-gold-text);
    font-weight: bold;
}
.social-detail-modal {
    background: #15151a;
    width: 280px;
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--accent);
    text-align: center;
    box-shadow: 0 0 25px var(--accent-dim);
}
.social-detail-modal--bar {
    border-color: var(--color-gold);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
}
.social-modal-desc--cortesia {
    color: var(--text-main);
    text-transform: uppercase;
}
.social-modal-img {
    width: 60px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}
.social-modal-title { color: var(--text-white); margin-bottom: 2px; font-size: 1.2rem; }
.social-modal-desc {
    color: var(--text-main);
    font-size: 0.8rem;
    margin-bottom: 15px;
    line-height: 1.4;
}
.social-modal-price {
    color: var(--color-gold-text);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
}
.social-target-input,
.social-target-select {
    width: 90%;
    padding: 8px 10px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: white;
    text-align: center;
    font-family: inherit;
    outline: none;
}
.social-target-select {
    padding: 10px;
    background: #000;
    font-size: 1rem;
    cursor: pointer;
}
.social-target-input::placeholder { color: #888; }
.bar-opt-todos { font-weight: bold; color: var(--color-gold-text); }
.social-modal-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}
.social-btn-close,
.social-btn-buy {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
    min-width: 90px;
}
.social-btn-close        { background: #25252b; color: #999; }
.social-btn-close:hover  { background: #32323a; color: var(--text-white); }
.social-btn-buy          { background: var(--accent); color: white; }
.social-btn-buy:hover    { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 0 10px var(--accent-glow); }
.social-btn-buy--bar        { background: var(--color-gold); color: #000; }
.option--todos {
    font-weight: bold;
    color: var(--color-gold-text);
}
.gift-coins { color: var(--color-gold-text); }
.gift-animation-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.5s ease;
}
.gift-animation-overlay.fade-out { opacity: 0; }
.gift-banner {
    background: rgba(17, 17, 21, 0.95);
    border: 2px solid var(--color-gold);
    padding: 15px 30px;
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.3);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.gift-sender,
.gift-target { color: var(--color-gold); font-weight: bold; }
.gift-name   { color: #4deeea; font-weight: bold; }
.gift-image {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.4));
    animation: floatItem 3s ease-in-out infinite, popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes floatItem {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-15px); }
}
.book-modal-overlay { background: rgba(0, 0, 0, 0.85); }
.book-container {
    width: 750px;
    height: 500px;
    background: #111115;
    border: 2px solid var(--color-gold);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-heavy);
    display: flex;
    position: relative;
    overflow: hidden;
}
.book-container::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
        rgba(212, 175, 55, 0),
        rgba(212, 175, 55, 0.5),
        rgba(212, 175, 55, 0));
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.book-page-left {
    width: 30%;
    background: #15151a;
    padding: 20px 0;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
}
.book-title {
    color: var(--color-gold);
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
}
.book-category-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-slow);
    border-left: 3px solid transparent;
}
.book-category-btn:hover  { color: var(--text-white); background: rgba(255, 255, 255, 0.03); }
.book-category-btn.active { color: var(--color-gold); border-left-color: var(--color-gold); background: rgba(212, 175, 55, 0.05); font-weight: bold; }
.book-page-right {
    width: 70%;
    padding: 25px;
    overflow-y: auto;
    position: relative;
}
.book-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
}
.book-close-btn:hover { color: #ff3333; }
.book-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.book-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all var(--transition);
}
.book-item:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--color-gold);
    transform: translateY(-2px);
}
.book-item img     { width: 45px; height: 45px; object-fit: contain; }
.book-item-info    { display: flex; flex-direction: column; }
.book-item-name    { color: #eee; font-size: 0.9rem; font-weight: bold; }
.book-item-desc    { color: #888; font-size: 0.7rem; margin-top: 3px; line-height: 1.2; }
.book-subcategory-section { margin-bottom: 25px; }
.book-subcategory-title {
    color: var(--color-gold);
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 5px;
    margin-bottom: 15px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Georgia', serif;
}
#pv-alerts-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}
.pv-toast {
    background: #1a1a1c;
    color: var(--text-white);
    width: 260px;
    padding: 15px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border-left: 4px solid var(--accent);
    border: 1px solid var(--border);
    pointer-events: auto;
    position: relative;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pv-toast h4        { margin: 0 0 5px; font-size: 14px; color: var(--accent); font-weight: bold; }
.pv-toast p         { margin: 0 0 12px; font-size: 13px; color: #b0b0b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-toast .close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: color var(--transition);
    background: none;
    border: none;
}
.pv-toast .close-btn:hover { color: var(--accent); }
.pv-toast .go-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background var(--transition-slow), transform 0.1s;
}
.pv-toast .go-btn:hover  { background: var(--accent-hover); box-shadow: 0 0 10px var(--accent-glow); }
.pv-toast .go-btn:active { transform: scale(0.96); }
@keyframes slideIn {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
#bday-overlay {
    position: fixed;
    inset: 0;
    background: rgba(21, 21, 28, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}
#bday-overlay.show { opacity: 1; }
.bday-content {
    text-align: center;
    z-index: 10;
    transform: scale(0.5);
    animation: bounceInBday 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.bday-cake   { font-size: 100px; margin-bottom: 10px; filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
.bday-title  { color: var(--text-white); font-size: 2rem; font-family: 'Segoe UI', sans-serif; margin: 0; }
.bday-nick {
    display: block;
    color: var(--accent);
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-dim);
    margin-top: 5px;
}
.bday-hint { margin-top: 20px; color: #888; font-size: 0.9rem; animation: pulse 2s infinite; }
.bday-balloon {
    position: absolute;
    bottom: -150px;
    width: 60px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #ff7eb3, var(--accent));
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    animation: floatUp 8s linear infinite;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.2), 0 0 15px var(--accent-glow);
}
.bday-balloon::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.4);
}
.bday-confetti {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 20px;
    animation: floatDown 5s linear infinite;
}
@keyframes bounceInBday {
    0%   { transform: scale(0.5); opacity: 0; }
    80%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes floatUp {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-120vh) rotate(15deg); opacity: 0; }
}
@keyframes floatDown {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1; }
}
.ayuda-dropdown-menu {
    position: fixed;
    background: #1a1a24;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 0, 127, 0.15);
    padding: 8px 0;
    width: 220px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition), transform var(--transition);
}
.ayuda-dropdown-menu.show { opacity: 1; transform: translateY(0); }
.ayuda-dropdown-item {
    padding: 10px 20px;
    color: #d1d1d1;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background var(--transition), color var(--transition);
}
.ayuda-dropdown-item:hover {
    background: var(--accent-dim);
    color: var(--accent);
}
.ayuda-dropdown-divider {
    height: 1px;
    background: var(--border-accent);
    margin: 6px 0;
}
.ayuda-item--temas {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    pointer-events: none;
}
.ayuda-item--temas .theme-picker {
    pointer-events: all;
}
.ayuda-item--temas i {
    color: var(--text-dim);
    flex-shrink: 0;
}
.ayuda-item--switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.ayuda-item--switch span {
    flex: 1;
}
.toggle-switch {
    width: 36px;
    height: 20px;
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    position: relative;
    transition: background var(--transition);
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-dim);
    top: 2px;
    left: 2px;
    transition: transform var(--transition), background var(--transition);
}
.toggle-switch.active {
    background: var(--accent);
    border-color: var(--accent);
}
.toggle-switch.active::after {
    transform: translateX(16px);
    background: #fff;
}
.list-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    width: 90%;
    max-width: 700px;
    max-height: 80dvh;
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}
.list-header {
    background: var(--bg-panel);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    color: var(--text-white);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.list-header i { color: var(--accent); margin-right: 8px; }
.list-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-panel);
    flex-shrink: 0;
}
.list-search-bar i { color: var(--text-dim); }
.list-search-bar input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-white);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}
.list-search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}
.list-stats {
    padding: 8px 20px;
    font-size: 0.75rem;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.list-loading-msg {
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.list-table-wrapper {
    flex: 1;
    overflow-y: auto;
}
.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.list-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-panel);
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.list-row {
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}
.list-row:hover { background: var(--accent-dim); }
.list-row td { padding: 10px 20px; vertical-align: middle; }
.list-channel {
    color: var(--accent);
    font-weight: 700;
    white-space: nowrap;
}
.list-channel i { margin-right: 6px; font-size: 0.75rem; }
.list-users {
    color: var(--text-dim);
    white-space: nowrap;
    font-size: 0.8rem;
}
.list-users i { margin-right: 4px; }
.list-topic {
    color: var(--text-main);
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-no-topic { color: var(--text-muted); font-style: italic; }
@keyframes popIn {
    0%   { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}
.login-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: all 0.5s ease;
}
.login-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: 25px 30px;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}
.login-header        { text-align: center; margin-bottom: 20px; }
.login-title-wrapper { display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-radio-icon { font-size: 2rem; color: var(--accent); }
.login-title      { color: var(--text-white); margin: 0; font-size: 1.6rem; letter-spacing: -1px; }
.login-subtitle   { color: #88889b; font-size: 0.85rem; margin-top: 5px; }
.login-input-group    { margin-bottom: 12px; position: relative; }
.login-label {
    display: block;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.login-input {
    width: 100%;
    background: #0a0a0f;
    border: 1px solid var(--border-subtle);
    padding: 10px 15px;
    border-radius: 10px;
    color: var(--text-white);
    outline: none;
    transition: var(--transition-slow);
    font-size: 0.95rem;
}
.login-input:focus { border-color: var(--accent); background: #0d0d14; }
.login-password-container { position: relative; display: flex; align-items: center; }
.login-eye-icon {
    position: absolute;
    right: 15px;
    color: #555;
    cursor: pointer;
    font-size: 1rem;
    z-index: 5;
    transition: var(--transition);
}
.login-eye-icon:hover { color: var(--accent); }
.login-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    color: #ccc;
    font-size: 0.85rem;
}
.login-checkbox-wrapper label {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.login-checkbox-wrapper input {
    cursor: pointer;
    accent-color: var(--accent);
    transform: scale(1.1);
    margin: 0;
}
.login-button {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}
.login-hidden { display: none !important; }
.games-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.games-overlay.hidden { display: none; }
.games-modal {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 400px;
    max-width: 93vw;
    max-height: 82dvh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    animation: slideUp 0.2s ease;
}
.games-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--bg-header);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}
.games-modal-header i {
    color: var(--accent);
    margin-right: 8px;
}
.games-close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color var(--transition);
}
.games-close-btn:hover { color: var(--text-main); }
.games-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.games-section:last-child { border-bottom: none; }
.games-section-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
}
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.game-card {
    background: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}
.game-card:not(.game-card--soon):hover {
    border-color: var(--border-accent);
    background: var(--accent-dim);
}
.game-card:not(.game-card--soon):hover .game-card-name {
    color: var(--accent);
}
.game-card--soon {
    opacity: 0.38;
    cursor: not-allowed;
}
.game-card--soon:hover {
    border-color: transparent;
    background: var(--bg-elevated);
}
.game-card-icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.game-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
    transition: color var(--transition);
}
.game-soon-tag,
.game-new-tag,
.game-card-cost {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
    line-height: 1.6;
}
.game-soon-tag {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.07);
}
.game-new-tag {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--border-accent);
    box-shadow: 0 0 8px var(--accent-glow);
}
.game-card-cost {
    color: var(--color-gold-text);
    background: rgba(255,215,0,0.07);
    border: 1px solid rgba(255,215,0,0.18);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.65rem;
}
.game-card-cost.infinite {
    color: var(--color-purple);
    background: rgba(129,140,248,0.08);
    border-color: rgba(129,140,248,0.2);
    font-size: 0.58rem;
    letter-spacing: 0;
    padding: 2px 7px;
    line-height: 1.6;
}
.game-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(860px, 92vw);
    height: min(600px, 85vh);
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
    z-index: 1900;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.2s ease;
}
.game-window.hidden {
    display: none;
}
.game-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}
.game-window-header:active {
    cursor: grabbing;
}
.game-window-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.game-window-title i {
    color: var(--accent);
}
.game-window-controls {
    display: flex;
    gap: 6px;
}
.game-ctrl-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all var(--transition);
    background: var(--bg-elevated);
    color: var(--text-dim);
}
.game-ctrl-btn:hover {
    background: var(--accent-dim);
    color: var(--accent);
}
.game-ctrl-btn--close:hover {
    background: rgba(248,113,113,0.2);
    color: var(--color-danger);
}
.game-window-body {
    flex: 1;
    overflow: hidden;
    display: flex;
}
.game-window-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}
.game-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: grab;
    box-shadow: 0 4px 20px var(--accent-glow);
    z-index: 1950;
    transition: transform var(--transition), box-shadow var(--transition);
    user-select: none;
}
.game-fab:active {
    cursor: grabbing;
}
.game-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px var(--accent-glow);
}
.game-fab.hidden {
    display: none;
}
@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1);    }
}
.game-invite-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: #111;
    border: 1px solid #2a2a2a;
    border-left: 3px solid var(--accent, #ff007f);
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 4px;
    max-width: 300px;
}
.game-invite-icon { font-size: 1.3rem; }
.game-invite-text { font-size: 0.88rem; color: #ccc; }
.game-invite-bet  { font-size: 0.8rem; color: #ffd700; }
.game-invite-btn  {
    background: var(--accent, #ff007f);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 4px;
}
.game-invite-btn:hover    { opacity: 0.8; }
.game-invite-waiting      { font-size: 0.8rem; color: #555; font-style: italic; }
.modern-alert-btn.cancel {
    background: #222;
    color: #aaa;
    border: 1px solid #333;
}
.modern-alert-btn.cancel:hover { background: #2a2a2a; }
.panel-dj-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.panel-dj-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    max-height: 80dvh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.panel-dj-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-panel);
    flex-shrink: 0;
}
.panel-dj-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text-white);
    font-size: 1rem;
}
.panel-dj-title i { color: var(--accent); }
.panel-dj-refresh,
.panel-dj-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.panel-dj-refresh:hover { color: var(--accent); }
.panel-dj-close:hover   { color: var(--color-danger); }
.panel-dj-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-panel);
}
.panel-dj-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 10px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-bottom: 2px solid transparent;
    position: relative;
}
.panel-dj-tab:hover { color: var(--text-main); }
.panel-dj-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.panel-dj-badge {
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: var(--radius-pill);
    min-width: 16px;
    text-align: center;
}
.panel-dj-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.panel-dj-empty,
.panel-dj-loading {
    text-align: center;
    color: var(--text-dim);
    padding: 40px 20px;
    font-size: 0.9rem;
}
.panel-dj-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    transition: var(--transition);
}
.panel-dj-item:hover { border-color: var(--border-subtle); }
.panel-dj-item--read {
    opacity: 0.5;
}
.panel-dj-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.panel-dj-nick {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.85rem;
}
.panel-dj-time {
    color: var(--text-muted);
    font-size: 0.7rem;
}
.panel-dj-msg {
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.4;
    word-break: break-word;
}
.panel-dj-found {
    margin-top: 6px;
    color: var(--color-success);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
@media (max-width: 850px) {
	.app-container {
        height: 100dvh;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
    }
    .global-header {
		padding: 0 10px;
        position: sticky;
        top: 0;
        z-index: 1100;
        flex-shrink: 0;
    }
    .header-left-group,
    .header-right-group {
        width: 45px !important;
        flex: 0 0 45px !important;
    }
    .header-center-group {
        flex: 1;
        min-width: 0;
        padding: 0 10px;
        display: flex;
        justify-content: center;
        overflow: hidden;
    }
    .buffer-info {
        width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .buffer-info h2 {
        font-size: 0.95rem;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .topic-container {
        font-size: 0.7rem;
        gap: 4px;
        width: 100%;
        max-width: 100%;
        display: block;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .topic-container span { display: inline; }
    .sidebar-left,
    .sidebar-right {
        position: fixed;
        top: var(--header-h);
        bottom: 0;
        height: calc(100dvh - var(--header-h));
        width: 280px !important;
        z-index: 2000;
        opacity: 1 !important;
    }
    .sidebar-left  { left: 0;  transform: translateX(-100%); }
    .sidebar-right { right: 0; transform: translateX(100%); }
    .sidebar-left:not(.hidden)  { transform: translateX(0); }
    .sidebar-right:not(.hidden) { transform: translateX(0); }
	.chat-viewport {
		padding: 10px;
        overscroll-behavior: none;
        overflow-anchor: none;
    }
    .chat-input-zone  { padding: 12px; }
    .main-layout      { display: block; overflow: hidden; height: 100%; }
    .scroll-alert { bottom: 80px; padding: 8px 16px; }
    .book-container {
        flex-direction: column;
        width: 95%;
        height: 85dvh;
    }
    .book-container::after { display: none; }
    .book-page-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #222;
        flex-direction: row;
        padding: 10px;
        overflow-x: auto;
        align-items: center;
    }
    .book-title          { margin-bottom: 0; margin-right: 15px; font-size: 1rem; white-space: nowrap; }
    .book-category-btn   { padding: 8px 15px; border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
    .book-category-btn.active { border-left: none; border-bottom: 3px solid var(--color-gold); }
    .book-page-right { width: 100%; height: 100%; padding: 15px; }
    .book-items-grid { grid-template-columns: 1fr; }
	#emojmov-dynamic-container { display: none; }
    #btn-sticker-mobile { display: flex; }
	#btn-sticker-mobile.active { color: var(--accent); }
	.panel-dj-overlay { padding: 0; align-items: flex-end; }
    .panel-dj-card {
        max-width: 100%;
        max-height: 75dvh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
}
@media (max-width: 400px) {
    .games-modal {
        max-width: 98vw;
        max-height: 90dvh;
    }
    .games-section {
        padding: 10px 12px;
    }
    .game-card {
        padding: 8px 10px;
        gap: 8px;
    }
    .game-card-name {
        font-size: 0.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .game-card-icon {
        font-size: 1.1rem;
        width: 22px;
    }
}
/* ═══════════════════════════════════════════════════════
   OPTIMIZACIONES MÓVIL: eliminar backdrop-filter en
   dispositivos con pantallas pequeñas para reducir
   consumo de GPU y recalentamiento.
   ═══════════════════════════════════════════════════════ */
@media (max-width: 850px) {
    .sidebar-overlay {
        backdrop-filter: none;
    }
    #context-menu {
        backdrop-filter: none;
        background: rgba(13, 13, 18, 0.98);
    }
    .social-modal-overlay,
    .book-modal-overlay {
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.92);
    }
    .listban-modal-overlay {
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.92);
    }
    #modern-alert-overlay {
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.88);
    }
    .social-popover {
        backdrop-filter: none;
        background: rgba(15, 15, 20, 0.98);
    }
    #bday-overlay {
        backdrop-filter: none;
        background: rgba(21, 21, 28, 0.94);
    }
    .login-overlay {
        backdrop-filter: none;
        background: var(--bg-overlay);
    }
    .panel-dj-overlay {
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.82);
    }
}

/* ── RENDIMIENTO MÓVIL: backdrop-filter desactivado en pantallas pequeñas ── */
@media (max-width: 850px) {
    .modal-overlay,
    .listban-modal,
    .book-modal-overlay,
    .panel-dj-overlay,
    .social-modal-overlay,
    .gift-animation-overlay,
    .games-modal-overlay,
    #ayuda-dropdown,
    .whois-modal,
    .game-window {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    /* Compensar con fondo semiopaco para mantener legibilidad */
    .modal-overlay { background: rgba(0,0,0,0.88) !important; }
    .book-modal-overlay { background: rgba(0,0,0,0.88) !important; }
    .panel-dj-overlay { background: rgba(0,0,0,0.88) !important; }
    .social-modal-overlay { background: rgba(0,0,0,0.88) !important; }
}

/* ── REDUCIR ANIMACIONES COSTOSAS EN MÓVIL ── */
@media (max-width: 850px) {
    .bday-confetti:nth-child(n+26) { display: none !important; }
    .bday-balloon:nth-child(n+9) { display: none !important; }
    /* Desactivar filter costosos en móvil */
    .drop-shadow-glow,
    [style*="filter: drop-shadow"] { filter: none !important; }
}

/* ── GPU hints para elementos animados ── */
.scroll-alert,
.modal-overlay,
.games-overlay,
.book-modal-overlay,
.social-modal-overlay {
    will-change: transform, opacity;
}
/* Liberar will-change cuando el elemento no es visible */
.scroll-alert:not(.visible),
.modal-overlay:not(.show),
.games-overlay:not(.show) {
    will-change: auto;
}
