/* PKM Universe - Stylish CSS
   =========================== */

/* DISCORD THEME VARIABLES */
:root {
    /* Discord Official Blurple Brand Colors */
    --discord-blurple: #5865f2;
    --discord-blurple-hover: #4752c4;
    --discord-blurple-active: #3c45a5;

    /* Discord Dark Theme (Default) */
    --bg-primary: #36393f;      /* Main chat area background */
    --bg-secondary: #2f3136;    /* Sidebar, embeds background */
    --bg-tertiary: #202225;     /* Darkest sections */
    --bg-hover: rgba(79, 84, 92, 0.16);  /* Hover states */
    --bg-accent: #40444b;       /* Accented backgrounds */

    --text-primary: #dcddde;    /* Primary text */
    --text-secondary: #ffffff;  /* Headers */
    --text-muted: #a3a6aa;      /* Secondary text */
    --text-dim: #72767d;        /* Dimmed text */

    --sidebar-bg: #2f3136;
    --sidebar-header-bg: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);

    --card-bg: #2f3136;
    --card-border: #202225;

    --input-bg: #40444b;
    --input-border: #202225;
    --input-focus-border: #5865f2;

    --chat-message-bg: transparent;
    --chat-message-hover: rgba(4, 4, 5, 0.07);

    /* Discord Interactive States */
    --interactive-normal: #b9bbbe;
    --interactive-hover: #dcddde;
    --interactive-active: #ffffff;
    --interactive-muted: #4f545c;

    /* Discord Status Colors */
    --status-online: #43b581;
    --status-idle: #faa61a;
    --status-dnd: #f04747;
    --status-offline: #747f8d;

    /* Discord Shadows */
    --shadow-light: 0 1px 4px rgba(0,0,0,0.24);
    --shadow-medium: 0 3px 6px rgba(0,0,0,0.24);
    --shadow-heavy: 0 8px 16px rgba(0,0,0,0.24);
}

/* Discord Light Theme */
body.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f2f3f5;
    --bg-tertiary: #e3e5e8;
    --bg-hover: rgba(79, 84, 92, 0.08);
    --bg-accent: #ebedef;

    --text-primary: #2e3338;
    --text-secondary: #060607;
    --text-muted: #4e5058;
    --text-dim: #5c5e66;

    --sidebar-bg: #f2f3f5;
    --sidebar-header-bg: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);

    --card-bg: #f2f3f5;
    --card-border: #e3e5e8;

    --input-bg: #ebedef;
    --input-border: #d4d7dc;
    --input-focus-border: #5865f2;

    --chat-message-bg: transparent;
    --chat-message-hover: rgba(6, 6, 7, 0.02);

    --interactive-normal: #4e5058;
    --interactive-hover: #2e3338;
    --interactive-active: #060607;
    --interactive-muted: #d4d7dc;

    --shadow-light: 0 1px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 3px 6px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 16px rgba(0,0,0,0.2);
}

/* Light Theme - Sidebar Navigation Items with Better Contrast */
body.light-theme .nav-item {
    color: #2c3e50;
}

body.light-theme .nav-item:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

body.light-theme .nav-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.25) 0%, transparent 100%);
    color: #667eea;
    font-weight: 600;
}

body.light-theme .nav-item.logout:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

* {
    /* margin: 0; -- REMOVED: This was breaking Discord message spacing! */
    padding: 0;
    box-sizing: border-box;
}

/* Reset margin for everything EXCEPT chat messages */
*:not(.chat-message) {
    margin: 0;
}

body {
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.375;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--sidebar-bg);
    box-shadow: 4px 0 20px var(--shadow-medium);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 20px;
    background: var(--sidebar-header-bg);
    box-shadow: 0 4px 10px var(--shadow-light);
}

.sidebar-header h2 {
    color: white;
    font-size: 1.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    font-weight: 500;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.role-badge.helper {
    background: linear-gradient(135deg, #4facfe 0%, #00c6ff 100%);
    color: white;
}

.role-badge.user {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 100%;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    font-size: 1em;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 30px;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.3) 0%, transparent 100%);
    color: white;
    border-left: 4px solid #667eea;
    padding-left: 21px;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.nav-item .icon {
    font-size: 1.4em;
}

.nav-item .label {
    font-weight: 500;
}

.nav-item .badge {
    margin-left: auto;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: bold;
}

.nav-item.logout {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item.logout:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

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

/* Content Cards */
.content-card {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px var(--shadow-medium);
    margin-bottom: 30px;
}

.content-card h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px var(--shadow-light);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2em;
    margin-bottom: 40px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.feature-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    transition: all 0.3s;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.feature-card p {
    opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(102, 126, 234, 0.1);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quick Actions */
.quick-actions-section {
    margin: 40px 0;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.action-btn:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.action-btn.admin {
    border-color: rgba(245, 87, 108, 0.3);
}

.action-btn.admin:hover {
    border-color: #f5576c;
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.15);
}

.action-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.action-title {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.action-desc {
    font-size: 0.85em;
    color: var(--text-muted);
}

.features-section {
    margin: 40px 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.cta-section h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s;
}

.discord-btn:hover {
    background: #4752C4;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
}

/* Chat Container */
.chat-container {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow-medium);
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    font-size: 1.5em;
}

.online-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    /* Removed gap: 0 to allow proper message spacing */
    background: var(--discord-bg-primary) !important;
    backdrop-filter: none !important;
}

/* DISABLED - Conflicts with Discord styling
.chat-message {
    padding: 15px 20px;
    border-radius: 12px;
    background: var(--chat-message-bg);
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: background 0.2s;
}

.chat-message:hover {
    background: var(--chat-message-hover);
}
*/

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* DISABLED - Conflicts with Discord styling
.chat-message.admin {
    background: var(--chat-message-bg);
    border-left-color: #f5576c;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.2);
}

.chat-message.admin:hover {
    background: var(--chat-message-hover);
}
*/

/* Discord Message Avatar Styling */
/* DISABLED - Now handled by .discord-avatar-wrapper
.chat-message img[onclick*="showProfileModal"] {
    position: absolute !important;
    left: 16px !important;
    top: 2px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    object-fit: cover !important;
    transition: transform 0.1s ease !important;
}

.chat-message img[onclick*="showProfileModal"]:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}
*/

/* Discord Status Indicator */
.discord-status-indicator {
    position: absolute !important;
    bottom: -2px !important;
    right: -2px !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    border: 3px solid var(--discord-bg-primary) !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.discord-status-indicator.online {
    background-color: var(--status-online, #43b581) !important;
}

.discord-status-indicator.idle {
    background: url('../uploads/idle-status.svg') center/contain no-repeat !important;
    border: 3px solid var(--discord-bg-primary) !important;
}

.discord-status-indicator.dnd {
    background-color: var(--status-dnd, #f04747) !important;
}

.discord-status-indicator.dnd::before {
    content: '' !important;
    position: absolute !important;
    width: 6px !important;
    height: 2px !important;
    background-color: var(--discord-bg-primary, #36393f) !important;
    border-radius: 1px !important;
}

.discord-status-indicator.invisible,
.discord-status-indicator.offline {
    background-color: var(--status-offline, #747f8d) !important;
}

.discord-status-indicator.invisible::before,
.discord-status-indicator.offline::before {
    content: '' !important;
    position: absolute !important;
    width: 6px !important;
    height: 6px !important;
    border: 2px solid var(--discord-bg-primary, #36393f) !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
}

/* Avatar wrapper for status */
.discord-avatar-wrapper {
    position: absolute !important;
    left: 16px !important;
    top: 2px !important;
    width: 40px !important;
    height: 40px !important;
}

/* DM Header avatar - keep it in flex flow, don't make it absolute */
#dm-header-avatar-wrapper {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 32px !important;
    height: 32px !important;
}

.discord-avatar-wrapper img {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.1s ease !important;
}

.discord-avatar-wrapper img:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

/* DISABLED - Old chat styles conflict with Discord layout
.chat-message-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
    background: white;
    position: relative;
}

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

.online-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.online-status.online {
    background: #51cf66;
}

.online-status.offline {
    background: #868e96;
}

.chat-avatar:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
*/

.chat-username {
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-username:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.chat-username.admin {
    color: #f5576c;
}

.chat-timestamp {
    font-size: 0.8em;
    color: var(--text-muted);
}

.delete-message-btn {
    margin-left: auto;
    background: #ff6b6b;
    border: none;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    opacity: 0.8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.delete-message-btn:hover {
    background: #ff4444;
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(255, 68, 68, 0.4);
}

.chat-text {
    color: var(--text-primary);
    word-wrap: break-word;
}

.chat-input-container {
    padding: 20px;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    border-top: 1px solid var(--card-border);
}

#chat-form {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--input-border);
    border-radius: 25px;
    font-size: 1em;
    transition: all 0.3s;
    background: var(--input-bg);
    color: var(--text-primary);
}

#chat-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-btn {
    padding: 15px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Admin Sections */
.admin-section {
    background: rgba(102, 126, 234, 0.05);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.admin-section h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
    min-height: 44px;
    min-width: 44px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(102, 126, 234, 0.2);
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.flash-message.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.flash-message.success {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    color: white;
}

/* Profile Sections */
.profile-section {
    background: rgba(102, 126, 234, 0.05);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.profile-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="color"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-group input[type="color"] {
    width: 60px;
    height: 45px;
    cursor: pointer;
}

/* Profile Modal */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.profile-modal-content {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px var(--shadow-heavy);
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.profile-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(231, 76, 60, 0.1);
    border: none;
    color: #e74c3c;
    font-size: 1.8em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.profile-modal-close:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

.profile-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-modal-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.profile-modal-name {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.profile-modal-status {
    font-size: 1.1em;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.profile-modal-role {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.profile-modal-role.admin {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.profile-modal-role.user {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.profile-modal-body {
    margin-top: 30px;
}

.profile-modal-bio {
    background: rgba(102, 126, 234, 0.05);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin-bottom: 20px;
}

.profile-modal-bio h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.profile-modal-bio p {
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.profile-modal-badge {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    color: white;
    font-weight: bold;
    font-size: 1.1em;
}

/* Notifications */
.notification-item {
    background: var(--card-bg);
    border-left: 4px solid #667eea;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: all 0.3s;
}

.notification-item:hover {
    box-shadow: 0 4px 16px var(--shadow-medium);
    transform: translateY(-2px);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.08);
    border-left-color: #667eea;
}

.notification-item.everyone {
    border-left-color: #f5576c;
    background: rgba(245, 87, 108, 0.05);
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.notification-from {
    font-weight: bold;
    color: #667eea;
    flex: 1;
}

.notification-time {
    font-size: 0.85em;
    color: var(--text-muted);
}

.notification-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    background: #667eea;
    color: white;
}

.notification-type.everyone {
    background: #f5576c;
}

.notification-message {
    color: var(--text-primary);
    line-height: 1.5;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    word-wrap: break-word;
}

.mention-highlight {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

.everyone-highlight {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

/* Mention Autocomplete */
.mention-autocomplete {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--discord-bg-secondary);
    backdrop-filter: blur(10px);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999 !important;
    display: none;
    margin-bottom: 8px;
}

.mention-autocomplete.active {
    display: block !important;
}

.mention-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mention-autocomplete-item:hover,
.mention-autocomplete-item.selected {
    background: rgba(102, 126, 234, 0.1);
}

.mention-autocomplete-item.everyone {
    background: rgba(245, 87, 108, 0.05);
    border-left: 4px solid #f5576c;
}

.mention-autocomplete-item.everyone:hover {
    background: rgba(245, 87, 108, 0.15);
}

.mention-autocomplete-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.mention-autocomplete-info {
    flex: 1;
}

.mention-autocomplete-name {
    font-weight: bold;
    font-size: 0.95em;
}

.mention-autocomplete-username {
    font-size: 0.85em;
    color: var(--text-muted);
}

.mention-autocomplete-role {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
}

.mention-autocomplete-role.admin {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.mention-autocomplete-role.special {
    background: #f5576c;
    color: white;
}

/* Discord Embed */
.discord-embed {
    background: #2f3136;
    border-left: 4px solid #5865F2;
    border-radius: 4px;
    padding: 16px;
    margin: 8px 0;
    max-width: 400px;
}

.discord-embed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.discord-embed-title {
    color: #5865F2;
    font-weight: 600;
    font-size: 14px;
}

.discord-embed-description {
    color: #dcddde;
    font-size: 13px;
    margin: 8px 0 12px 0;
}

.discord-embed-button {
    display: inline-block;
    background: #5865F2;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.discord-embed-button:hover {
    background: #4752C4;
}

/* Bot Status Cards */
.bot-status-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
}

.bot-status-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.bot-status-card h3 {
    margin: 10px 0 15px 0;
    font-size: 1.1em;
}

.bot-status-card p {
    margin: 8px 0;
    color: #ccc;
    font-size: 0.9em;
}

.status-indicator {
    font-size: 1.5em;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    color: #00ff88;
}

.status-indicator.offline {
    color: #ff6b6b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Showdown Generator Styling */
#showdown-output {
    font-family: 'Courier New', Consolas, monospace;
}

#showdown-form input[type="number"],
#showdown-form input[type="text"],
#showdown-form select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

#showdown-form input[type="number"]:focus,
#showdown-form input[type="text"]:focus,
#showdown-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#showdown-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Leaderboard Styles */
.leaderboard-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Trade Stats Styles */
.stats-card {
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

.stats-card:hover {
    transform: translateY(-5px);
}

/* Events Calendar Styles */
.event-card {
    padding: 25px;
    border-radius: 15px;
    border: 2px solid;
    transition: all 0.3s;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.event-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-badge.live {
    background: #00ff88;
    color: #000;
    animation: pulse 2s infinite;
}

.event-badge.upcoming {
    background: #ffc107;
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-header h2,
    .user-info,
    .nav-item .label {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 15px;
    }

    .main-content {
        margin-left: 70px;
        padding: 20px;
    }

    /* Make Showdown Generator single column on mobile */
    #showdown-generator-tab .content-card > div {
        grid-template-columns: 1fr !important;
    }

    /* Stack leaderboard podium vertically on mobile */
    .leaderboard-podium {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   MESSAGE REACTIONS
   ========================================== */

.reactions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    position: relative;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.reaction-btn.user-reacted {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.reaction-btn .reaction-count {
    font-size: 0.85em;
    font-weight: 600;
    color: white;
}

.add-reaction-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
    opacity: 0.6;
}

.add-reaction-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    z-index: 1000;
    animation: slideUp 0.2s ease-out;
}

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

.reaction-emoji-btn {
    padding: 8px;
    font-size: 1.5em;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.reaction-emoji-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.2);
}

/* Enhanced Reaction Picker with Search */
.reaction-picker-enhanced {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    width: 350px;
    max-height: 400px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    z-index: 1000;
    animation: slideUp 0.2s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reaction-search-input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.9em;
    outline: none;
    transition: all 0.2s;
}

.reaction-search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: #667eea;
}

.reaction-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.reaction-categories {
    display: flex;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.reaction-categories::-webkit-scrollbar {
    height: 4px;
}

.reaction-categories::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.reaction-category-btn {
    min-width: 32px;
    height: 32px;
    padding: 4px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.reaction-category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.reaction-category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.reaction-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 10px;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.reaction-emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.reaction-emoji-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.reaction-emoji-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Light theme adjustments for enhanced reaction picker */
body.light-theme .reaction-picker-enhanced {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-theme .reaction-search-input {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
    border-bottom-color: rgba(0, 0, 0, 0.2);
}

body.light-theme .reaction-search-input:focus {
    background: rgba(0, 0, 0, 0.08);
}

body.light-theme .reaction-search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .reaction-category-btn {
    background: rgba(0, 0, 0, 0.08);
}

body.light-theme .reaction-category-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

body.light-theme .reaction-emoji-grid {
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

body.light-theme .reaction-emoji-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
}

/* Reaction Tooltips */
.reaction-tooltip {
    position: fixed;
    transform: translateX(-50%) translateY(-100%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    animation: tooltipFadeIn 0.2s ease-out;
    max-width: 200px;
    white-space: nowrap;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(calc(-100% + 5px));
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(-100%);
    }
}

.reaction-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reaction-tooltip-user {
    font-size: 0.85em;
    color: white;
    padding: 2px 0;
}

.reaction-tooltip-loading,
.reaction-tooltip-error {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.reaction-tooltip-error {
    color: #ff6b6b;
}

/* Light theme adjustments for tooltips */
body.light-theme .reaction-tooltip {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.light-theme .reaction-tooltip-user {
    color: #000;
}

body.light-theme .reaction-tooltip-loading {
    color: rgba(0, 0, 0, 0.6);
}

/* ==========================================
   MESSAGE EDITING
   ========================================== */

.edited-tag {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 4px;
    font-style: italic;
}

.edit-message-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    padding: 2px 6px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.edit-message-btn:hover {
    opacity: 1;
}

.edit-message-container {
    margin-top: 8px;
}

.edit-message-input {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
}

.edit-message-input:focus {
    outline: none;
    border-color: #667eea;
}

.edit-message-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.btn-small {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ==========================================
   TYPING INDICATORS
   ========================================== */

.typing-indicator {
    padding: 15px 20px;
    margin: 10px 0;
}

.typing-indicator-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: typingDot 1.4s infinite;
}

.typing-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* MESSAGE FORMATTING (MARKDOWN) */
.chat-text strong {
    font-weight: 700;
    color: #fff;
}

.chat-text em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
}

.chat-text code {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.9em;
    color: #7dd3fc;
}

.chat-text pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
    max-width: 100%;
}

.chat-text pre code {
    background: none;
    border: none;
    padding: 0;
    display: block;
    white-space: pre;
    color: #e0e0e0;
    line-height: 1.5;
}

/* MESSAGE REPLIES / THREADING */
.reply-context {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 0.85em;
}

.reply-icon {
    font-size: 0.9em;
}

.reply-username {
    font-weight: 600;
    color: #667eea;
}

.reply-message {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reply-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(102, 126, 234, 0.15);
    border-left: 3px solid #667eea;
    border-radius: 8px;
    margin-bottom: 10px;
}

.reply-indicator-text {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.cancel-reply-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.1em;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.cancel-reply-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Light Theme - Reply Indicator */
body.light-theme .reply-indicator-text {
    color: rgba(0, 0, 0, 0.85);
}

body.light-theme .cancel-reply-btn {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .cancel-reply-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.reply-message-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1em;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: 4px;
}

.reply-message-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* ==========================================
   TRADE BOT NETWORK STATUS - NEON DESIGN
   ========================================== */

/* Network Title */
.network-title {
    font-size: 2.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.network-subtitle {
    font-size: 1.1em;
    color: #a0aec0;
    margin-bottom: 30px;
}

/* Network Alert */
.network-alert {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.alert-icon {
    font-size: 1.5em;
}

/* Network Overview */
.network-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.network-stat {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.network-stat::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.network-stat:hover {
    transform: translateY(-5px);
    border-color: #00ff88;
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
}

.network-stat-value {
    font-size: 2.5em;
    font-weight: 900;
    background: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
}

.network-stat-label {
    font-size: 0.9em;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Game Bots Container */
.game-bots-container {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

/* Game Card */
.game-card {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.8) 0%, rgba(20, 20, 40, 0.8) 100%);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    animation: scan 3s infinite;
}

@keyframes scan {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.game-card.online {
    border-color: #00ff88;
    box-shadow: 0 5px 30px rgba(0, 255, 136, 0.2);
}

.game-card.idle {
    border-color: #fbbf24;
}

.game-card.offline {
    border-color: #6b7280;
    opacity: 0.6;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.game-title {
    font-size: 1.8em;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-status-badge {
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 20px currentColor;
}

.game-status-badge.online {
    background: linear-gradient(135deg, #00ff88 0%, #00cc70 100%);
    color: #000;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px #00ff88, 0 0 40px rgba(0, 255, 136, 0.5); }
    50% { box-shadow: 0 0 30px #00ff88, 0 0 60px rgba(0, 255, 136, 0.8); }
}

.game-status-badge.idle {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

.game-status-badge.offline {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #fff;
}

/* Game Stats Grid */
.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.game-stat-item {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.game-stat-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #00ff88;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.game-stat-label {
    font-size: 0.85em;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Network Load Bar */
.network-load {
    margin-bottom: 25px;
}

.load-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.load-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
}

.load-status {
    font-size: 0.9em;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.load-status.available {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}

.load-status.busy {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid #fbbf24;
}

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

.load-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(107, 114, 128, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.load-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88 0%, #00ccff 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
    position: relative;
}

.load-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loading-shine 2s infinite;
}

@keyframes loading-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.load-bar.busy {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
}

.load-bar.full {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

/* Regional Status */
.regional-status-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
}

.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.region-item {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.region-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #00ff88;
    transform: translateX(5px);
}

.region-info {
    flex: 1;
}

.region-name {
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    font-size: 1.05em;
}

.region-bots {
    font-size: 0.9em;
    color: #a0aec0;
}

.region-status {
    font-size: 0.85em;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.region-status.available {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

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

/* Last Updated */
.last-updated {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
    color: #a0aec0;
    font-size: 0.9em;
    font-style: italic;
}

/* LIVE TRADING DASHBOARD (Legacy - Keeping for compatibility) */
.trading-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.stat-card.online {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--card-bg) 100%);
}

.stat-card.profit {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, var(--card-bg) 100%);
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--text-primary);
    margin: 10px 0;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bots-container {
    margin-top: 30px;
}

.bot-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.bot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #6b7280;
    transition: all 0.3s;
}

.bot-card.status-online::before {
    background: #10b981;
    box-shadow: 0 0 20px #10b981;
}

.bot-card.status-idle::before {
    background: #fbbf24;
}

.bot-card.status-offline::before {
    background: #ef4444;
}

.bot-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
}

.bot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.bot-info {
    flex: 1;
}

.bot-name {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.bot-type {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 0.8em;
    color: #667eea;
    font-weight: 600;
}

.bot-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.bot-status-badge.online {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.bot-status-badge.idle {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.bot-status-badge.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.bot-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.bot-stat {
    text-align: center;
}

.bot-stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-primary);
}

.bot-stat-label {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 5px;
}

.bot-uptime {
    margin-top: 15px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.uptime-label {
    color: var(--text-muted);
    font-size: 0.9em;
}

.uptime-value {
    color: #667eea;
    font-weight: 600;
}

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--card-border);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.admin-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--card-border);
}

.admin-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.admin-tools {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.admin-tools .btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.admin-tools .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.no-bots-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-bots-message h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* ============================================
   DISCORD-STYLE CHAT OVERRIDES
   ============================================ */

/* Force proper Discord message spacing - MUST override the * selector */
.chat-message {
    margin: 0 0 16px 0 !important;  /* Discord standard 16px gap between messages */
    padding: 2px 48px 2px 72px !important;  /* 16px (avatar left) + 40px (avatar width) + 16px (gap) = 72px */
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: relative !important;
    display: block !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    overflow: visible !important;
}

/* Ensure first message has proper top spacing */
.chat-message:first-child {
    margin-top: 16px !important;
}

/* GIF embeds - prevent overlapping */
.chat-gif {
    display: block !important;
    max-width: 400px !important;
    max-height: 400px !important;
    width: auto !important;
    height: auto !important;
    margin-top: 8px !important;
    margin-bottom: 16px !important;
    border-radius: 4px;
    cursor: pointer;
    object-fit: contain;
    clear: both !important;
}

/* Ensure message content doesn't overlap with other messages */
.discord-message-content {
    position: relative !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block !important;
    width: 100% !important;
}

/* Discord message body needs to be contained properly */
.discord-message-body {
    position: relative !important;
    width: 100%;
    display: block !important;
}

/* Override main-content padding for chat tabs */
#chat-tab.active,
#admin-chat-tab.active {
    position: fixed !important;
    top: 0 !important;
    left: 280px !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: var(--discord-bg-primary) !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

/* Discord Chat Container */
.discord-chat-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    background-color: var(--discord-bg-primary) !important;
    position: relative !important;
}

/* Discord Chat Header */
.discord-chat-header {
    height: 48px !important;
    padding: 0 var(--spacing-md) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid var(--discord-bg-floating) !important;
    box-shadow: var(--discord-shadow-sm) !important;
    background-color: var(--discord-bg-primary) !important;
    z-index: 10 !important;
}

.discord-chat-header-title {
    font-size: var(--text-md) !important;
    font-weight: 600 !important;
    color: var(--discord-header-primary) !important;
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-sm) !important;
}

.discord-channel-hashtag {
    color: var(--discord-text-muted) !important;
    font-weight: 700 !important;
}

/* Discord Messages Area - Override ALL existing chat styles */
.discord-messages-area,
#chat-messages,
#admin-chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: var(--spacing-md) !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: var(--discord-bg-primary) !important;
    backdrop-filter: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    /* Removed gap: 0 to allow proper message spacing */
}

/* Discord Input Container */
.discord-input-container {
    padding: 0 var(--spacing-md) var(--spacing-lg) !important;
    background-color: var(--discord-bg-primary) !important;
    position: relative !important;
}

.discord-message-input-wrapper {
    background-color: var(--discord-bg-accent) !important;
    border-radius: var(--radius-lg) !important;
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-sm) !important;
    flex-grow: 1 !important;
    width: 100% !important;
}

.discord-message-input {
    flex: 1 !important;
    width: 100% !important;
    background: none !important;
    border: none !important;
    outline: none !important;
    color: var(--discord-text-normal) !important;
    font-size: var(--text-base) !important;
    font-family: var(--font-primary) !important;
    resize: none !important;
    max-height: 200px !important;
    line-height: 1.375rem !important;
}

.discord-message-input::placeholder {
    color: var(--discord-text-muted) !important;
}

.discord-input-buttons {
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-xs) !important;
}

.discord-input-button {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer !important;
    color: var(--discord-interactive-normal) !important;
    transition: all 0.1s ease !important;
}

.discord-input-button:hover {
    color: var(--discord-interactive-hover) !important;
}

/* Legacy Chat Input Support */
#chat-input {
    background-color: var(--input-bg) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 11px 16px !important;
    color: var(--text-primary) !important;
    font-size: 15px !important;
}

#chat-input:focus {
    border: none !important;
    outline: none !important;
}

#chat-input::placeholder {
    color: var(--text-muted) !important;
}

/* Discord Chat Header */
.chat-header {
    height: 48px !important;
    padding: 0 16px !important;
    background: var(--bg-primary) !important;
    border-radius: 0 !important;
    border-bottom: 1px solid var(--bg-tertiary);
    box-shadow: var(--shadow-light);
}

.chat-header h2 {
    font-size: 16px !important;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header h2::before {
    content: '#';
    color: var(--text-muted);
    font-weight: 700;
}

/* Discord Online Count Badge */
.online-count {
    background: transparent !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    color: var(--text-muted);
    border: 1px solid var(--interactive-muted);
}

/* Discord Chat Container */
.chat-container {
    background: var(--bg-primary) !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* REMOVED - Duplicate that was overriding spacing
.chat-messages {
    background: var(--bg-primary) !important;
    backdrop-filter: none !important;
    padding: 16px !important;
    gap: 0 !important;
}
*/

/* Discord Input Container */
.chat-input-container {
    padding: 0 16px 24px !important;
    background: var(--bg-primary) !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    border-top: none !important;
}

#chat-form {
    background-color: var(--input-bg);
    border-radius: 8px;
    padding: 0 !important;
}

/* Discord Send Button */
#chat-form button[type="submit"] {
    background: none !important;
    border: none;
    color: var(--text-muted);
    padding: 10px 16px !important;
    border-radius: 0 8px 8px 0 !important;
    cursor: pointer;
    transition: color 0.1s ease;
}

#chat-form button[type="submit"]:hover {
    color: var(--interactive-hover);
}

/* Discord Status Indicator Colors */
.online-status.online {
    background: var(--status-online) !important;
    border-color: var(--bg-secondary) !important;
}

.online-status.offline {
    background: var(--status-offline) !important;
    border-color: var(--bg-secondary) !important;
}

/* Discord Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 16px;
}

.chat-messages::-webkit-scrollbar-track {
    background-color: var(--bg-secondary);
    border-color: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--bg-tertiary);
    border: 4px solid transparent;
    border-radius: 8px;
    background-clip: padding-box;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #1a1c1f;
}

/* Discord Message Actions (Edit/Delete buttons on hover) */
.delete-message-btn {
    background: none !important;
    border: none !important;
    color: var(--interactive-muted) !important;
    opacity: 0 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-shadow: none !important;
    transform: none !important;
}

.chat-message:hover .delete-message-btn {
    opacity: 1 !important;
}

.delete-message-btn:hover {
    background: var(--bg-accent) !important;
    color: var(--text-danger) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Discord Bot Badge */
.bot-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: var(--discord-blurple);
    color: #ffffff;
    border-radius: 3px;
    vertical-align: middle;
}

/* Discord Admin Badge */
.admin-badge {
    background-color: #f04747;
}

/* Discord Helper Badge */
.helper-badge {
    background-color: #43b581;
}

/* Discord Reaction Styles */
.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.reaction {
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    background-color: var(--bg-accent);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.1s ease;
    user-select: none;
}

.reaction:hover {
    background-color: var(--interactive-muted);
    border-color: var(--interactive-hover);
}

.reaction.reacted {
    background-color: rgba(88, 101, 242, 0.15);
    border-color: var(--discord-blurple);
}

.reaction-emoji {
    font-size: 14px;
    margin-right: 4px;
}

.reaction-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 9px;
    text-align: center;
}

.reaction.reacted .reaction-count {
    color: var(--discord-blurple);
}

/* ===========================================
   SEARCHABLE DROPDOWN COMPONENT
   =========================================== */

.searchable-select-wrapper {
    position: relative;
    width: 100%;
}

.searchable-select-wrapper .search-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #667eea;
    border-radius: 8px 8px 0 0;
    font-size: 0.95em;
    background: white;
    color: #1a237e;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.searchable-select-wrapper .search-input:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

.searchable-select-wrapper .search-input::placeholder {
    color: #999;
    font-style: italic;
}

.searchable-select-wrapper select {
    border-radius: 0 0 8px 8px !important;
    border-top: none !important;
    margin-top: -2px;
}

.searchable-select-wrapper .search-icon {
    position: absolute;
    right: 12px;
    top: 10px;
    color: #667eea;
    pointer-events: none;
    font-size: 1em;
}

.searchable-select-wrapper .search-clear {
    position: absolute;
    right: 35px;
    top: 8px;
    color: #999;
    cursor: pointer;
    font-size: 1.1em;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.2s;
    display: none;
}

.searchable-select-wrapper .search-clear:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.searchable-select-wrapper .search-clear.visible {
    display: block;
}

/* Match count indicator */
.searchable-select-wrapper .match-count {
    position: absolute;
    right: 60px;
    top: 11px;
    font-size: 0.75em;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: none;
}

.searchable-select-wrapper .match-count.visible {
    display: inline-block;
}

/* Highlight matching text in options (for browsers that support it) */
.searchable-select-wrapper select option.highlighted {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

