@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --background-color: #121212;
    --sidebar-bg: #000000;
    --surface-color: #181818;
    --border-color: #1db954;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-color: #1db954;
    --accent-hover: #1ed760;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
}

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


/* Track Progress Bar in Now Playing */
.track-progress {
    margin-top: 15px;
    width: 100%;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.5s linear;
    width: 0%;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Recent Tracks Styling - now using standardized base */
.recent-action-btn {
    /* Use standardized control-btn styles */
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.recent-action-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.empty-recent {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-recent p:first-child {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    display: flex;
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background: var(--sidebar-bg);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal overflow */
    border-right: 1px solid #282828;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #282828;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-section i {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.logo-section h2 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* User Profile Section */
.user-profile-section {
    padding-bottom: 20px;
    border-bottom: 1px solid #282828;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

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

.username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

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

.user-settings-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

/* User Settings Modal */
.user-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-settings-modal.show {
    opacity: 1;
}

.user-settings-content {
    background: var(--surface-color);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.user-settings-modal.show .user-settings-content {
    transform: scale(1);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.settings-header h3 {
    color: var(--text-primary);
    margin: 0;
}

.close-settings {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-settings:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.settings-body {
    padding: 20px;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.setting-group input[type="text"] {
    width: 100%;
    padding: 12px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.setting-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.avatar-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.avatar-label-row label {
    margin-bottom: 0;
}

.username-counter {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.username-counter.limit-reached {
    color: #ff6b6b;
}

.refresh-avatars-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #444;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-avatars-btn:hover:not(:disabled) {
    color: var(--text-primary);
    border-color: var(--accent-color);
    background: rgba(29, 185, 84, 0.12);
}

.refresh-avatars-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.refresh-avatars-btn i {
    transition: transform 0.5s ease;
}

.refresh-avatars-btn i.spinning {
    animation: avatar-refresh-spin 0.5s linear;
}

@keyframes avatar-refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.avatar-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.avatar-option {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.avatar-option:hover {
    border-color: var(--accent-color);
    transform: scale(1.08);
}

.avatar-option:focus-visible {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.4);
}

.avatar-option.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.3);
}

.avatar-option.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 0.55rem;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    border: 2px solid var(--surface-color);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.avatar-option:not(.loading) img {
    opacity: 1;
}

.avatar-option.loading {
    animation: avatar-pulse 1.1s ease-in-out infinite;
}

@keyframes avatar-pulse {
    0%, 100% { background: rgba(255, 255, 255, 0.06); }
    50% { background: rgba(255, 255, 255, 0.14); }
}

.save-settings-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.save-settings-btn:hover {
    background: var(--accent-hover);
}

/* Emergency Controls */
.emergency-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.emergency-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.emergency-btn.pause-btn {
    background: #ef4444;
    color: white;
}

.emergency-btn.pause-btn:hover {
    background: #dc2626;
}

.emergency-btn.resume-btn {
    background: #22c55e;
    color: white;
}

.emergency-btn.resume-btn:hover {
    background: #16a34a;
}

.emergency-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emergency-note i {
    color: var(--warning-color);
}

/* Admin list (Settings > admin panel) */
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 10px;
}

.admin-list-empty {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: #262626;
    border-radius: 6px;
}

.admin-list-row .admin-list-info {
    min-width: 0;
}

.admin-list-row .admin-list-username {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.admin-list-row .admin-list-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.admin-list-row .admin-list-remove {
    flex-shrink: 0;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: #ef4444;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
}

.admin-list-row .admin-list-remove:hover {
    background: #dc2626;
}

/* ===== STANDARDIZED SONG ITEM STYLES ===== */
/* Base song item that all contexts will inherit from */
.search-result-item,
.queue-item,
.favorite-item,
.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.search-result-item:hover,
.queue-item:hover,
.favorite-item:hover,
.recent-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

/* Song item images - standardized size and appearance */
.search-result-image,
.queue-item-image,
.favorite-item-image,
.recent-item-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    object-fit: cover;
}

/* Song item info containers */
.search-result-info,
.queue-item-info,
.favorite-item-info,
.recent-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Song titles - standardized typography */
.search-result-title,
.queue-item-title,
.favorite-item-title,
.recent-item-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

/* Song artists - standardized typography */
.search-result-artist,
.queue-item-artist,
.favorite-item-artist,
.recent-item-artist {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

/* Action buttons containers - hidden by default, appear on hover */
.search-result-actions,
.queue-item-controls,
.favorite-item-controls,
.recent-item-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    opacity: 0;
    transition: all 0.3s ease;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    z-index: 10;
}

/* Show buttons and hide text on hover */
.search-result-item:hover .search-result-actions,
.queue-item:hover .queue-item-controls,
.favorite-item:hover .favorite-item-controls,
.recent-item:hover .recent-item-controls {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.search-result-item:hover .search-result-info,
.queue-item:hover .queue-item-info,
.favorite-item:hover .favorite-item-info,
.recent-item:hover .recent-item-info {
    opacity: 0.3;
    transform: translateX(-10px);
}

/* Make song items position relative for absolute positioning of buttons */
.search-result-item,
.queue-item,
.favorite-item,
.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease !important;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

/* Standardized control buttons - all same size */
.control-btn,
.queue-control-btn,
.favorite-control-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-btn:hover,
.queue-control-btn:hover,
.favorite-control-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

/* Spotify link styling */
.spotify-link-btn {
    background: #1db954 !important;
    color: white !important;
}

.spotify-link-btn:hover {
    background: #1ed760 !important;
}

.search-result-image {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Queue Items - now inheriting standardized styles */
.queue-item.current-song {
    border: 2px solid var(--accent-color);
    background: rgba(29, 185, 84, 0.1);
}

.queue-item.current-song .queue-control-btn .fa-play {
    color: var(--accent-color);
}

/* Enhanced queue styling for position indicators */
.queue-item.next-track {
    border-left: 4px solid var(--accent-color);
    background: rgba(29, 185, 84, 0.05);
}

.queue-item.next-track .queue-item-title {
    color: var(--accent-color);
    font-weight: 600;
}

.queue-item.next-track .queue-item-artist::before {
    content: "🎵 ";
    font-size: 0.9em;
}

.queue-item.queued-track {
    border-left: 3px solid rgba(255, 255, 255, 0.1);
}

.queue-item-user {
    flex-shrink: 0;
}

.queue-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.queue-item-meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Search Section */
.backend-status.disconnected .status-indicator {
    color: var(--danger-color);
}

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

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    background: var(--surface-color);
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
    padding: 0 5px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
    z-index: 2;
    transition: color 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    background: linear-gradient(135deg, var(--surface-color) 0%, #2a2a2a 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #252525 0%, #2f2f2f 100%);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(29, 185, 84, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.search-input:focus + .search-icon {
    color: var(--accent-color);
}

.search-input::placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
    display: none;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #282828;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:first-child {
    margin-top: 8px;
}

.search-result-item:hover {
    background: #252525;
}

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

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-artist {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Special button colors for favorites */
.favorite-control-btn:has(.fa-heart),
.control-btn:has(.fa-heart) {
    color: #ff6b6b;
}

.favorite-control-btn:has(.fa-heart):hover,
.control-btn:has(.fa-heart):hover {
    background: #ff6b6b !important;
    color: white !important;
}

/* Special button colors for remove actions */
.control-btn:has(.fa-times),
.control-btn:has(.fa-heart-broken),
.queue-control-btn:has(.fa-times),
.favorite-control-btn:has(.fa-heart-broken) {
    color: var(--danger-color);
}

.control-btn:has(.fa-times):hover,
.control-btn:has(.fa-heart-broken):hover,
.queue-control-btn:has(.fa-times):hover,
.favorite-control-btn:has(.fa-heart-broken):hover {
    background: var(--danger-color) !important;
    color: white !important;
}

/* Queue Section */
.queue-section, .recent-section, .favorites-section, .listeners-section {
    margin-bottom: 30px;
}

.queue-section h3, .recent-section h3, .favorites-section h3, .listeners-section h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.queue-list, .recent-list, .favorites-list, .listeners-list {
    max-height: 300px;
    overflow-y: auto;
}

.empty-queue, .empty-favorites, .loading-listeners {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
}

.empty-queue p, .empty-favorites p, .loading-listeners p {
    margin: 5px 0;
    font-size: 14px;
}

.empty-queue p:first-child, .empty-favorites p:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden; /* Prevent overflow */
}

.queue-item:hover {
    background: #252525;
    transform: translateX(2px); /* Reduced to prevent overflow */
}

.queue-item.current-song {
    border: 2px solid var(--accent-color);
    background: rgba(29, 185, 84, 0.1);
}

.queue-item-info {
    flex: 1;
    min-width: 0; /* Allow text to shrink */
    overflow: hidden; /* Prevent text overflow */
}

.queue-item-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.queue-item-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0; /* Prevent controls from shrinking */
}

.queue-item-controls i {
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.queue-item-controls i:hover {
    color: var(--accent-color);
    background: rgba(29, 185, 84, 0.1);
}

/* Listener Items - keeping only listener-specific styles */
.listener-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-color);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.listener-item:hover {
    background: #252525;
    transform: translateX(2px);
}

.listener-avatar {
    margin-right: 12px;
    flex-shrink: 0;
}

.listener-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.listener-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.listener-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.listener-count {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* Recent item metadata */
.recent-item-meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-user {
    margin-right: 12px;
    flex-shrink: 0; /* Prevent avatar from shrinking */
}

.queue-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.queue-item-meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content {
    flex: 1;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
}

/* Enhanced Visualizer */
.visualizer-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.visualizer-canvas {
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.7; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
}

/* Central Player */
.plane-block {
    aspect-ratio: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    will-change: transform;
}

#plate {
    width: 50vh;
    height: 50vh;
    max-width: 400px;
    max-height: 400px;
    min-width: 200px;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    border: 5px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spinPlate 30s linear infinite;
    animation-play-state: paused;
    transition: box-shadow 0.08s ease-out, border-color 0.5s ease, filter 0.3s ease;
    position: relative;
    box-shadow: 0 0 50px rgba(29, 185, 84, 0.3);
    will-change: box-shadow;
}

#plate:hover {
    cursor: pointer;
    box-shadow: 
        0 0 80px rgba(29, 185, 84, 0.5),
        0 0 40px rgba(29, 185, 84, 0.3),
        inset 0 0 20px rgba(29, 185, 84, 0.1);
    filter: brightness(1.1) saturate(1.2);
}

#plate:hover::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dynamic-overlay-color, rgba(29, 185, 84, 0.15));
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

#plate::before {
    content: "";
    width: 7%;
    height: 7%;
    position: absolute;
    background: var(--background-color);
    border-radius: 50%;
    border: 2px solid var(--border-color);
    z-index: 3;
}

.plate-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

#plate:hover .plate-overlay {
    opacity: 1;
    transform: scale(1.05);
}

.play-pause-btn {
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.play-pause-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

/* Now Playing Info */
.now-playing-info {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 400px;
    max-width: 600px;
    z-index: 20;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.now-playing-info:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.song-artwork {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.artwork-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.artwork-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.song-artwork:hover .artwork-overlay {
    opacity: 1;
}

.song-artwork:hover .artwork-image {
    transform: scale(1.1);
}

.artwork-overlay i {
    color: white;
    font-size: 24px;
}

.song-details {
    flex: 1;
    min-width: 0;
}

.song-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-album {
    color: var(--text-secondary);
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    color: var(--accent-color);
    background: rgba(29, 185, 84, 0.1);
}

.action-btn.active {
    color: var(--accent-color);
}

.action-btn.favorite.active i {
    font-weight: 900;
    color: #ef4444;
}

.action-btn#spotifyBtn {
    color: #1db954;
}

.action-btn#spotifyBtn:hover {
    color: #1ed760;
    background: rgba(29, 185, 84, 0.1);
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 300px;
    font-size: 14px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Enhanced Player Controls */
.enhanced-player {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    padding: 20px 30px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 600px;
    z-index: 20;
}

.song-info {
    text-align: center;
    margin-bottom: 20px;
}

.song-info #songname {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.song-info #artistname {
    color: var(--text-secondary);
    font-size: 14px;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.control-btn.main-play {
    background: var(--accent-color);
    color: white;
    font-size: 24px;
    width: 56px;
    height: 56px;
}

.control-btn.main-play:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.control-btn.active {
    color: var(--accent-color);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.volume-control i {
    color: var(--text-secondary);
    font-size: 16px;
}

#volume {
    width: 120px;
    height: 4px;
    background: #404040;
    border-radius: 2px;
    position: relative;
}

#volume .ui-slider-range-min {
    height: 4px;
    background: var(--accent-color);
    border: none;
    border-radius: 2px;
    outline: none;
}

#volume .ui-slider-handle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    margin-left: -8px;
    margin-top: -6px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

#volume .ui-slider-handle:hover {
    transform: scale(1.2);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(29, 185, 84, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {    
    .main-content {
        width: 100%;
    }
    
    .enhanced-player {
        min-width: 90%;
    }
    
    .now-playing-info {
        min-width: 90%;
    }

        .sidebar {
        position: fixed;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }

    #plate {
        width: 40vh;
        height: 40vh;
    }
    
    .progress {
        width: 40vh;
        height: 40vh;
    }
    
    .enhanced-player {
        padding: 15px 20px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .control-btn.main-play {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .now-playing-info {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
        min-width: 90%;
    }
    
    .song-artwork {
        width: 60px;
        height: 60px;
    }
    
    .song-details {
        text-align: center;
    }
    
    .song-actions {
        justify-content: center;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.queue-list::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.queue-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.queue-list::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover,
.queue-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== ENHANCED SIDEBAR STYLES ===== */

/* Sidebar Global Text Overflow Fix */
.sidebar * {
    box-sizing: border-box;
}

.sidebar .search-results,
.sidebar .queue-list,
.sidebar .favorites-list,
.sidebar .listeners-list,
.sidebar .recent-list {
    overflow-x: hidden;
    overflow-y: visible;
    word-wrap: break-word;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin: 16px 20px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    min-height: 48px;
}

.tab-btn i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.tab-btn span {
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

.tab-btn.active i {
    transform: scale(1.1);
}

.tab-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ef4444;
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tab-badge.show {
    transform: scale(1);
}

.tab-badge.pulse {
    animation: pulse-tab-badge 2s infinite;
}

@keyframes pulse-tab-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Tab Content */
.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: flex;
}

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

.tab-header {
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
}

.tab-header h3 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.tab-header p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Section Divider */
.section-divider {
    margin: 24px 20px 16px 20px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.section-divider span {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    padding: 0 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: -6px;
    left: 0;
}

/* Recent Section in Social Tab */
.recent-section-in-social {
    margin-top: auto;
    padding-bottom: 20px;
}

/* Content Lists in Tabs */
.tab-panel .search-results,
.tab-panel .queue-list,
.tab-panel .favorites-list,
.tab-panel .listeners-list,
.tab-panel .recent-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 20px;
}

/* Search Container in Tab */
.tab-panel .search-container {
    padding-right: 20px;
}

.tab-panel .search-input-wrapper {
    position: relative;
}

.tab-panel .search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px 14px 44px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tab-panel .search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

.tab-panel .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.tab-panel .search-loader {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    display: none;
}

/* Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: none; /* Remove fixed max-height */
    min-height: 0; /* Allow shrinking */
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 20px;
    margin-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(29, 185, 84, 0.3) transparent;
    min-height: 0; /* Allow shrinking */
    max-height: calc(100vh - 350px); /* Limit height to prevent overflow */
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(29, 185, 84, 0.3);
    border-radius: 2px;
}

.chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.welcome-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 185, 84, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(29, 185, 84, 0.3);
}

.welcome-icon i {
    font-size: 28px;
    color: var(--accent-color);
}

.chat-welcome h4 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.chat-welcome p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 250px;
    margin: 0 auto;
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: slideInMessage 0.3s ease;
}

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

.chat-message.own {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

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

.chat-message.own .chat-message-content {
    text-align: right;
}

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

.chat-message.own .chat-message-header {
    justify-content: flex-end;
}

.chat-username {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-timestamp {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.chat-message-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    word-wrap: break-word;
    max-width: 220px;
}

.chat-gif-container {
    margin: 8px 0;
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-gif-only {
    margin: 0;
    max-width: 220px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: none;
    border: none;
}

.chat-message-text.gif-only {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
}

/* Emoji-only messages - larger emojis, no bubble */
.chat-message-text.emoji-only {
    background: none !important;
    border: none !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    font-size: 32px !important;
    line-height: 1.2 !important;
    max-width: none !important;
    display: block !important;
}

.chat-message .chat-gif-only {
    margin: 0 !important;
    max-width: 220px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    background: none !important;
    border: none !important;
    display: block !important;
}

/* Force right alignment for own GIF messages with maximum specificity */
.chat-message.own .chat-message-text.gif-only {
    text-align: right !important;
    display: block !important;
}

/* Force right alignment for own emoji-only messages */
.chat-message.own .chat-message-text.emoji-only {
    text-align: right !important;
    display: block !important;
}

.chat-message.own .chat-gif-only {
    margin-left: auto !important;
    margin-right: 0 !important;
    float: right !important;
    clear: both !important;
}

.chat-message.own .chat-gif-container {
    background: rgba(29, 185, 84, 0.1);
    border-color: rgba(29, 185, 84, 0.2);
}

/* New-message divider */
.chat-new-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    font-size: 11px;
    font-weight: 600;
    color: #1db954;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.chat-new-divider::before,
.chat-new-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(29, 185, 84, 0.35);
}

/* Highlight for unread messages */
.chat-message.is-new {
    background: rgba(29, 185, 84, 0.06);
    border-radius: 10px;
    padding: 4px 6px;
    margin-left: -6px;
    margin-right: -6px;
}
.chat-message.is-new .chat-message-text {
    border-color: rgba(29, 185, 84, 0.25) !important;
}

.chat-gif {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s ease;
    cursor: pointer;
    display: block;
}

.chat-gif-fullwidth {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.2s ease;
    cursor: pointer;
    display: block;
}

.chat-gif:hover,
.chat-gif-fullwidth:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chat-gif-fallback {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.chat-message.own .chat-message-text {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    margin-left: auto;
}

.chat-message.system {
    justify-content: center;
    opacity: 0.8;
}

.chat-message.system .chat-avatar {
    width: 24px;
    height: 24px;
    opacity: 0.6;
    background: #1DB954;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-message.system .chat-avatar img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.system-avatar-icon {
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.chat-message.system .chat-message-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0;
}

.chat-message.system .chat-message-text {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-style: italic;
}

.chat-input-container {
    padding: 16px 20px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0; /* Don't allow this to shrink */
    margin-top: auto; /* Push to bottom */
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.chat-extras-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
}

.chat-extras-bar .chat-status {
    margin-left: auto;
    font-size: 12px;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    resize: none;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

.send-chat-btn {
    background: var(--accent-color);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-chat-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

.send-chat-btn:active {
    transform: translateY(0);
}

.send-chat-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chat-status {
    margin-top: 8px;
    text-align: center;
}

.chat-status span {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.chat-status .connected {
    color: #22c55e;
}

.chat-status .disconnected {
    color: var(--danger-color);
}

/* Tab Navigation Updates for 6 tabs */
.tab-navigation {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin: 16px 20px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
    min-height: 40px;
}

/* User Profile Styles */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(29, 185, 84, 0.3);
}

.user-avatar-container {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
}

.user-status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border: 2px solid #000;
    border-radius: 50%;
    animation: pulse-indicator 2s infinite;
}

@keyframes pulse-indicator {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.user-info {
    flex: 1;
}

.username {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-secondary);
}

.user-status i {
    font-size: 8px;
    color: #22c55e;
    animation: pulse 1.5s infinite;
}

.user-settings-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-settings-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(29, 185, 84, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.sidebar-toggle i {
    font-size: 16px;
}

.toggle-text {
    font-family: 'Inter', sans-serif;
}

/* Enhanced Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 350px;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    border-right: 1px solid rgba(29, 185, 84, 0.2);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-sizing: border-box;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.sidebar-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(29, 185, 84, 0.3) transparent;
    box-sizing: border-box;
    width: 100%;
}

.sidebar-container::-webkit-scrollbar {
    width: 6px;
}

.sidebar-container::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-container::-webkit-scrollbar-thumb {
    background: rgba(29, 185, 84, 0.3);
    border-radius: 3px;
}

.sidebar-container::-webkit-scrollbar-thumb:hover {
    background: rgba(29, 185, 84, 0.5);
}

/* Sidebar Header */
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(29, 185, 84, 0.05);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(29, 185, 84, 0.3);
}

.logo-icon i {
    font-size: 24px;
    color: white;
    z-index: 2;
}

.logo-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: var(--accent-color);
    animation: pulse 2s infinite;
    opacity: 0.6;
}

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

.logo-text h2 {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.logo-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* User Profile Section */
.user-profile-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(29, 185, 84, 0.3);
}

.user-avatar-container {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
}

.user-status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border: 2px solid #000;
    border-radius: 50%;
    animation: pulse-indicator 2s infinite;
}

@keyframes pulse-indicator {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.user-info {
    flex: 1;
}

.username {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-secondary);
}

.user-status i {
    font-size: 8px;
    color: #22c55e;
    animation: pulse 1.5s infinite;
}

.user-settings-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-settings-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 20px;
    position: relative;
}

.section-header i {
    font-size: 16px;
    color: var(--accent-color);
    min-width: 16px;
}

.section-header h4 {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    margin: 0;
    letter-spacing: 0.5px;
}

.section-badge {
    background: var(--accent-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
}

.section-badge.pulse {
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(1); box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 4px 12px rgba(29, 185, 84, 0.5); }
    100% { transform: scale(1); box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3); }
}

/* Search Section */
.search-section {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: hidden;
}

.search-input-wrapper {
    position: relative;
    margin: 0 12px;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px 12px 40px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: calc(350px - 40px);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.search-loader {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    display: none;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.empty-icon i {
    font-size: 24px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.empty-state:hover .empty-icon {
    background: rgba(29, 185, 84, 0.1);
    border-color: rgba(29, 185, 84, 0.3);
}

.empty-state:hover .empty-icon i {
    color: var(--accent-color);
}

.empty-state p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.empty-state span {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: block;
    max-width: 220px;
    margin: 0 auto;
}

/* Content Sections */
.queue-section,
.favorites-section,
.listeners-section,
.recent-section {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: hidden;
    margin-bottom: 8px;
}

.search-section {
    padding: 20px 0 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: hidden;
    margin-bottom: 8px;
}

.recent-section {
    border-bottom: none;
    flex: 1;
    margin-bottom: 0;
    padding-bottom: 16px;
}

/* Lists Container */
.queue-list,
.favorites-list,
.listeners-list,
.recent-list,
.search-results {
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    max-height: none;
    padding-top: 12px;
    padding: 0px 16px !important;
}

/* Queue Items in Sidebar - inheriting from standardized styles */
.queue-item-user {
    flex-shrink: 0;
}

.queue-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.listener-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.listener-item.current-user {
    background: rgba(29, 185, 84, 0.1);
    border: 1px solid rgba(29, 185, 84, 0.3);
}

.listener-avatar {
    margin-right: 10px;
    flex-shrink: 0;
}

.listener-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    margin-left: auto;
}

.status-indicator.you {
    background: var(--accent-color);
}

.status-indicator.online {
    background: #22c55e;
}

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

.listener-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listener-status {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Queue item metadata */
.queue-item-meta {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.7;
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    text-align: center;
}

.loading-dots {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.loading-state p {
    margin: 0;
    font-size: 14px;
}

/* Enhanced Listeners */
.listener-item.current-user {
    background: rgba(29, 185, 84, 0.1);
    border-radius: 8px;
}

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

.listener-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #000;
}

.status-indicator.you {
    background: var(--accent-color);
}

.status-indicator.online {
    background: #22c55e;
}

.listener-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.listener-name {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.listener-status {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Loading States */
.loading-state {
    text-align: center;
    padding: 32px 20px;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out both;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.3);
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% { 
        transform: scale(0); 
        opacity: 0.5;
    }
    40% { 
        transform: scale(1); 
        opacity: 1;
    }
}

.loading-state p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.footer-stats {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    color: var(--text-secondary);
}

.stat-item i {
    font-size: 10px;
}

.stat-item span.connected {
    color: #22c55e;
}

.stat-item span.online {
    color: var(--accent-color);
}

.stat-item span.disconnected {
    color: var(--danger-color);
}

.stat-item span.offline {
    color: var(--warning-color);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        max-width: 350px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar.open .sidebar-backdrop {
        opacity: 1;
    }
    
    .main-content {
        padding-left: 0;
    }
}

@media (min-width: 1025px) {
    .mobile-only {
        display: none !important;
    }
    
    .main-content {
        margin-left: 350px;
    }
}

/* Notification Enhancements */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.notification.show {
    transform: translateX(0);
}

.notification-info {
    background: var(--accent-color);
}

.notification-error {
    background: var(--danger-color);
}

.notification-warning {
    background: var(--warning-color);
}

@media (max-width: 1024px) {
    .notification {
        top: 80px;
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* Chat Extra Buttons */
.chat-extra-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.chat-extra-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.chat-extra-btn.active {
    background: var(--accent-color);
    color: white;
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 70px;
    left: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow: hidden;
}

.emoji-picker.show {
    display: block;
    animation: slideUp 0.3s ease;
}

.emoji-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.emoji-category-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emoji-category-btn:hover,
.emoji-category-btn.active {
    background: var(--accent-color);
    transform: scale(1.1);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

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

.emoji-grid::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 2px;
}

.emoji-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    aspect-ratio: 1;
}

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

/* GIF Picker */
.gif-picker {
    position: absolute;
    bottom: 70px;
    left: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow: hidden;
}

.gif-picker.show {
    display: block;
    animation: slideUp 0.3s ease;
}

.gif-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.gif-search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
}

.gif-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.gif-search-btn {
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.gif-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.gif-category-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gif-category-btn:hover,
.gif-category-btn.active {
    background: var(--accent-color);
    color: white;
    transform: scale(1.05);
}

.gif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

.gif-grid::-webkit-scrollbar {
    width: 4px;
}

.gif-grid::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 2px;
}

.gif-item {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
    padding: 0;
}

.gif-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(29, 185, 84, 0.3);
}

.gif-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gif-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.gif-loading i {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--accent-color);
}

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

/* Mobile adjustments for chat extras */
@media (max-width: 1024px) {
    .emoji-picker,
    .gif-picker {
        left: 10px;
        right: 10px;
        bottom: 60px;
        max-height: 250px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
        max-height: 150px;
    }
    
    .gif-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        max-height: 180px;
    }
    
    .chat-extra-btn {
        width: 28px;
        height: 28px;
        margin-right: 6px;
    }
}