/* Teenz Tunez Chat - Graffiti Style */

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

:root {
    --neon-pink: #ff006e;
    --neon-blue: #00f5ff;
    --neon-purple: #8b00ff;
    --neon-green: #39ff14;
    --neon-yellow: #ffff00;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
}

/* These styles only apply when chat is standalone (not in main site) */
body.chat-standalone {
    font-family: 'Righteous', cursive;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    /* iOS Safari viewport fix - allows URL bar to hide */
    height: -webkit-fill-available;
}

.graffiti-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 110, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 245, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 0, 255, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

/* Chat Container */
.chat-container {
    max-width: 1400px;
    height: 100vh;
    /* iOS Safari viewport fix - allows URL bar to hide */
    height: -webkit-fill-available;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    padding-top: 120px; /* Account for navbar (80px) + sticky player (100px) on desktop */
    box-sizing: border-box;
}

/* Rules Modal */
.rules-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.rules-modal-content {
    background: var(--card-bg);
    border: 3px solid var(--neon-pink);
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.5);
    animation: slideIn 0.3s ease-out;
}

.rules-modal-content::-webkit-scrollbar {
    width: 10px;
}

.rules-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.rules-modal-content::-webkit-scrollbar-thumb {
    background: var(--neon-pink);
    border-radius: 5px;
}

.rules-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

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

.rules-header {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    padding: 1.5rem;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.rules-header h2 {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.rules-header p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.rules-body {
    padding: 1.5rem;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.rule-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.rule-text {
    flex: 1;
}

.rule-text strong {
    display: block;
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    color: var(--neon-blue);
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.rule-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.rules-footer {
    padding: 1.5rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 12px 12px;
}

.rules-warning {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: #ffd60a;
    font-weight: bold;
}

.accept-btn {
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-purple));
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.5);
}

.accept-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.8);
}

/* Online Users Modal */
.online-users-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.online-users-content {
    background: var(--card-bg);
    border: 3px solid var(--neon-green);
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.5);
    animation: slideIn 0.3s ease-out;
}

.online-users-header {
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    padding: 1.5rem;
    text-align: center;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.online-users-header h2 {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal-btn:hover {
    background: var(--neon-pink);
    border-color: var(--neon-pink);
    transform: rotate(90deg);
}

.online-users-body {
    padding: 1.5rem;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.online-users-body::-webkit-scrollbar {
    width: 10px;
}

.online-users-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.online-users-body::-webkit-scrollbar-thumb {
    background: var(--neon-green);
    border-radius: 5px;
}

.online-users-body::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

.online-user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(57, 255, 20, 0.1);
    border: 2px solid var(--neon-green);
    border-radius: 10px;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.online-user-item:hover {
    background: rgba(57, 255, 20, 0.2);
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.online-user-avatar {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border: 2px solid var(--neon-blue);
}

.online-user-info {
    flex: 1;
}

.online-user-nickname {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--neon-blue);
    margin-bottom: 0.3rem;
}

.online-user-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.no-users-message {
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Chat Header */
.chat-header {
    background: var(--card-bg);
    border: 3px solid var(--neon-pink);
    border-radius: 15px 15px 0 0;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
    position: relative;
    z-index: 100;
}

.chat-title {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
}

.online-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(57, 255, 20, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid var(--neon-green);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.online-count:hover {
    background: rgba(57, 255, 20, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.online-dot {
    width: 10px;
    height: 10px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Nickname Setup */
.nickname-setup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.nickname-card {
    background: var(--card-bg);
    border: 3px solid var(--neon-pink);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.5);
}

.nickname-card h2 {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--neon-pink);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.nickname-card input {
    width: 100%;
    padding: 1rem;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    font-family: 'Righteous', cursive;
    text-align: center;
}

.nickname-card input:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-purple));
    border: none;
    border-radius: 50px;
    color: white;
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.5);
}

.primary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.8);
}

.hint {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Chat Main */
.chat-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1rem;
    flex: 1;
    overflow: hidden;
    box-sizing: border-box;
}

/* Sidebar */
.chat-sidebar {
    background: var(--card-bg);
    border: 3px solid var(--neon-blue);
    border-radius: 0 0 0 15px;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.user-info {
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.user-avatar {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.user-nickname {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--neon-blue);
    margin-bottom: 0.5rem;
}

.user-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.change-btn {
    padding: 0.4rem 1rem;
    background: transparent;
    border: 2px solid var(--neon-pink);
    border-radius: 15px;
    color: var(--neon-pink);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-btn:hover {
    background: var(--neon-pink);
    color: var(--dark-bg);
}

.logout-btn {
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 2px solid var(--neon-pink);
    border-radius: 15px;
    color: var(--neon-pink);
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.logout-btn:hover {
    background: var(--neon-pink);
    color: var(--dark-bg);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
}

/* Avatar Selector */
.avatar-selector {
    background: rgba(255, 0, 110, 0.1);
    border: 2px solid var(--neon-pink);
    border-radius: 10px;
    padding: 0.5rem;
}

.avatar-selector h3 {
    font-family: 'Bangers', cursive;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 1px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    max-width: 100%;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.avatar-option {
    font-size: 2rem;
    text-align: center;
    padding: 0.3rem;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.avatar-option:hover {
    background: var(--neon-pink);
    border-color: var(--neon-pink);
    transform: scale(1.2);
}

.avatar-option.selected {
    background: var(--neon-blue);
    border-color: var(--neon-blue);
}

/* Text Style Settings in Sidebar */
.text-style-settings {
    background: rgba(0, 191, 255, 0.1);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.text-style-settings h3 {
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    letter-spacing: 1px;
    text-align: center;
}

.style-setting {
    margin-bottom: 1rem;
}

.style-setting label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--neon-blue);
    font-weight: bold;
}

.style-select {
    width: 100%;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--neon-blue);
    border-radius: 8px;
    color: white;
    font-family: 'Righteous', cursive;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-select:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.3);
}

.style-select option {
    background: var(--dark-bg);
    color: white;
}

.style-select option[value="Bangers"] {
    font-family: 'Bangers', cursive;
}

.style-select option[value="Permanent Marker"] {
    font-family: 'Permanent Marker', cursive;
}

.style-select option[value="Righteous"] {
    font-family: 'Righteous', cursive;
}

.style-select option[value="Comic Sans MS"] {
    font-family: 'Comic Sans MS', cursive;
}

.style-select option[value="Courier New"] {
    font-family: 'Courier New', monospace;
}

.sidebar-color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.sidebar-color-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.sidebar-color-item:hover {
    transform: scale(1.1);
    border-color: white;
    box-shadow: 0 0 15px currentColor;
}

.sidebar-color-item.selected {
    border-color: white;
    box-shadow: 0 0 20px currentColor;
    transform: scale(1.05);
}

.style-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--neon-pink);
    border-radius: 8px;
    text-align: center;
}

.style-preview span {
    font-size: 1.1rem;
    font-weight: bold;
}

.chat-rules {
    background: rgba(255, 0, 110, 0.1);
    border: 2px solid var(--neon-pink);
    border-radius: 10px;
    padding: 1rem;
}

.chat-rules h3 {
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.chat-rules ul {
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.8;
}

.stats {
    background: rgba(139, 0, 255, 0.1);
    border: 2px solid var(--neon-purple);
    border-radius: 10px;
    padding: 1rem;
}

.stats h3 {
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.stat-item span:last-child {
    color: var(--neon-green);
    font-weight: bold;
}

/* Messages */
.chat-content {
    background: var(--card-bg);
    border: 3px solid var(--neon-pink);
    border-radius: 0 0 15px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.welcome-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid var(--neon-blue);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

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

.message:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.message.own-message {
    border-left-color: var(--neon-pink);
    background: rgba(255, 0, 110, 0.05);
}

.message-avatar {
    font-size: 2rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

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

.message-nickname {
    font-weight: bold;
    color: var(--neon-blue);
}

.message.own-message .message-nickname {
    color: var(--neon-pink);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.message-text {
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
}

.system-message {
    text-align: center;
    padding: 0.5rem;
    color: var(--neon-yellow);
    font-size: 0.9rem;
    background: rgba(255, 255, 0, 0.05);
    border-radius: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Input Area */
.chat-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--neon-pink);
    position: relative;
}

.emoji-picker-trigger {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.emoji-picker-trigger:hover {
    background: var(--neon-blue);
    transform: scale(1.1);
}

#messageInput {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    color: white;
    font-family: 'Righteous', cursive;
    font-size: 1rem;
}

#messageInput:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.3);
}

.send-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-purple));
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 0, 110, 0.8);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 70px;
    left: 1rem;
    background: var(--card-bg);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.emoji-item {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.emoji-item:hover {
    background: var(--neon-pink);
    transform: scale(1.2);
}

.char-counter {
    position: absolute;
    top: -25px;
    right: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar,
.chat-sidebar::-webkit-scrollbar,
.avatar-grid::-webkit-scrollbar,
.emoji-grid::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track,
.chat-sidebar::-webkit-scrollbar-track,
.avatar-grid::-webkit-scrollbar-track,
.emoji-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb,
.chat-sidebar::-webkit-scrollbar-thumb,
.avatar-grid::-webkit-scrollbar-thumb,
.emoji-grid::-webkit-scrollbar-thumb {
    background: var(--neon-pink);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover,
.chat-sidebar::-webkit-scrollbar-thumb:hover,
.avatar-grid::-webkit-scrollbar-thumb:hover,
.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 968px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Extra bottom padding on mobile for browser bars */
    .chat-input-container {
        padding-bottom: calc(1rem + 120px) !important;
        margin-bottom: 0;
    }
    
    /* Top margin for mobile when navbar is hidden (chat page only) */
    .chat-container {
        padding: 0 !important;
        margin-top: 100px !important; /* Will be adjusted by JavaScript when on non-chat pages */
    }
    
    .chat-header {
        padding: 0.8rem 1rem !important;
        margin: 0 !important;
    }
    
    .chat-main {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .chat-main {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        background: var(--card-bg);
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        border-right: 3px solid var(--neon-pink);
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
        padding-top: 100px; /* Same as chat container mobile margin - account for sticky player */
    }

    .chat-sidebar.active {
        left: 0;
    }

    .chat-title {
        font-size: 1.8rem;
    }

    .online-count {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

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

    .emoji-picker {
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
    }

    .emoji-picker-trigger {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 600px) {
    .chat-container {
        padding: 0.5rem;
    }

    .chat-title {
        font-size: 1.5rem;
    }

    .chat-input-container {
        padding: 0.8rem;
    }

    .send-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .emoji-picker-trigger {
        width: 40px;
        height: 40px;
    }

    .text-style-settings {
        padding: 0.8rem;
    }

    .text-style-settings h3 {
        font-size: 1rem;
    }

    .style-select {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .sidebar-color-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .style-preview {
        padding: 0.8rem;
    }

    .style-preview span {
        font-size: 1rem;
    }

    #messageInput {
        font-size: 0.95rem;
        padding: 0.9rem;
    }

    /* Rules Modal Mobile */
    .rules-modal {
        padding: 0.5rem;
    }

    .rules-modal-content {
        max-height: 95vh;
    }

    .rules-header h2 {
        font-size: 1.5rem;
    }

    .rules-header p {
        font-size: 0.9rem;
    }

    .rules-body {
        padding: 1rem;
    }

    .rule-item {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }

    .rule-icon {
        font-size: 1.5rem;
    }

    .rule-text strong {
        font-size: 1rem;
    }

    .rule-text p {
        font-size: 0.85rem;
    }

    .rules-footer {
        padding: 1rem;
    }

    .rules-warning {
        font-size: 0.85rem;
    }

    .accept-btn {
        padding: 0.9rem 2rem;
        font-size: 1.1rem;
    }
}

