:root {
    /* Soft Pink Hub Palette */
    --side-bg: #fff5f7;
    --chat-bg: #ffffff;
    --member-bg: #fff5f7;
    --header-bg: #ffffff;
    --text-primary: #111111;
    /* Darkened from #4a4a4a for better readability */
    --text-muted: #555555;
    /* Darkened from #888888 */
    --accent: #ff69b4;
    --accent-hover: #ff1493;
    --border-color: rgba(255, 105, 180, 0.2);
    /* Slightly more visible */
}

.anticode-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: var(--chat-bg);
    color: var(--text-primary);
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    /* Increased from default to prevent "faint" look */
    background-image: radial-gradient(var(--accent-hover) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
}

#anticode-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport for mobile keyboards */
    width: 100vw;
}

/* Sidebar: Channels */
.anticode-sidebar {
    width: 240px;
    background-color: var(--side-bg);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.sidebar-header {
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.sidebar-header h2:hover {
    opacity: 0.7;
}

.sidebar-close-btn {
    display: none;
}

.channel-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
}

.channel-page-bar {
    display: flex;
    gap: 8px;
    padding: 6px 8px 10px 8px;
    align-items: center;
}

.channel-page-select {
    flex: 1;
    min-width: 0;
    background: #fff;
    /* High contrast background */
    color: #111;
    /* High contrast text */
    border: 1px solid var(--accent-soft);
    border-radius: 8px;
    /* Slightly more rounded */
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 800;
    /* Bolder text */
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.draggable-item {
    cursor: grab;
}

.draggable-item.dragging {
    opacity: 0.5;
}

.drag-handle {
    color: var(--text-muted);
    margin-right: 8px;
    user-select: none;
}

.channel-group {
    margin-bottom: 20px;
}

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 8px;
    margin-bottom: 4px;
}

.group-label {
    font-size: 0.85rem;
    /* Increased from 0.75rem */
    font-weight: 800;
    /* Bolder */
    color: var(--text-muted);
    text-transform: uppercase;
    padding-left: 8px;
}

.add-channel-btn {
    background: var(--accent);
    border: none;
    color: #fff;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s;
    margin-left: auto;
}

.add-channel-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

#channel-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

/* Global Channel Item Styles */
.channel-group-item {
    margin: 4px 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
}

.channel-group-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.05);
}

.channel-group-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.08);
}

.channel-group-item.active {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.channel-group-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 4px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.channel-sub-group-label {
    font-size: 0.85rem;
    /* Increased from 0.68rem */
    color: var(--text-primary);
    /* Darker than text-muted */
    font-weight: 800;
    /* Bolder */
    margin: 14px 10px 6px 14px;
    opacity: 1;
    /* Removed transparency */
    letter-spacing: 0.02rem;
    text-transform: uppercase;
}

.channel-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.channel-name-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.channel-voice-indicator {
    font-size: 0.95rem;
    line-height: 1;
    opacity: 0.75;
    transition: 0.2s;
    user-select: none;
}

.channel-voice-indicator.on {
    opacity: 1;
    color: var(--accent);
}

.channel-voice-indicator.off {
    opacity: 0.3;
}

.channel-name-label {
    font-size: 0.95rem;
    /* Increased from 0.9rem */
    color: var(--text-primary);
    /* Much darker than text-muted */
    font-weight: 900;
    /* Max boldness */
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.delete-channel-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.2s ease;
    opacity: 0.4;
    /* Increased from 0.2 */
}

.edit-channel-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    font-size: 1.0rem;
    line-height: 1;
    transition: all 0.2s ease;
    opacity: 0.2;
    /* Slightly visible to owners */
}

/* Sub-link (Category) styling */
.channel-sub-link {
    padding: 2px 8px 6px 24px;
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.sub-link-icon {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.channel-group-item:hover .edit-channel-btn {
    opacity: 0.8;
}

.edit-channel-btn:hover {
    color: var(--accent) !important;
    transform: scale(1.15);
    opacity: 1 !important;
}

.channel-group-item:hover .delete-channel-btn {
    opacity: 1;
    /* Increased from 0.6 */
    color: #ff4d4d;
}

.delete-channel-btn:hover {
    transform: scale(1.2);
    color: #ff1a1a;
}

/* Notification Toggle Buttons in AntiCode */
.notif-toggle-btn {
    background: #fff;
    border: 1px solid var(--accent-soft);
    color: var(--text-primary);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.notif-toggle-btn:hover {
    border-color: var(--accent);
    background: var(--side-bg);
}

/* Settings modal readability: add spacing + divider between groups */
.setting-item-group+.setting-item-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mic-meter {
    flex: 1;
    min-width: 160px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    overflow: hidden;
}

.mic-meter-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.4), rgba(0, 242, 255, 0.9));
    transition: width 0.08s linear;
}

.inapp-notif-toast {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: min(520px, calc(100vw - 24px));
    width: max-content;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(10, 12, 18, 0.92);
    border: 1px solid rgba(0, 242, 255, 0.22);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
}

.inapp-notif-toast .toast-title {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}

.inapp-notif-toast .toast-body {
    font-size: 0.82rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.notif-toggle-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--accent);
}

.notif-toggle-btn.on {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.3);
}

.sidebar-settings {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 10;
}

.settings-cog-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-family: serif;
    /* More reliable for emojis in some browsers */
}

.settings-cog-btn:hover {
    color: var(--accent);
    background: rgba(0, 242, 255, 0.1);
    transform: rotate(45deg);
}

.sidebar-notif-btn {
    width: 100%;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.7rem;
}

.channel-item {
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
    font-weight: 500;
}

.channel-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.channel-item.active {
    background-color: rgba(0, 242, 255, 0.1);
    color: var(--accent);
}

/* Emoji Picker */
.emoji-trigger-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 10px 0 0;
    transition: 0.2s;
}

.emoji-trigger-btn:hover {
    transform: scale(1.2);
}

#voice-toggle-btn.on {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.35);
}

.emoji-picker-popover {
    position: absolute;
    bottom: 50px;
    left: 10px;
    background: #2b2d31;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.emoji-item {
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* User Profile Section */
.user-profile-section {
    padding: 15px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    border-left: 0px solid var(--accent);
}

.user-profile-section:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 20px rgba(255, 105, 180, 0.05);
    border-radius: 8px;
}

.user-profile-section:active {
    transform: translateY(1px);
    background: rgba(255, 255, 255, 0.06);
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--accent);
}

.uid-badge {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
}

.uid-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uid-copy-btn:hover {
    background: var(--accent);
    color: #000;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Friend List Styling */
.friend-item {
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.2s;
    margin: 4px 8px;
}

.delete-friend-btn,
.invite-friend-btn {
    margin-left: auto;
    background: var(--accent-soft);
    border: none;
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 900;
}

.delete-friend-btn {
    background: #ffcdd2;
    color: #c62828;
}

.delete-friend-btn:hover {
    background: #ef9a9a;
}

.invite-friend-btn:hover {
    background: var(--accent);
}

.friend-item:hover {
    background-color: var(--accent-soft);
}

.avatar-sm-container {
    position: relative;
    flex-shrink: 0;
}

/* Owned Channels Management List */
.owned-channels-container {
    max-height: 150px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px;
    margin-top: 5px;
}

.owned-channel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.owned-channel-item:last-child {
    border-bottom: none;
}

.owned-channel-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.owned-channel-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.owned-channel-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-main);
}

.owned-channel-type {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.owned-channel-delete-btn {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.2);
    color: #ff4d4d;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.owned-channel-delete-btn:hover {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--sidebar-bg);
}

.friend-item.online .status-indicator {
    background-color: #23a559;
}

.friend-item.offline .status-indicator {
    background-color: #80848e;
}

.friend-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.friend-nickname {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-nickname small {
    font-weight: 400;
    opacity: 0.6;
}

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

.view-all-friends {
    padding: 6px 12px;
    font-size: 0.75rem;
    color: var(--accent);
    cursor: pointer;
    text-align: center;
    font-weight: bold;
}

.view-all-friends:hover {
    text-decoration: underline;
}

.delete-channel-btn {
    background: transparent;
    border: 1px solid #da373c;
    color: #da373c;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 10px;
}

.delete-channel-btn:hover {
    background: #da373c;
    color: #fff;
}

.user-info-section {
    height: 52px;
    background-color: #232428;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main: Chat Area */
.anticode-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--chat-bg);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Chat Date Separator - Sticky Header */
.chat-date-separator {
    position: sticky;
    top: 10px;
    z-index: 100;
    text-align: center;
    pointer-events: none;
    /* Let clicks pass through to messages underneath */
    margin: 20px 0;
    transition: opacity 0.3s;
}

/* Add a subtle glow/backdrop for readability when scrolling over messages */
.chat-date-separator span {
    background: rgba(255, 255, 255, 0.85);
    /* Semi-transparent white background */
    backdrop-filter: blur(4px);
    padding: 2px 12px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Slight shadow to separate from chat */
}

.chat-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.chat-header h1 {
    font-size: 1rem;
    margin: 0;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 4px 8px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    transition: 0.3s;
    background: rgba(0, 242, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-link:hover {
    background: rgba(0, 242, 255, 0.15);
    transform: scale(1.1);
}

.message-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-welcome {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.chat-welcome h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--accent);
}

.chat-welcome p {
    color: var(--text-muted);
}

/* Chat Input */
.chat-input-container {
    padding: 0 16px 24px 16px;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
    background-color: var(--chat-bg);
    position: relative;
    z-index: 100;
}

.input-wrapper {
    background-color: #fce4ec;
    /* Very light pink background for input */
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    position: relative;
    border: 1px solid rgba(255, 105, 180, 0.1);
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    outline: none;
    max-height: 50vh;
}

.input-actions button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 10px rgba(255, 105, 180, 0.3);
}

.input-actions button:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.5);
}

/* Message Item */
.message-item {
    display: flex;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    width: 450px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: 60px;
    /* Prevent button cutoff on mobile */
}

input[type="text"],
input[type="password"],
textarea {
    background: #fdf2f4;
    border: 1px solid var(--accent-soft);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-family: inherit;
    transition: 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

.modal-content h2 {
    margin-top: 0;
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--accent-soft);
    padding: 10px;
    color: var(--text-primary);
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.submit-btn {
    background-color: var(--accent);
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
}

.cancel-btn {
    background-color: transparent;
    color: var(--text-primary);
    border: none;
    padding: 10px 16px;
    cursor: pointer;
}

.cancel-btn:hover {
    text-decoration: underline;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #000;
    flex-shrink: 0;
}

.message-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.message-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    position: relative;
}

.delete-msg-btn {
    background: #fdf2f4;
    border: 1px solid var(--accent-light, #fce4ec);
    color: var(--accent-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.delete-msg-btn:hover {
    background: var(--accent-main);
    color: #fff;
    border-color: var(--accent-main);
}

.member-name {
    font-weight: 800;
    /* Bolder */
    font-size: 1.05rem;
    /* Increased from default */
    color: var(--accent);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.timestamp {
    font-size: 0.85rem;
    /* Increased from 0.75rem */
    color: var(--text-muted);
    font-weight: 600;
    /* Darkened/Bolder */
    white-space: nowrap;
    flex-shrink: 0;
}

.message-text {
    line-height: 1.5;
    word-break: break-word;
    color: var(--text-primary);
    font-size: 1.1rem;
    /* Increased from default */
    font-weight: 500;
}

.message-image-content {
    margin-top: 8px;
    max-width: min(100%, 400px);
    width: fit-content;
}

.yt-preview {
    margin-top: 8px;
    max-width: min(100%, 400px);
    width: fit-content;
}

.yt-thumb {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: 0.2s;
    display: block;
}

.yt-thumb:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.chat-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: 0.2s;
    display: block;
}

.chat-img:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

/* Right: Members List */
.anticode-members {
    width: 240px;
    background-color: var(--member-bg);
    display: flex;
    flex-direction: column;
}

.members-header {
    padding: 16px 12px 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.members-toggle-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    transition: transform 0.3s ease;
    display: none;
    /* Only show on mobile if needed, or always for consistency */
}

@media (max-width: 1024px) {
    .members-toggle-btn {
        display: block;
    }

    .anticode-members.collapsed {
        height: 45px !important;
        overflow: hidden;
    }

    .anticode-members.collapsed .members-toggle-btn {
        transform: rotate(-90deg);
    }
}

.member-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reduced gap */
    padding: 4px 8px;
    /* Reduced padding */
    border-radius: 4px;
    /* Slightly sharper corners */
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    min-width: 0;
}

.member-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.avatar-wrapper .avatar-sm {
    width: 24px !important;
    /* Force smaller size */
    height: 24px !important;
    font-size: 0.6rem !important;
}

.online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    background: #23a559;
    border-radius: 50%;
    border: 1.5px solid var(--member-bg);
}

.member-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
    flex: 1;
    overflow: hidden;
}

.member-name-text {
    font-size: 0.75rem;
    /* Smaller font */
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-badge {
    color: var(--accent);
    font-size: 0.65rem;
    margin-left: 4px;
    vertical-align: middle;
}

.member-status-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
}

/* Actions area for member cards (prevents layout break with many buttons) */
.member-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* Friend modal often has multiple actions; make buttons slightly denser */
#friend-modal .member-actions .notif-toggle-btn {
    padding: 6px 10px;
    font-size: 0.72rem;
}

/* Friend modal can be wider so names/status don't get crushed */
#friend-modal .modal-content {
    width: min(720px, 96vw);
}

.member-card.offline {
    opacity: 0.6;
}

.member-card.offline .avatar-sm {
    filter: grayscale(1);
}

/* Auth Guard */
.auth-guard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.guard-content {
    background: #2b2d31;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--accent);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

.guard-content h2 {
    color: var(--accent);
    margin-bottom: 16px;
}

.guard-content button {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 900;
    cursor: pointer;
    margin-top: 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #1a1b1e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #121214;
}

/* Mobile Specific Styles & Media Queries */
.mobile-only-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 10px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .mobile-only-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 36px !important;
        min-height: 36px !important;
        padding: 0 !important;
        margin: 0 4px !important;
        color: var(--accent) !important;
        background: rgba(0, 242, 255, 0.1) !important;
        border: 1px solid var(--accent) !important;
        border-radius: 4px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        z-index: 1000 !important;
    }


    #anticode-container {
        position: relative;
        overflow: hidden;
    }

    /* Sidebars as absolute drawers */
    .anticode-sidebar,
    .anticode-members {
        position: absolute;
        top: 0;
        bottom: 0;
        z-index: 3000;
        /* Higher than chat header */
        width: 280px;
        height: 100%;
        transition: left 0.3s ease, right 0.3s ease;
        /* Combined transition */
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    }

    .anticode-sidebar {
        left: -100%;
    }

    .anticode-sidebar.open {
        left: 0;
    }

    .sidebar-close-btn {
        display: flex !important;
        background: rgba(0, 242, 255, 0.1);
        border: 1px solid var(--accent);
        color: var(--accent);
        width: 36px;
        height: 36px;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        cursor: pointer;
        margin-right: 12px;
        transition: all 0.2s ease;
        text-shadow: 0 0 10px var(--accent);
        box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
    }

    .sidebar-close-btn:active {
        transform: scale(0.9);
        background: var(--accent);
        color: #000;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        padding: 15px;
    }

    .sidebar-header h2 {
        margin: 0;
        font-size: 1.2rem;
    }

    .anticode-members {
        position: absolute;
        right: -100%;
        top: 0;
        z-index: 3000;
        /* Increased from 1000 */
        width: 280px;
        height: 100%;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .anticode-members.open {
        right: 0;
    }

    /* Adjust main content */
    .anticode-chat-area {
        flex: 1;
        min-height: 0;
        /* Important for flex child overflow */
    }

    /* Header adjustments */
    .chat-header {
        padding: 0 10px;
        padding-top: env(safe-area-inset-top, 0);
        height: auto;
        min-height: 48px;
        display: flex !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .header-left {
        flex: 1 !important;
        min-width: 0 !important;
        /* Allows shrinking for ellipsis */
        display: flex !important;
        align-items: center !important;
    }

    .header-right {
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .header-title-group {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
    }

    #current-channel-name {
        font-size: 0.9rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .header-category-label {
        font-size: 0.65rem;
        color: var(--accent);
        opacity: 0.8;
    }

    /* Sidebar Interaction Refactor - Cleaned Up */
    .channel-group-item {
        margin: 4px 0;
        padding: 8px 12px;
        cursor: pointer;
        border-radius: 6px;
        transition: background 0.2s;
    }

    .channel-group-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .channel-name-label {
        font-size: 0.9rem;
        color: var(--text-muted);
        /* Or primary? user surely wants to see it clearly */
        color: var(--text-primary);
        font-weight: 600;
        margin-bottom: 0;
        pointer-events: none;
    }

    /* Deleted channel-sub-link styles */

    .channel-name-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .delete-channel-btn {
        background: transparent;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        padding: 0 4px;
        font-size: 1.2rem;
        line-height: 1;
        transition: 0.2s;
        opacity: 0.5;
        font-family: Arial, sans-serif;
    }

    .delete-channel-btn:hover {
        color: #ff4747;
        transform: scale(1.1);
        opacity: 1;
    }

    .sub-link-icon {
        font-size: 0.85rem;
    }

    /* Dropdown danger item */
    .menu-item-danger {
        color: #ff4d4d !important;
        font-weight: bold !important;
    }

    /* Chat welcome smaller */
    .chat-welcome h1 {
        font-size: 1.5rem;
    }

    /* Back link smaller for space */
    .back-link {
        font-size: 1.2rem;
        padding: 4px 10px;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 40px;
        height: 38px;
        border-width: 2px;
    }

    /* Chat message padding */
    .message-container {
        padding: 10px;
    }

    .message-item {
        gap: 10px;
    }

    /* Modals smaller */
    .modal-content {
        padding: 20px;
        width: 95%;
    }

    /* Fix: Modal Overlay Z-Index must be higher than sidebar (3000) */
    .modal-overlay {
        z-index: 4000;
    }

    /* Emoji Picker Z-Index */
    .emoji-picker-popover {
        z-index: 4001;
    }

    /* Toast/Notification Z-Index */
    .inapp-notif-toast {
        z-index: 5000;
    }

    /* Input padding */
    .chat-input-container {
        padding: 0 10px 30px 10px;
        /* Increased from 15px */
        margin-bottom: 35px;
        /* Increased from 20px to lift it more */
        position: relative;
        z-index: 1000;
    }

    /* Fix: Ensure header (and dropdown) is above chat input (1000) */
    .chat-header {
        position: relative;
        z-index: 2001;
    }

    /* Mobile Dropdown Menu */
    .header-right {
        position: relative;
    }

    .header-right {
        display: flex;
        gap: 0;
        align-items: center;
        margin-left: auto;
        position: relative;
        z-index: 2002;
        /* Ensure dropdown is above chat input (1000) and sidebar (2000) */
    }

    .mobile-dropdown-content {
        position: absolute;
        top: 50px;
        right: 10px;
        background-color: #ffffff;
        border: 1px solid var(--accent-light, #fce4ec);
        border-radius: 12px;
        min-width: 220px;
        box-shadow: 0 10px 25px rgba(255, 105, 180, 0.15);
        z-index: 2000;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .mobile-dropdown-content button {
        background: transparent;
        border: none;
        color: var(--text-primary);
        padding: 14px 20px;
        text-align: left;
        font-family: inherit;
        font-size: 0.95rem;
        cursor: pointer;
        transition: 0.2s;
        border-bottom: 1px solid rgba(255, 105, 180, 0.05);
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-dropdown-content button:last-child {
        border-bottom: none;
    }

    .mobile-dropdown-content button:hover {
        background-color: var(--bg-base);
        color: var(--accent);
    }
}

/* [NEW] UX Optimization: Message Editing \u0026 Avatar Fixes */
.message-item.editing-highlight {
    border: 2px solid #ff4d4d !important;
    background: rgba(255, 77, 77, 0.05) !important;
    transition: border 0.2s ease;
}

.avatar-sm,
.message-avatar {
    object-fit: cover !important;
    background: var(--accent-glow);
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-meta-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message-item:hover .message-meta-actions {
    opacity: 1;
}



/* Invitation System */
.invite-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    left: auto;
    background-color: #f23f43;
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    padding: 1px 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 0 0 2px var(--side-bg);
    cursor: pointer;
}

.invite-badge:hover {
    transform: scale(1.1);
}

.invite-dropdown {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: #111214;
    border: 1px solid var(--accent);
    border-radius: 8px;
    width: 280px;
    z-index: 999999 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    pointer-events: auto !important;
}

.invite-dropdown-header {
    background: var(--header-bg);
    padding: 12px;
    font-weight: 900;
    color: var(--accent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invite-list {
    max-height: 300px;
    overflow-y: auto;
}

.invite-item {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

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

.invite-info {
    margin-bottom: 8px;
}

.invite-channel-name {
    font-weight: bold;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.invite-sender {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.invite-actions {
    display: flex;
    gap: 8px;
}

.invite-accept-btn {
    flex: 1;
    background: #23a559;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer !important;
    font-size: 0.85rem;
    pointer-events: auto !important;
}

.invite-reject-btn {
    flex: 1;
    background: #da373c;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer !important;
    font-size: 0.85rem;
    pointer-events: auto !important;
}

/* Blocked List Modal */
.blocked-list-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
}

.blocked-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.blocked-user-item:last-child {
    border-bottom: none;
}

.blocked-user-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.blocked-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blocked-username {
    font-weight: 700;
    color: var(--accent);
}

.unblock-action-btn {
    padding: 6px 12px;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s;
}

.unblock-action-btn:hover {
    background: #ff3333;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.4);
    transform: scale(1.05);
}

/* PWA Standalone Mode Fixes */
@media all and (display-mode: standalone) {
    .anticode-body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }

    #anticode-container {
        min-height: 100vh;
        min-height: -webkit-fill-available;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .chat-area {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .chat-input-container {
        padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
        /* Increased from 24px */
        position: sticky;
        bottom: 0;
    }
}

/* Emoticon Picker & Rendering */
.emoji-picker-popover {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 340px;
    height: 400px;
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    flex-direction: column;
    overflow: hidden;
}

.emoji-picker-tabs {
    display: flex;
    background: #1e1f22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.emoji-picker-tab {
    flex: 1;
    padding: 12px 6px;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.2s;
}

.emoji-picker-tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}

.emoji-content-area {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

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

.emoticon-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.15s;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.15);
}

.emoticon-item {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.emoticon-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.emoticon-item img {
    width: 100%;
    height: 100%;
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
    display: block;
}

/* Ensure no text shows in the picker */
.emoticon-item::after {
    display: none !important;
}

.chat-emoticon {
    display: block;
    /* Stickers are blocks */
    max-width: 180px;
    /* Slightly larger */
    max-height: 180px;
    cursor: pointer;
    margin: 12px 0;
    border-radius: 8px;
    transition: transform 0.2s;
}


.chat-emoticon:hover {
    transform: scale(1.03);
}

@media (max-width: 500px) {
    .emoji-picker-popover {
        width: 90vw;
        right: 5vw;
        left: 5vw;
        height: 350px;
    }

    .emoticon-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* =============================================
   CHAT AREA WATERMARK BACKGROUND
   ============================================= */
.anticode-chat-area {
    position: relative;
    z-index: 0;
}

.anticode-chat-area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/bg_logo.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 45% auto;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}

#message-container {
    position: relative;
    z-index: 1;
}

/* =============================================
   PROFILE CARD MODAL
   ============================================= */
.profile-card-content {
    background: linear-gradient(135deg, #fff5f7 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 30px 25px;
    width: min(360px, 90vw);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.25),
        0 0 0 1px rgba(255, 105, 180, 0.15);
    text-align: center;
    animation: profileCardSlideIn 0.3s ease-out;
}

@keyframes profileCardSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.profile-card-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 105, 180, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.4rem;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.profile-card-close:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(90deg);
}

.profile-card-avatar-wrapper {
    margin: 0 auto 16px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.35);
}

.profile-card-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 3px solid #fff;
}

.profile-card-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.profile-card-uid {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.profile-card-bio-section {
    text-align: left;
    margin-bottom: 20px;
}

.profile-card-bio-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-card-bio {
    width: 100%;
    min-height: 80px;
    max-height: 150px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 105, 180, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

.profile-card-bio:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.15);
    background: #fff;
}

.profile-card-bio[readonly] {
    background: rgba(255, 245, 247, 0.6);
    cursor: default;
}

.profile-card-bio::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.profile-card-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.profile-card-actions .submit-btn {
    padding: 10px 30px;
    font-size: 0.85rem;
}

/* Shop Modal & Products */
.shop-modal-content {
    width: 600px;
    max-width: 90vw;
    background: #111214;
    border: 1px solid var(--accent);
    color: var(--text-color);
}

.shop-balance-display {
    font-size: 1rem;
    color: #ffb92f;
    font-weight: bold;
    margin-right: 20px;
    margin-left: auto;
}

.shop-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.shop-product-card {
    background: #1e1e24;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, border-color 0.2s;
}

.shop-product-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.shop-product-preview {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    height: 48px;
    overflow: hidden;
}

.shop-product-preview img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.shop-product-info {
    text-align: center;
    margin-bottom: 10px;
}

.shop-product-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--accent);
}

.shop-product-desc {
    font-size: 0.8rem;
    color: #888;
}

.shop-buy-btn {
    background: linear-gradient(135deg, #ffb92f, #ff6b6b);
    border: none;
    color: black;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.shop-buy-btn:hover {
    opacity: 0.9;
}

.shop-buy-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

.shop-owned-badge {
    background: #23a559;
    color: white;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Shop Button in Emoji Picker */
.emoji-shop-btn {
    background: transparent;
    border: none;
    color: #ffb92f;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    height: 100%;
}

.emoji-shop-btn:hover {
    background: rgba(255, 185, 47, 0.1);
    transform: scale(1.1);
}

.shop-notice {
    background: rgba(255, 185, 47, 0.1);
    color: #ffb92f;
    padding: 10px;
    margin: 0 15px 10px 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 185, 47, 0.3);
}

/* Coin Charge UI */
.shop-charge-btn {
    background: #23a559;
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
}

.shop-charge-btn:hover {
    opacity: 0.9;
}

.charge-opt-btn {
    background: #1e1e24;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.charge-opt-btn:hover {
    transform: translateY(-2px);
    border-color: #ffb92f;
    background: rgba(255, 185, 47, 0.05);
}

.coin-amt {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffb92f;
}

.money-amt {
    font-size: 0.9rem;
    color: #ccc;
}

/* Bank Transfer UI */
.bank-info-box {
    background: #1e1e24;
    border: 1px solid #ffb92f;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.bank-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.bank-account {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffb92f;
    margin-bottom: 5px;
}

.bank-owner {
    font-size: 0.9rem;
    color: #ccc;
}

.bank-input {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #111;
    color: white;
    font-size: 1rem;
    margin-top: 5px;
    margin-bottom: 15px;
}

.bank-note {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
}

/* Admin Deposit List */
.admin-deposit-list {
    max-height: 400px;
    overflow-y: auto;
}

.deposit-req-item {
    background: #1e1e24;
    padding: 15px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deposit-req-info {
    text-align: left;
}

.deposit-req-user {
    font-weight: bold;
    color: var(--accent);
}

.deposit-req-detail {
    font-size: 0.9rem;
    color: #aaa;
}

.deposit-approve-btn {
    background: #23a559;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.deposit-approve-btn:hover {
    opacity: 0.9;
}