/* Trunkie Chat After Hours - Styles */
:root {
    /* After Hours Theme Colors - Blue Edition */
    --primary-color: #2980b9;
    --secondary-color: #3498db;
    --bg-dark: #0a0a0f;
    --bg-darker: #05050a;
    --text-primary: #f0f0f0;
    --text-secondary: #b8b8b8;
    --accent-green: #2ecc71;
    --accent-yellow: #f39c12;
    --accent-blue: #1e5f8e;
    --accent-lightblue: #5dade2;
    --accent-pink: #e91e63;
    --border-color: rgba(255, 255, 255, 0.08);
    --hover-bg: rgba(255, 255, 255, 0.03);
    --scanner-red: #e74c3c;
    --scanner-blue: #3498db;
    --header-height: 70px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 60px;
    --message-bg: rgba(255, 255, 255, 0.02);
    --message-hover-bg: rgba(255, 255, 255, 0.04);
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* After Hours animated background - Blue theme */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(41, 128, 185, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(52, 152, 219, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(30, 95, 142, 0.05) 0%, transparent 40%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.008) 2px,
            rgba(255, 255, 255, 0.008) 4px
        );
    pointer-events: none;
    z-index: 1;
    animation: nightShift 20s ease-in-out infinite;
}

@keyframes nightShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.main-container {
    display: flex;
    flex: 1;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

/* Header with After Hours styling */
.header {
    background: linear-gradient(90deg, rgba(41, 128, 185, 0.15) 0%, rgba(52, 152, 219, 0.15) 100%);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
    gap: 20px;
    min-height: var(--header-height);
    height: var(--header-height);
    flex-shrink: 0;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    animation: scan 4s linear infinite;
}

/* Logo with After Hours subtitle */
.logo {
    font-family: 'Orbitron', monospace;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    flex-shrink: 0;
}

.logo-main {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-main i {
    color: var(--primary-color);
    -webkit-text-fill-color: initial;
}

.logo-subtitle {
    font-size: 9px;
    font-weight: 600;
    color: var(--accent-lightblue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-left: 0;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logo-subtitle i {
    font-size: 8px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.points-display {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--accent-yellow);
    border-radius: 20px;
    padding: 6px 14px;
    font-family: 'Share Tech Mono', monospace;
    color: var(--accent-yellow);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.points-display:hover {
    background: rgba(243, 156, 18, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hover-bg);
    padding: 4px 12px 4px 4px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 200px;
    position: relative;
    text-decoration: none;
}

.user-profile:hover {
    background: rgba(41, 128, 185, 0.1);
    border-color: var(--primary-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

/* Fixed Collapsible Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 20px;
    width: 24px;
    height: 24px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.sidebar-toggle i {
    color: var(--text-primary);
    font-size: 10px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-content {
    opacity: 1;
    transition: opacity 0.3s ease;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(41, 128, 185, 0.05);
    flex-shrink: 0;
    min-height: 60px;
}

.sidebar-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-title {
    display: none;
}

.sidebar-subtitle {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-subtitle {
    display: none;
}

/* Active Users Section */
.active-users-section {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(41, 128, 185, 0.03);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--accent-lightblue);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Orbitron', monospace;
}

.active-users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
}

.active-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
}

.active-user-item:hover {
    background: rgba(41, 128, 185, 0.1);
    transform: translateX(4px);
    border-color: rgba(41, 128, 185, 0.3);
}

.active-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.active-user-info {
    flex: 1;
    min-width: 0;
}

.active-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.active-user-status {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator {
    width: 7px;
    height: 7px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.status-indicator.away {
    background: var(--accent-yellow);
    animation: pulse-orange 2s ease-in-out infinite;
}

.status-indicator.offline {
    background: #666;
    animation: none;
}

@keyframes pulse-orange {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
    50% { opacity: 0.8; transform: scale(0.9); box-shadow: 0 0 0 3px rgba(243, 156, 18, 0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

/* Moderation Monitor Section - integrated into sidebar */
.moderation-section {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.05), rgba(231, 76, 60, 0.03));
    display: none;
    position: relative;
    overflow: hidden;
}

.moderation-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--scanner-red), var(--primary-color));
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.moderation-section.active {
    display: block;
}

.moderation-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.mod-stat-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    padding: 12px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.mod-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.mod-stat-value {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.mod-stat-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.recent-blocks {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding-right: 4px;
}

.block-item {
    padding: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    margin-bottom: 6px;
    border-radius: 6px;
    border-left: 3px solid var(--scanner-red);
    font-size: 12px;
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease;
}

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

.block-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    transform: translateX(2px);
}

.block-user {
    font-weight: 600;
    color: var(--text-primary);
}

.block-time {
    font-size: 9px;
    color: var(--text-secondary);
}

.block-action {
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.block-reason {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.block-item:hover .block-reason {
    opacity: 1;
}

.block-user {
    font-weight: 600;
    color: var(--text-primary);
}

.block-time {
    color: var(--text-secondary);
    font-size: 10px;
}

.mod-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.mod-action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.1), rgba(52, 152, 219, 0.05));
    border: 1px solid rgba(41, 128, 185, 0.3);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mod-action-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(41, 128, 185, 0.2), transparent);
    transition: left 0.5s ease;
}

.mod-action-link:hover {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.2), rgba(52, 152, 219, 0.1));
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.2);
}

.mod-action-link:hover::before {
    left: 100%;
}

.mod-action-link i {
    font-size: 14px;
}

.feature-buttons {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-btn {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.1) 0%, rgba(30, 95, 142, 0.05) 100%);
    border: 1px solid rgba(41, 128, 185, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar.collapsed .feature-btn {
    padding: 10px 8px;
    justify-content: center;
}

.sidebar.collapsed .feature-btn span {
    display: none;
}

.sidebar.collapsed .feature-btn i {
    margin: 0;
}

.feature-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(41, 128, 185, 0.2), transparent);
    transition: left 0.5s ease;
}

.feature-btn:hover::before {
    left: 100%;
}

.feature-btn:hover {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.2) 0%, rgba(30, 95, 142, 0.1) 100%);
    border-color: var(--primary-color);
    transform: translateX(3px);
}

.sidebar.collapsed .feature-btn:hover {
    transform: none;
}

.feature-btn i {
    font-size: 16px;
}

.feature-btn.daily-bonus {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15) 0%, rgba(243, 156, 18, 0.05) 100%);
    border-color: rgba(243, 156, 18, 0.4);
}

.feature-btn.daily-bonus:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.25) 0%, rgba(243, 156, 18, 0.1) 100%);
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.2);
}

/* Enhanced Chat Container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(5, 5, 10, 0.4);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.custom-chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    scroll-behavior: smooth;
}

.chat-input-container {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(5, 5, 10, 0.6);
    flex-shrink: 0;
}

/* Smaller, More Detailed Messages */
.str-chat__message {
    background: var(--message-bg) !important;
    border: 1px solid rgba(41, 128, 185, 0.1) !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
    padding: 10px 12px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.str-chat__message:hover {
    background: var(--message-hover-bg) !important;
    border-color: rgba(41, 128, 185, 0.3) !important;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.1);
}

/* Moderator message styling - gold/amber border */
.str-chat__message--moderator {
    border: 1px solid rgba(243, 156, 18, 0.25) !important;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.02) 0%, transparent 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(243, 156, 18, 0.05);
}

.str-chat__message--moderator:hover {
    border-color: rgba(243, 156, 18, 0.4) !important;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.04) 0%, transparent 100%) !important;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.15);
}

/* Admin message styling - red border */
.str-chat__message--admin {
    border: 1px solid rgba(231, 76, 60, 0.25) !important;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.02) 0%, transparent 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(231, 76, 60, 0.05);
}

.str-chat__message--admin:hover {
    border-color: rgba(231, 76, 60, 0.4) !important;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.04) 0%, transparent 100%) !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15);
}

/* Optional: Subtle animation for new mod/admin messages */
@keyframes modMessageGlow {
    0% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(243, 156, 18, 0.05); }
    50% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 25px rgba(243, 156, 18, 0.1); }
    100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(243, 156, 18, 0.05); }
}

@keyframes adminMessageGlow {
    0% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(231, 76, 60, 0.05); }
    50% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 25px rgba(231, 76, 60, 0.1); }
    100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(231, 76, 60, 0.05); }
}

/* Apply animation only to new messages for first 3 seconds */
.str-chat__message--moderator.new-message {
    animation: modMessageGlow 2s ease-in-out;
}

.str-chat__message--admin.new-message {
    animation: adminMessageGlow 2s ease-in-out;
}

/* Message moderation actions - visible on hover for admins/mods */
.message-mod-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
    gap: 5px;
    background: rgba(0, 0, 0, 0.8);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.str-chat__message:hover .message-mod-actions {
    display: flex;
}

.mod-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 11px;
}

.mod-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.mod-action-btn.delete:hover {
    color: var(--scanner-red);
    background: rgba(231, 76, 60, 0.1);
}

.mod-action-btn.ban:hover {
    color: var(--accent-yellow);
    background: rgba(243, 156, 18, 0.1);
}

/* Moderator Info Panel */
.message-mod-info {
    display: none;
    margin-top: 8px;
    padding: 8px;
    background: rgba(41, 128, 185, 0.05);
    border: 1px solid rgba(41, 128, 185, 0.2);
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.str-chat__message:hover .message-mod-info {
    display: block;
}

.mod-info-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.mod-info-label {
    font-weight: 600;
    color: var(--accent-lightblue);
}

.str-chat__message-text {
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    letter-spacing: 0.3px;
}

.str-chat__message-sender-name {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    font-family: 'Orbitron', monospace !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 12px !important;
}

.str-chat__message--me .str-chat__message-sender-name {
    color: var(--accent-yellow) !important;
}

/* Night mode timestamp styling */
.message-timestamp {
    color: var(--text-secondary);
    font-size: 10px;
    opacity: 0.7;
}

.str-chat__input-flat {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(41, 128, 185, 0.2) !important;
    border-radius: 10px !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    padding: 12px 15px !important;
    font-size: 15px !important;
}

.str-chat__input-flat:focus {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(41, 128, 185, 0.2) !important;
}

/* Input validation styling */
.str-chat__input-flat.invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3) !important;
}

/* Loading state with After Hours theme */
.loading-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.scanner-loader {
    width: 200px;
    height: 200px;
    position: relative;
}

.scanner-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-lightblue), transparent);
    animation: scan-vertical 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent-lightblue);
}

.scanner-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: rotate 4s linear infinite;
}

.scanner-circle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--secondary-color);
    animation: rotate 2s linear infinite reverse;
}

@keyframes scan-vertical {
    0%, 100% { transform: translateY(-100px); }
    50% { transform: translateY(100px); }
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.loading-text {
    margin-top: 30px;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s ease-in-out infinite;
}

/* Modals with After Hours styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.95) 0%, rgba(5, 5, 10, 0.95) 100%);
    border: 1px solid rgba(41, 128, 185, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 50px rgba(41, 128, 185, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

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

.modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--primary-color);
    background: rgba(41, 128, 185, 0.1);
    transform: rotate(90deg);
}

.modal-content {
    color: var(--text-primary);
}

/* Game styles with night theme */
.police-code {
    font-family: 'Share Tech Mono', monospace;
    font-size: 48px;
    color: var(--accent-lightblue);
    margin: 30px 0;
    padding: 20px;
    background: rgba(41, 128, 185, 0.1);
    border: 2px solid var(--accent-lightblue);
    border-radius: 10px;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(41, 128, 185, 0.5);
}

.game-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(41, 128, 185, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.game-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(41, 128, 185, 0.3);
}

.game-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(41, 128, 185, 0.8) 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin: 5px;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.5);
}

.game-btn.secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid var(--border-color);
}

.game-btn.secondary:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.game-container {
    text-align: center;
}

/* Message reactions */
.message-reactions {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.reaction {
    background: rgba(41, 128, 185, 0.1);
    border: 1px solid rgba(41, 128, 185, 0.2);
    border-radius: 12px;
    padding: 3px 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.reaction:hover {
    background: rgba(41, 128, 185, 0.2);
    border-color: var(--primary-color);
}

.reaction.active {
    background: rgba(41, 128, 185, 0.3);
    border-color: var(--primary-color);
}

.reaction-count {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Admin/Moderator badges */
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(41, 128, 185, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
}

/* Gold handcuffs style for "Mod" display */
.user-badge.badge-handcuffs {
    background: rgba(243, 156, 18, 0.15);
    border-color: #f39c12;
    color: #f39c12;
}

/* Red secret agent style for "Admin" display */
.user-badge.badge-secret {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--scanner-red);
    color: var(--scanner-red);
}

/* Legacy styles (for backwards compatibility) */
.user-badge.admin {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--scanner-red);
    color: var(--scanner-red);
}

.user-badge.moderator {
    background: rgba(52, 152, 219, 0.1);
    border-color: var(--scanner-blue);
    color: var(--scanner-blue);
}

/* Custom scrollbar for night theme */
.chat-messages::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.active-users-list::-webkit-scrollbar,
.recent-blocks::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track,
.active-users-list::-webkit-scrollbar-track,
.recent-blocks::-webkit-scrollbar-track {
    background: rgba(41, 128, 185, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.active-users-list::-webkit-scrollbar-thumb,
.recent-blocks::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover,
.active-users-list::-webkit-scrollbar-thumb:hover,
.recent-blocks::-webkit-scrollbar-thumb:hover {
    background: var(--accent-lightblue);
}

/* Notification styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.notification.success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
}

.notification.error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--scanner-red);
    color: var(--scanner-red);
}

.notification.info {
    background: rgba(41, 128, 185, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Points animation */
@keyframes pointsPop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(243, 156, 18, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(243, 156, 18, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(243, 156, 18, 0);
    }
}

.points-added {
    animation: pointsPop 0.5s ease-out;
}

.points-display i {
    font-size: 14px;
}

.points-label {
    font-size: 14px;
}

/* Mobile menu toggle - Blue theme styling */
.mobile-menu-btn {
    display: none !important; /* Hidden by default on desktop */
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.1) 0%, rgba(30, 95, 142, 0.05) 100%);
    border: 1px solid rgba(41, 128, 185, 0.3);
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Explicitly hide on desktop */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
        visibility: hidden;
    }
}

.mobile-menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(41, 128, 185, 0.2), transparent);
    transition: left 0.5s ease;
}

.mobile-menu-btn:hover::before,
.mobile-menu-btn:active::before {
    left: 100%;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.2) 0%, rgba(30, 95, 142, 0.1) 100%);
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.2);
}

/* Mobile menu icon - ensure it's ALWAYS blue, never white */
.mobile-menu-btn i,
.mobile-menu-btn i.fas,
.mobile-menu-btn i.fa-bars,
.mobile-menu-btn .fas.fa-bars,
.header .mobile-menu-btn i,
.header .mobile-menu-btn i.fas,
.header .mobile-menu-btn i.fa-bars,
button.mobile-menu-btn i,
button.mobile-menu-btn i.fas,
body .header .mobile-menu-btn i,
body .app-wrapper .header .mobile-menu-btn i.fas.fa-bars,
.app-wrapper .header button.mobile-menu-btn i.fas.fa-bars {
    display: block;
    transition: transform 0.3s ease;
    /* Use explicit blue color to ensure it's never white */
    color: #2980b9 !important;
    /* Additional specificity to override any Font Awesome defaults */
    -webkit-text-fill-color: #2980b9 !important;
}

.mobile-menu-btn:active i {
    transform: rotate(90deg);
}

/* Profile dropdown */
.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0;
    min-width: 180px;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.active {
    display: block;
}

.dropdown-item {
    padding: 10px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-item:first-child {
    padding-top: 12px;
}

.dropdown-item:last-child {
    padding-bottom: 12px;
}

.dropdown-item:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}

/* Error container */
.error-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px;
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--scanner-red);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
}

.error-icon {
    font-size: 60px;
    color: var(--scanner-red);
    margin-bottom: 20px;
}

.error-title {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: var(--scanner-red);
}

.error-message {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}

.retry-btn {
    background: linear-gradient(135deg, var(--scanner-red) 0%, rgba(231, 76, 60, 0.8) 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

/* Image upload and lightbox styles */
.image-upload-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.image-upload-btn:hover {
    color: var(--primary-color);
    background: rgba(41, 128, 185, 0.1);
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-image:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(41, 128, 185, 0.3);
}

.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    cursor: pointer;
}

.image-lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* Bonus result styles */
.bonus-result {
    text-align: center;
    padding: 30px 0;
}

.bonus-amount {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    font-weight: 900;
    color: var(--accent-yellow);
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
}

.bonus-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(243, 156, 18, 0.05);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: 10px;
}

.bonus-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
}

.bonus-detail-label {
    color: var(--text-secondary);
}

.bonus-detail-value {
    font-family: 'Share Tech Mono', monospace;
    color: var(--accent-yellow);
    font-weight: 600;
}

.streak-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 20px;
}

.streak-display i {
    color: var(--accent-yellow);
    font-size: 24px;
}

.badges-earned {
    margin-top: 20px;
    padding: 20px;
    background: rgba(243, 156, 18, 0.05);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: 10px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 10px;
}

.badge-icon {
    font-size: 32px;
    color: var(--accent-yellow);
}

.badge-info h4 {
    color: var(--accent-yellow);
    margin-bottom: 5px;
}

.badge-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Login prompt styles */
.login-prompt-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 40px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
}

.login-prompt-icon {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

.login-prompt-title {
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-prompt-text {
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.6;
    font-size: 18px;
}

.login-prompt-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(41, 128, 185, 0.8) 100%);
    border: none;
    border-radius: 30px;
    padding: 16px 40px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 30px rgba(41, 128, 185, 0.5);
}

.login-prompt-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(41, 128, 185, 0.7);
}

.login-prompt-btn i {
    font-size: 24px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 12px;
}

.typing-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 5px;
}

.typing-dot {
    width: 5px;
    height: 5px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.difficulty-badge.easy {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
}

.difficulty-badge.medium {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
}

.difficulty-badge.hard {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--scanner-red);
    color: var(--scanner-red);
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

/* Only animate new messages, not all messages */
.str-chat__message.new-message {
    animation: slideIn 0.3s ease-out;
}

/* Loading dots for async operations */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loadingDot 1.4s ease-in-out infinite;
}

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

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

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Connection status indicator */
.connection-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 100;
}

.connection-status.healthy {
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
}

.connection-status.connecting {
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
}

.connection-status.unhealthy {
    border: 1px solid var(--scanner-red);
    color: var(--scanner-red);
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s ease-in-out infinite;
}

/* Tablet and smaller desktop screens */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Keep desktop layout but hide sidebar toggle on tablets */
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar-content {
        opacity: 0;
        pointer-events: none;
    }
    
    .feature-btn {
        justify-content: center;
    }
    
    .feature-btn span {
        display: none;
    }
    
    .feature-btn i {
        margin: 0;
    }
    
    .header-center {
        display: none;
    }

    .moderation-section {
        display: none !important;
    }
}

/* Mobile-specific overrides */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -var(--sidebar-width);
        top: var(--header-height);
        height: calc(100vh - var(--header-height)); 
        z-index: 999;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        display: flex;
        flex-direction: column;
    }

    .sidebar.mobile-open {
        left: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Show mobile menu button only on mobile */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure loading container doesn't block input */
    .loading-container {
        pointer-events: none;
    }
    
    .loading-container.active {
        pointer-events: auto;
    }
    
    /* Fix modal overlay on mobile - ensure it's transparent */
    .modal-overlay {
        background: rgba(0, 0, 0, 0.85) !important;
        z-index: 9999;
    }
    
    /* Ensure modal content is above overlay */
    .modal {
        z-index: 10000;
        background: linear-gradient(135deg, rgba(10, 10, 15, 0.98) 0%, rgba(5, 5, 10, 0.98) 100%) !important;
    }
    
    .sidebar {
        width: 280px;
        max-width: 85vw;
        left: -280px;
        position: fixed;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        overscroll-behavior: contain;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar.mobile-open {
        left: 0;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header {
        padding: 10px 12px;
        gap: 8px;
    }

    .logo-main {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .logo-subtitle {
        margin-left: 0;
        font-size: 8px;
        letter-spacing: 1px;
    }

    .user-name {
        display: none;
    }

    .points-label {
        display: none;
    }
    
    .points-display {
        padding: 4px 10px;
        font-size: 13px;
    }
    
    .points-display i {
        font-size: 12px;
    }
    
    .active-users-section {
        display: none;
    }
    
    .moderation-section {
        display: none;
    }
    
    /* Fix chat input container on mobile */
    .chat-input-container {
        padding: 10px;
        background: rgba(5, 5, 10, 0.98);
        border-top: 2px solid rgba(41, 128, 185, 0.3);
        position: relative;
        bottom: 0;
        z-index: 100;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        flex-shrink: 0;
        width: 100%;
    }
    
    .chat-input-container form {
        display: flex;
        gap: 6px;
        align-items: stretch;
        width: 100%;
    }
    
    .chat-input-container .game-input {
        flex: 1;
        min-width: 0;
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 10px 12px !important;
        height: 44px;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(41, 128, 185, 0.4) !important;
        color: var(--text-primary) !important;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        box-sizing: border-box;
    }
    
    .chat-input-container .game-input:focus {
        background: rgba(255, 255, 255, 0.12) !important;
        border-color: var(--primary-color) !important;
        outline: none;
        box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.2);
    }
    
    .chat-input-container .image-upload-btn {
        width: 44px;
        height: 44px;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(41, 128, 185, 0.15);
        border: 1px solid rgba(41, 128, 185, 0.4);
        border-radius: 8px;
        color: var(--primary-color);
        font-size: 18px;
        flex-shrink: 0;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .chat-input-container .image-upload-btn:active {
        background: rgba(41, 128, 185, 0.3);
        transform: scale(0.95);
    }
    
    .chat-input-container .game-btn {
        padding: 0 16px !important;
        height: 44px;
        font-size: 14px !important;
        font-weight: 600;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 6px;
        border-radius: 8px !important;
        flex-shrink: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, rgba(41, 128, 185, 0.8) 100%) !important;
        border: none !important;
        color: white !important;
        -webkit-tap-highlight-color: transparent;
    }
    
    .chat-input-container .game-btn:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
    
    .chat-input-container .game-btn i {
        font-size: 14px;
    }
    
    /* Ensure proper chat container height */
    .chat-container {
        height: calc(100vh - var(--header-height));
        height: calc(100dvh - var(--header-height)); /* Dynamic viewport height for iOS */
        display: flex;
        flex-direction: column;
    }
    
    #chat-mount-point {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .custom-chat-container {
        height: 100%;
        display: flex;
        flex-direction: column;
        position: relative;
        min-height: 0; /* Ensure flexbox can shrink properly */
    }
    
    /* Ensure chat input is always visible on mobile */
    .custom-chat-container .chat-input-container {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: sticky;
        bottom: 0;
        z-index: 100;
        background: rgba(5, 5, 10, 0.98);
        border-top: 1px solid rgba(41, 128, 185, 0.3);
        padding: 10px;
        flex-shrink: 0; /* Prevent input from being squished */
    }
    
    .chat-messages {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
    }
    
    /* Fix message styling on mobile */
    .str-chat__message {
        padding: 8px 10px !important;
        margin-bottom: 6px !important;
    }
    
    .str-chat__message-text {
        font-size: 14px !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Profile dropdown adjustments */
    .user-profile {
        padding: 4px 8px 4px 4px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    /* Feature buttons in sidebar */
    .feature-buttons {
        padding: 12px 8px;
    }
    
    .feature-btn {
        font-size: 11px;
        padding: 10px;
    }
    
    .feature-btn i {
        font-size: 14px;
    }
}

/* iPhone/iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    .chat-container {
        height: 100vh;
        height: -webkit-fill-available; /* Accounts for Safari's UI */
    }
    
    .custom-chat-container {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .chat-messages {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .chat-input-container {
        position: sticky !important;
        bottom: 0 !important;
        left: 0;
        right: 0;
        z-index: 1000 !important;
        background: rgba(5, 5, 10, 0.98) !important;
        padding-bottom: env(safe-area-inset-bottom, 10px) !important; /* Account for iPhone notch/home bar */
    }
    
    /* Prevent iOS zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important;
    }
    
    /* Fix for iPhone X and newer models with notch */
    @supports (padding: max(0px)) {
        .chat-input-container {
            padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
        }
    }
}