/*
 * Japan-A-Radio Chat System - Anime-themed Styling
 * Enhanced with anime-inspired design elements and customizable themes
 */

/* Define CSS Variables for color themes */
:root {
    /* Base colors */
    --primary-bg: #0A0E1A;
    --secondary-bg: #151D35;
    --nav-item-bg: #111530;
    --accent-blue: #3498db;
    --accent-yellow: #f1c40f;
    --accent-pink: #e84393;
    --accent-purple: #9b59b6;
    --accent-orange: #f39c12;
    --accent-green: #2ecc71;
    --button-blue: #3498db;
    --dark-blue: #1e3a73;
    --light-text: #ecf0f1;
    --medium-text: #bdc3c7;
    --dark-text: #2c3e50;

    /* Theme colors - default is Sakura */
    --theme-primary: #ff9ff3;
    --theme-secondary: #f368e0;
    --theme-background: #222f3e;
    --theme-text: #ffffff;
    --theme-accent: #ff6b81;

    /* Animation speeds */
    --transition-fast: 0.2s;
    --transition-medium: 0.3s;
    --transition-slow: 0.5s;

    /* Component sizes */
    --border-radius-small: 5px;
    --border-radius-medium: 10px;
    --border-radius-large: 15px;
    --border-radius-circle: 50%;

    /* Font sizes */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
}

/* Theme: Sakura */
[data-theme="sakura"] {
    --theme-primary: #ff9ff3;
    --theme-secondary: #f368e0;
    --theme-background: #222f3e;
    --theme-text: #ffffff;
    --theme-accent: #ff6b81;
}

/* Theme: Cyberpunk */
[data-theme="cyber"] {
    --theme-primary: #00a8ff;
    --theme-secondary: #9c88ff;
    --theme-background: #1e272e;
    --theme-text: #ffffff;
    --theme-accent: #ffa502;
}

/* Theme: Samurai */
[data-theme="samurai"] {
    --theme-primary: #e55039;
    --theme-secondary: #fa983a;
    --theme-background: #1e3799;
    --theme-text: #f5f6fa;
    --theme-accent: #eb2f06;
}

/* Theme: Mecha */
[data-theme="mecha"] {
    --theme-primary: #1e90ff;
    --theme-secondary: #3742fa;
    --theme-background: #2f3542;
    --theme-text: #ffffff;
    --theme-accent: #ff6348;
}

/* Theme: Kawaii */
[data-theme="kawaii"] {
    --theme-primary: #ff9ff3;
    --theme-secondary: #feca57;
    --theme-background: #f8a5c2;
    --theme-text: #3d3d3d;
    --theme-accent: #54a0ff;
}

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

body {
    font-family: 'Roboto', 'M PLUS Rounded 1c', Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--theme-text);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url('/images/backgrounds/anime-pattern.png');
    background-repeat: repeat;
    background-size: 200px;
    background-blend-mode: overlay;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-small);
}

::-webkit-scrollbar-thumb {
    background: var(--theme-primary);
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-secondary);
}

/* Apply anime-style font for headers */
h1, h2, h3, h4, h5, h6, .anime-font {
    font-family: 'M PLUS Rounded 1c', 'Roboto', Arial, sans-serif;
    letter-spacing: 0.5px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Chat Layout Structure */
.chat-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 500px;
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius-large);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Apply anime-style decorative elements */
.chat-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary), var(--theme-accent));
    z-index: 1;
}

/* Popup mode styles */
.popup-mode {
    margin: 0;
    padding: 0;
    border-radius: 0;
    height: 100vh;
}

.popup-mode .chat-container {
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
}

body.popup-chat-window {
    padding: 0;
    margin: 0;
    overflow: hidden;
}

body.popup-chat-window .container {
    padding: 0;
    max-width: 100%;
}

body.popup-chat-window .content-wrapper {
    display: block;
    margin: 0;
    padding: 0;
}

body.popup-chat-window .main-content {
    border-radius: 0;
    padding: 0;
}

/* Sidebar Styles */
.chat-sidebar {
    width: 280px;
    background-color: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Add anime decoration to sidebar */
.chat-sidebar::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    background-image: url('/images/decorations/kawaii-star.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

.popup-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-logo img {
    border-radius: 8px;
    transition: transform var(--transition-medium);
}

.popup-logo:hover img {
    transform: rotate(5deg);
}

.close-popup {
    background: none;
    border: none;
    color: var(--medium-text);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-circle);
    transition: all var(--transition-fast);
}

.close-popup:hover {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    transform: scale(1.1);
}

.user-info {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    background-color: rgba(0, 0, 0, 0.15);
}

.user-avatar {
    position: relative;
}

.user-avatar img {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-circle);
    object-fit: cover;
    border: 2px solid var(--theme-primary);
    transition: all var(--transition-medium);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.user-avatar:hover img {
    transform: scale(1.05);
    border-color: var(--theme-secondary);
}

.user-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: var(--border-radius-circle);
    border: 2px solid var(--secondary-bg);
}

.user-status.online {
    background-color: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}

.user-status.away {
    background-color: #f39c12;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
}

.user-status.busy {
    background-color: #e74c3c;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

.user-status.guest {
    background-color: #95a5a6;
}

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

.user-name {
    font-weight: bold;
    margin: 0;
    color: var(--theme-text);
    font-size: var(--font-size-md);
}

.user-status-text {
    font-size: var(--font-size-sm);
    color: var(--medium-text);
    margin: 2px 0 0;
}

.login-prompt {
    color: var(--theme-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-medium);
    transition: all var(--transition-fast);
}

.login-prompt:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.user-actions {
    position: relative;
}

.status-btn {
    background: none;
    border: none;
    color: #2ecc71;
    font-size: var(--font-size-xs);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-circle);
    transition: all var(--transition-fast);
    background-color: rgba(0, 0, 0, 0.1);
}

.status-btn:hover {
    background-color: rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.status-btn.away {
    color: #f39c12;
}

.status-btn.busy {
    color: #e74c3c;
}

.status-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary-bg);
    border-radius: var(--border-radius-medium);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    width: 180px;
    display: none;
    padding: 8px 0;
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-origin: top right;
    animation: scale-in 0.2s ease;
}

@keyframes scale-in {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.status-dropdown.show {
    display: block;
}

.status-dropdown::before {
    content: "";
    position: absolute;
    top: -5px;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: var(--primary-bg);
    transform: rotate(45deg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.status-dropdown a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--light-text);
    font-size: var(--font-size-sm);
    gap: 10px;
    transition: all var(--transition-fast);
}

.status-dropdown a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 20px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--border-radius-circle);
    display: inline-block;
}

.status-dot.online {
    background-color: #2ecc71;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

.status-dot.away {
    background-color: #f39c12;
    box-shadow: 0 0 5px rgba(243, 156, 18, 0.5);
}

.status-dot.busy {
    background-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

.status-dot.invisible {
    background-color: #95a5a6;
}

.rooms-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 10px;
    position: relative;
}

/* Add cute anime-style decoration to rooms list */
.rooms-list::before {
    content: "";
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    background-image: url('/images/decorations/sakura-petals.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.07;
    pointer-events: none;
}

.rooms-search {
    position: relative;
    margin-bottom: 20px;
}

.rooms-search input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border-radius: var(--border-radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--light-text);
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.rooms-search input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.rooms-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--theme-primary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.rooms-search input:focus + i {
    color: var(--theme-secondary);
}

.room-category {
    margin-bottom: 20px;
    animation: fade-in 0.5s ease;
}

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

.room-category.collapsed .category-rooms {
    display: none;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: bold;
    color: var(--medium-text);
    text-transform: uppercase;
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
}

.category-header:hover {
    color: var(--theme-text);
    background-color: rgba(255, 255, 255, 0.05);
}

.category-header i {
    transition: transform var(--transition-fast);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.room-category.collapsed .category-header i {
    transform: rotate(-90deg);
}

.category-rooms {
    margin-top: 8px;
    padding-left: 5px;
}

.room-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--border-radius-medium);
    text-decoration: none;
    color: var(--light-text);
    margin-bottom: 5px;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.room-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--theme-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 0;
}

.room-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.room-item.active {
    background-color: rgba(var(--theme-primary-rgb, 255, 159, 243), 0.15);
    border-left: 3px solid var(--theme-primary);
}

.room-item.active::before {
    opacity: 0.05;
}

.room-icon {
    width: 34px;
    height: 34px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: var(--font-size-sm);
    color: var(--theme-primary);
    flex-shrink: 0;
    transition: all var(--transition-medium);
    position: relative;
    z-index: 1;
}

.room-item:hover .room-icon {
    transform: scale(1.1);
    color: var(--theme-secondary);
}

/* Add anime-style sparkle effect to active room icon */
.room-item.active .room-icon::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: var(--theme-accent);
    border-radius: var(--border-radius-circle);
    box-shadow: 0 0 5px var(--theme-accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.room-info {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.room-name {
    display: block;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all var(--transition-fast);
    position: relative;
}

.room-item:hover .room-name {
    color: var(--theme-primary);
}

.room-description {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--medium-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    transition: all var(--transition-fast);
}

.room-item:hover .room-description {
    color: var(--light-text);
}

.room-meta {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.room-count {
    font-size: var(--font-size-xs);
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 2px 8px;
    min-width: 30px;
    text-align: center;
    transition: all var(--transition-fast);
}

.room-item:hover .room-count {
    background-color: var(--theme-primary);
    color: #fff;
}

.sidebar-footer {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar-footer a {
    color: var(--medium-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    padding: 8px;
    border-radius: var(--border-radius-small);
}

.sidebar-footer a:hover {
    color: var(--theme-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Main Chat Area */
.chat-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Add anime-style background image */
.chat-main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/backgrounds/chat-bg-pattern.png');
    background-size: 300px;
    background-repeat: repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.chat-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.room-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.room-header-icon {
    width: 42px;
    height: 42px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    color: var(--theme-primary);
    transition: all var(--transition-medium);
}

.room-header-icon:hover {
    transform: rotate(10deg);
}

.room-header-details h2 {
    margin: 0;
    font-size: var(--font-size-lg);
    color: var(--theme-text);
}

.room-header-details p {
    margin: 5px 0 0;
    font-size: var(--font-size-sm);
    color: var(--medium-text);
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-header-actions {
    display: flex;
    gap: 10px;
}

.room-header-actions button {
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: var(--border-radius-small);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.room-header-actions button:hover {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--theme-primary);
    transform: translateY(-2px);
}

.room-header-actions button:active {
    transform: translateY(0);
}

.users-count {
    background-color: rgba(var(--theme-primary-rgb, 255, 159, 243), 0.2);
    color: var(--theme-primary);
    border-radius: 10px;
    font-size: var(--font-size-xs);
    padding: 2px 5px;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    text-align: center;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.chat-welcome {
    margin: 40px auto;
    text-align: center;
    max-width: 500px;
    background-color: rgba(var(--theme-primary-rgb, 255, 159, 243), 0.05);
    padding: 30px;
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(var(--theme-primary-rgb, 255, 159, 243), 0.1);
    position: relative;
    animation: float 6s ease-in-out infinite;
}

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

/* Add anime-style decoration to welcome message */
.chat-welcome::before,
.chat-welcome::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('/images/decorations/anime-star.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
}

.chat-welcome::before {
    top: -20px;
    left: -20px;
    transform: rotate(-15deg);
    animation: rotate-star 10s linear infinite;
}

.chat-welcome::after {
    bottom: -20px;
    right: -20px;
    transform: rotate(15deg);
    animation: rotate-star 12s linear infinite reverse;
}

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

.welcome-icon {
    font-size: var(--font-size-2xl);
    color: var(--theme-primary);
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
}

.welcome-icon i {
    position: relative;
    z-index: 1;
}

.welcome-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(var(--theme-primary-rgb, 255, 159, 243), 0.1);
    border-radius: var(--border-radius-circle);
    z-index: 0;
}

.chat-welcome h3 {
    margin: 0 0 10px;
    color: var(--theme-primary);
    font-size: var(--font-size-xl);
}

.welcome-login-prompt {
    margin-top: 20px;
    font-size: var(--font-size-sm);
    color: var(--medium-text);
    background-color: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: var(--border-radius-medium);
}

.welcome-login-prompt a {
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: bold;
    transition: all var(--transition-fast);
}

.welcome-login-prompt a:hover {
    color: var(--theme-secondary);
    text-decoration: underline;
}

.message-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: message-fade-in 0.5s ease;
}

@keyframes message-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-date-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 10px;
    position: relative;
}

.message-date-divider::before,
.message-date-divider::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}

.message-date-divider span {
    padding: 0 15px;
    color: var(--medium-text);
    font-size: var(--font-size-sm);
    background-color: var(--secondary-bg);
    position: relative;
    z-index: 1;
}

/* Add cute anime-style date indicator */
.message-date-divider span::before,
.message-date-divider span::after {
    content: "❀";
    color: var(--theme-primary);
    opacity: 0.5;
    margin: 0 5px;
    font-size: 0.7em;
    vertical-align: middle;
}

.chat-message {
    display: flex;
    margin-bottom: 15px;
    animation: message-slide-in 0.3s ease;
    position: relative;
}

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

.chat-message.pending {
    opacity: 0.7;
}

.chat-message.own-message {
    flex-direction: row-reverse;
    animation: own-message-slide-in 0.3s ease;
}

@keyframes own-message-slide-in {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.chat-message.own-message .message-avatar {
    margin-right: 0;
    margin-left: 12px;
}

.chat-message.own-message .message-content {
    background-color: rgba(var(--theme-primary-rgb, 52, 152, 219), 0.15);
    border-radius: 18px 18px 4px 18px;
}

.message-avatar {
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
}

.message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-circle);
    object-fit: cover;
    border: 2px solid transparent;
    transition: all var(--transition-medium);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.chat-message:hover .message-avatar img {
    border-color: var(--theme-primary);
}

/* Add anime-style hover effect to avatars */
.message-avatar::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: var(--border-radius-circle);
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-secondary), var(--theme-accent));
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.chat-message:hover .message-avatar::after {
    opacity: 0.7;
}

.message-content {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px 18px 18px 18px;
    padding: 12px 15px;
    max-width: 80%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.message-username {
    font-weight: bold;
    font-size: var(--font-size-sm);
    color: var(--theme-primary);
}

.message-time {
    font-size: var(--font-size-xs);
    color: var(--medium-text);
}

.message-text {
    line-height: 1.5;
    word-break: break-word;
    font-size: var(--font-size-md);
}

.message-text a {
    color: var(--theme-primary);
    text-decoration: none;
    position: relative;
    padding-bottom: 1px;
}

.message-text a:hover {
    color: var(--theme-secondary);
}

.message-text a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--theme-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-fast);
}

.message-text a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.system-message {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-medium);
    width: fit-content;
    margin: 10px auto;
    max-width: 80%;
    animation: system-message-fade-in 0.5s ease;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

@keyframes system-message-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.system-icon {
    color: var(--theme-accent);
    margin-right: 10px;
}

.system-text {
    font-size: var(--font-size-sm);
    color: var(--medium-text);
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.chat-input-container {
    display: flex;
    align-items: flex-end;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-large);
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color var(--transition-fast);
}

.chat-input-container:focus-within {
    border-color: var(--theme-primary);
}

.chat-input-actions {
    display: flex;
    gap: 12px;
    margin-right: 12px;
}

.chat-input-actions button {
    background: none;
    border: none;
    color: var(--medium-text);
    font-size: var(--font-size-lg);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-circle);
    transition: all var(--transition-fast);
    background-color: rgba(255, 255, 255, 0.05);
}

.chat-input-actions button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--theme-primary);
    transform: translateY(-2px);
}

.chat-input-actions button:active {
    transform: translateY(0);
}

.chat-input-wrapper {
    flex-grow: 1;
}

.chat-input-field {
    width: 100%;
    min-height: 40px;
    max-height: 120px;
    background: none;
    border: none;
    color: var(--light-text);
    font-family: inherit;
    font-size: var(--font-size-md);
    resize: none;
    padding: 0;
    outline: none !important;
    line-height: 1.5;
}

.chat-input-field::placeholder {
    color: var(--medium-text);
}

.chat-input-submit {
    margin-left: 12px;
}

.btn-send {
    background-color: var(--theme-primary);
    border: none;
    border-radius: var(--border-radius-circle);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text);
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.btn-send:hover {
    background-color: var(--theme-secondary);
    transform: translateY(-2px);
}

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

/* Add anime-style ripple effect to send button */
.btn-send::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s, opacity 0.5s;
}

.btn-send:active::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: 0s;
}

.guest-chat-prompt {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-large);
    padding: 15px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    position: relative;
}

.guest-chat-prompt::before,
.guest-chat-prompt::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url('/images/decorations/kawaii-lock.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
}

.guest-chat-prompt::before {
    top: -15px;
    left: 20px;
    transform: rotate(-15deg);
}

.guest-chat-prompt::after {
    bottom: -15px;
    right: 20px;
    transform: rotate(15deg);
}

.guest-chat-prompt p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.guest-chat-prompt a {
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: bold;
    transition: all var(--transition-fast);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: var(--border-radius-small);
}

.guest-chat-prompt a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--theme-secondary);
}

/* Users Sidebar */
.chat-users-sidebar {
    position: absolute;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: var(--primary-bg);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: right var(--transition-medium) ease;
    display: flex;
    flex-direction: column;
    border-radius: 0 var(--border-radius-large) var(--border-radius-large) 0;
}

.chat-users-sidebar.active {
    right: 0;
}

.users-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

.users-sidebar-header h3 {
    margin: 0;
    font-size: var(--font-size-md);
    color: var(--theme-primary);
    position: relative;
    display: inline-block;
}

/* Add anime-style underline to users header */
.users-sidebar-header h3::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--theme-primary), transparent);
}

.close-users-sidebar {
    background: none;
    border: none;
    color: var(--medium-text);
    font-size: var(--font-size-md);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-circle);
    transition: all var(--transition-fast);
}

.close-users-sidebar:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--theme-primary);
}

.users-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
}

.users-category {
    margin-bottom: 25px;
    animation: fade-in 0.5s ease;
    position: relative;
}

.users-category::before {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.users-category h4 {
    margin: 0 0 12px 0;
    font-size: var(--font-size-sm);
    color: var(--theme-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.users-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--border-radius-medium);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.user-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: rgba(var(--theme-primary-rgb, 255, 159, 243), 0.1);
    transition: width var(--transition-fast);
}

.user-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.user-item:hover::before {
    width: 100%;
}

.user-avatar-small {
    position: relative;
    margin-right: 12px;
    z-index: 1;
}

.user-avatar-small img {
    width: 34px;
    height: 34px;
    border-radius: var(--border-radius-circle);
    object-fit: cover;
    border: 2px solid transparent;
    transition: all var(--transition-medium);
}

.user-item:hover .user-avatar-small img {
    border-color: var(--theme-primary);
}

.user-badge {
    font-size: var(--font-size-xs);
    background-color: rgba(var(--theme-primary-rgb, 255, 159, 243), 0.2);
    color: var(--theme-primary);
    border-radius: 10px;
    padding: 2px 8px;
    margin-left: 8px;
    position: relative;
    z-index: 1;
}

/* Connection Status */
.connection-status {
    padding: 8px 15px;
    border-radius: var(--border-radius-medium);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: var(--font-size-sm);
    animation: slide-down 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.connection-status::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to { left: 100%; }
}

.connection-status.connected {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-left: 3px solid #2ecc71;
}

.connection-status.disconnected {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-left: 3px solid #e74c3c;
}

.connection-status.hiding {
    animation: fade-out 0.5s ease forwards;
}

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

/* Error Message */
.chat-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slide-down 0.3s ease;
    border-radius: 0 var(--border-radius-medium) var(--border-radius-medium) 0;
}

.chat-error.hiding {
    animation: fade-out 0.5s ease forwards;
}

.error-icon {
    color: #e74c3c;
}

.error-message {
    flex-grow: 1;
    font-size: var(--font-size-sm);
}

.error-close {
    background: none;
    border: none;
    color: var(--medium-text);
    font-size: var(--font-size-sm);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-circle);
    transition: all var(--transition-fast);
}

.error-close:hover {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Connection Error Message */
.connection-error-message {
    background-color: rgba(231, 76, 60, 0.05);
    border-radius: var(--border-radius-large);
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
    animation: bounce-in 0.5s ease;
    border: 1px dashed rgba(231, 76, 60, 0.3);
    position: relative;
}

@keyframes bounce-in {
    0% { transform: scale(0.9); opacity: 0; }
    70% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Add anime-style decoration to error message */
.connection-error-message::before,
.connection-error-message::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('/images/decorations/anime-sweat.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
}

.connection-error-message::before {
    top: -20px;
    left: 20px;
    transform: rotate(-15deg);
}

.connection-error-message::after {
    bottom: -20px;
    right: 20px;
    transform: rotate(15deg);
}

.connection-error-message .error-icon {
    font-size: var(--font-size-2xl);
    color: #e74c3c;
    margin-bottom: 20px;
    display: inline-block;
    position: relative;
}

.connection-error-message .error-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: var(--border-radius-circle);
    z-index: -1;
}

.connection-error-message h3 {
    margin: 0 0 15px 0;
    color: #e74c3c;
    font-size: var(--font-size-xl);
}

.connection-error-message p {
    margin: 0 0 25px 0;
    color: var(--medium-text);
}

.btn-reconnect {
    background-color: var(--theme-primary);
    border: none;
    border-radius: var(--border-radius-medium);
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.btn-reconnect:hover {
    background-color: var(--theme-secondary);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(var(--theme-primary-rgb, 255, 159, 243), 0.3);
}

.btn-reconnect:active {
    transform: translateY(-1px);
}

.btn-reconnect::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s, opacity 0.5s;
}

.btn-reconnect:active::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: 0s;
}

.btn-reconnect:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Notification Prompt */
.notification-prompt {
    background-color: rgba(var(--theme-primary-rgb, 52, 152, 219), 0.1);
    border-left: 3px solid var(--theme-primary);
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slide-down 0.3s ease;
    border-radius: 0 var(--border-radius-medium) var(--border-radius-medium) 0;
    position: relative;
}

/* Add anime-style notification icon */
.notification-prompt::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background-color: var(--theme-primary);
    border-radius: var(--border-radius-circle);
    animation: notification-ping 2s infinite;
}

@keyframes notification-ping {
    0% { transform: scale(1); opacity: 1; }
    70% { transform: scale(2); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.notification-icon {
    color: var(--theme-primary);
    font-size: var(--font-size-lg);
    animation: bell-shake 3s infinite;
}

@keyframes bell-shake {
    0%, 50%, 100% { transform: rotate(0); }
    5%, 15%, 25%, 35%, 45% { transform: rotate(10deg); }
    10%, 20%, 30%, 40% { transform: rotate(-10deg); }
}

.notification-message {
    flex-grow: 1;
}

.notification-message p {
    margin: 0;
    font-size: var(--font-size-sm);
}

.notification-actions {
    display: flex;
    gap: 10px;
}

.btn-enable-notifications {
    background-color: var(--theme-primary);
    border: none;
    border-radius: var(--border-radius-small);
    padding: 8px 15px;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
    position: relative;
    overflow: hidden;
}

.btn-enable-notifications:hover {
    background-color: var(--theme-secondary);
    transform: translateY(-2px);
}

.btn-enable-notifications:active {
    transform: translateY(0);
}

.btn-enable-notifications::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s, opacity 0.5s;
}

.btn-enable-notifications:active::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: 0s;
}

.btn-dismiss {
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: var(--border-radius-small);
    padding: 8px 15px;
    color: var(--medium-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
}

.btn-dismiss:hover {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--light-text);
}

/* To Top Button */
.to-top-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-circle);
    background-color: var(--theme-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: bounce-in 0.3s ease;
    z-index: 5;
    transition: all var(--transition-medium);
}

.to-top-button:hover {
    background-color: var(--theme-secondary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(var(--theme-primary-rgb, 255, 159, 243), 0.3);
}

.to-top-button:active {
    transform: translateY(-1px);
}

/* Emoji Picker */
.emoji-picker {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius-large);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 350px;
    height: 350px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: scale-in 0.3s ease;
}

.emoji-picker.show {
    display: flex;
}

.emoji-tabs {
    display: flex;
    overflow-x: auto;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

.emoji-tab {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    cursor: pointer;
    white-space: nowrap;
    color: var(--medium-text);
    transition: all var(--transition-fast);
    margin-right: 8px;
}

.emoji-tab:hover, .emoji-tab.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--theme-primary);
}

.emoji-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
}

.emoji-category {
    margin-bottom: 20px;
}

.emoji-category h4 {
    margin: 0 0 10px 0;
    font-size: var(--font-size-sm);
    color: var(--theme-primary);
    position: relative;
    display: inline-block;
}

.emoji-category h4::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--theme-primary), transparent);
}

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

.emoji-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    cursor: pointer;
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
    background-color: rgba(0, 0, 0, 0.1);
}

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

/* Room Info Modal Content */
.room-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.room-info-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.room-info-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: var(--theme-primary);
    position: relative;
}

/* Add anime-style decoration to room info icon */
.room-info-icon::after {
    content: "";
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background-image: url('/images/decorations/anime-sparkle.png');
    background-size: contain;
    background-repeat: no-repeat;
    animation: spin 10s linear infinite;
}

.room-info-title {
    flex-grow: 1;
}

.room-info-title h3 {
    margin: 0;
    font-size: var(--font-size-xl);
    color: var(--theme-primary);
}

.room-info-category {
    color: var(--medium-text);
    font-size: var(--font-size-sm);
    margin: 5px 0 0 0;
}

.room-info-description h4 {
    margin: 0 0 10px 0;
    font-size: var(--font-size-md);
    color: var(--theme-accent);
}

.room-info-description p {
    margin: 0;
    line-height: 1.6;
    font-size: var(--font-size-md);
}

.room-info-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.stat-item {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-medium);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

.stat-item:hover {
    border-color: var(--theme-primary);
    transform: translateY(-3px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(var(--theme-primary-rgb, 52, 152, 219), 0.1);
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
    font-size: var(--font-size-xl);
}

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: var(--theme-text);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--medium-text);
}

.room-info-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.room-info-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius-medium);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all var(--transition-medium);
    font-size: var(--font-size-sm);
    font-weight: bold;
}

.btn-share-room {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--theme-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-share-room:hover {
    background-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.btn-room-settings {
    background-color: rgba(var(--theme-primary-rgb, 52, 152, 219), 0.1);
    color: var(--theme-primary);
    border: 1px solid rgba(var(--theme-primary-rgb, 52, 152, 219), 0.2);
}

.btn-room-settings:hover {
    background-color: rgba(var(--theme-primary-rgb, 52, 152, 219), 0.2);
    transform: translateY(-2px);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity var(--transition-medium);
}

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

.loading-mascot {
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
    animation: bounce 2s ease infinite;
}

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

.loading-text {
    font-size: var(--font-size-xl);
    margin-bottom: 20px;
    color: var(--theme-primary);
    font-weight: bold;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: 20px;
}

.loading-spinner::before,
.loading-spinner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: var(--theme-primary);
    border-bottom-color: var(--theme-secondary);
    animation: spin 1.5s linear infinite;
}

.loading-spinner::before {
    border-left-color: var(--theme-accent);
    animation-delay: 0.2s;
}

.loading-subtext {
    font-size: var(--font-size-sm);
    color: var(--medium-text);
    max-width: 300px;
    text-align: center;
}

/* Bot Message Styles */
.bot-message {
    background-color: rgba(var(--theme-primary-rgb, 52, 152, 219), 0.08);
    border-left: 3px solid var(--theme-primary);
    position: relative;
}

.bot-message::before {
    content: "BOT";
    position: absolute;
    top: -8px;
    right: 10px;
    background-color: var(--theme-primary);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
}

.bot-message .message-username {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bot-message .message-username::after {
    content: "🤖";
    font-size: 12px;
}

/* Anime Character Message Styles */
.character-message {
    position: relative;
    overflow: visible;
}

.character-message::before {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 20px;
    width: 40px;
    height: 20px;
    background-image: url('/images/decorations/speech-tail.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
}

.character-avatar {
    position: relative;
}

.character-avatar img {
    border: 2px solid var(--theme-accent);
    box-shadow: 0 0 10px rgba(var(--theme-accent-rgb, 255, 107, 129), 0.3);
}

/* Character Types */
.character-idol .message-content {
    background-color: rgba(var(--theme-primary-rgb, 255, 159, 243), 0.1);
    border-left: 3px solid #39c5bb;
}

.character-mentor .message-content {
    background-color: rgba(61, 61, 61, 0.1);
    border-left: 3px solid #3d3d3d;
}

.character-cute .message-content {
    background-color: rgba(255, 107, 107, 0.1);
    border-left: 3px solid #ff6b6b;
}

.character-warrior .message-content {
    background-color: rgba(192, 57, 43, 0.1);
    border-left: 3px solid #c0392b;
}

.character-catgirl .message-content {
    background-color: rgba(243, 156, 18, 0.1);
    border-left: 3px solid #f39c12;
}

/* Special Message Effects */
.message-effect-sparkle .message-content {
    position: relative;
    overflow: hidden;
}

.message-effect-sparkle .message-content::before {
    content: "✨";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    opacity: 0.7;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.message-effect-love .message-content {
    position: relative;
    overflow: hidden;
}

.message-effect-love .message-content::before {
    content: "❤️";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    opacity: 0.7;
    animation: heartbeat 1s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.message-effect-music .message-content {
    position: relative;
    overflow: hidden;
}

.message-effect-music .message-content::before {
    content: "🎵";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    opacity: 0.7;
    animation: floating 2s infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(10deg); }
}

/* Voice Clip Styling */
.voice-clip-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    margin-top: 8px;
    width: fit-content;
}

.voice-clip-btn {
    background-color: var(--theme-primary);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-clip-btn:hover {
    background-color: var(--theme-secondary);
    transform: scale(1.1);
}

.voice-clip-btn.playing {
    animation: pulsate 1s infinite;
}

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

.voice-clip-waveform {
    height: 20px;
    width: 100px;
    background-image: url('/images/decorations/waveform.png');
    background-size: cover;
    background-repeat: no-repeat;
}

.voice-clip-duration {
    font-size: var(--font-size-xs);
    color: var(--medium-text);
}

/* Battle Card Styling */
.battle-card {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius-medium);
    padding: 10px;
    margin-top: 10px;
    width: 200px;
    border: 1px solid rgba(var(--theme-primary-rgb, 255, 159, 243), 0.2);
    position: relative;
    overflow: hidden;
}

.battle-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary));
    z-index: 1;
}

.battle-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.battle-card-name {
    font-weight: bold;
    font-size: var(--font-size-sm);
    color: var(--theme-primary);
}

.battle-card-level {
    background-color: var(--theme-primary);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
}

.battle-card-image {
    width: 100%;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    margin-bottom: 5px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.battle-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    font-size: var(--font-size-xs);
}

.battle-card-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.battle-card-stat-name {
    color: var(--medium-text);
}

.battle-card-stat-value {
    font-weight: bold;
    color: var(--theme-accent);
}

.battle-card-element {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 200px 1fr 250px;
    }

    .chat-container {
        height: calc(100vh - 180px);
    }
}

@media (max-width: 992px) {
    .chat-container {
        flex-direction: column;
        height: auto;
        min-height: 0;
    }

    .chat-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .rooms-list {
        max-height: 300px;
    }

    .chat-main {
        height: 500px;
    }

    .chat-users-sidebar {
        width: 100%;
        height: 100%;
        right: -100%;
    }

    .room-info-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .chat-room-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .room-header-actions {
        align-self: flex-end;
    }

    .notification-prompt {
        flex-direction: column;
        align-items: flex-start;
    }

    .notification-actions {
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }

    .emoji-picker {
        width: calc(100% - 40px);
        left: 20px;
    }

    .battle-card {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .chat-input-container {
        flex-wrap: wrap;
    }

    .chat-input-actions {
        width: 100%;
        margin-bottom: 10px;
    }

    .room-info-actions {
        flex-direction: column;
        gap: 10px;
    }

    .room-info-actions button {
        width: 100%;
        justify-content: center;
    }

    .message-content {
        max-width: 90%;
    }
}

/* Animation for page transitions */
@keyframes page-transition-in {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.page-transition {
    animation: page-transition-in 0.5s ease;
}