/* styles.css - NiamChat Complete Stylesheet */
:root {
    /* Default theme (Seaside) */
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --background-color: #f0f9ff;
    --surface-color: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #cbd5e1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #8b5cf6, #7c3aed);
    --user-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

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

/* Chat Layout */
.chat-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--user-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--user-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    position: relative;
}

.online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: var(--success-color);
    border: 2px solid var(--surface-color);
    border-radius: 50%;
}

.user-details {
    flex: 1;
}

.username {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chat Rooms */
.chat-rooms {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.room-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.room-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.room-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary-color);
}

.room-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.room-name {
    flex: 1;
    font-weight: 500;
}

.room-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Online Users */
.online-users {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.online-users-title {
    padding: 0 20px 15px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    transition: var(--transition);
}

.user-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.user-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--user-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    position: relative;
}

.user-item-name {
    flex: 1;
    font-size: 0.95rem;
}

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

.typing-indicator {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-style: italic;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.sidebar-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.sidebar-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sidebar-btn-icon {
    width: 18px;
    height: 18px;
}

/* Main Chat Area */
.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--background-color);
}

.chat-header {
    padding: 20px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.chat-title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.action-btn {
    padding: 8px 16px;
    border: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Messages Container */
.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Message Styles */
.message {
    max-width: 70%;
    padding: 16px;
    border-radius: var(--border-radius);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    animation: messageAppear 0.3s ease;
}

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

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--user-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.message-username {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.owner {
    background: var(--owner-gradient);
    color: white;
}

.role-badge.admin {
    background: var(--admin-gradient);
    color: white;
}

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

.message-content {
    margin-bottom: 12px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--border-radius-sm);
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.message-image:hover {
    transform: scale(1.02);
}

/* Owner Messages - Normal but Poppy */
.message.owner {
    max-width: 75%;
    background: linear-gradient(135deg, #fffbeb, #fed7aa) !important;
    border: 3px solid #fbbf24 !important;
    border-left: 6px solid #dc2626 !important;
    box-shadow: 
        0 10px 20px rgba(251, 191, 36, 0.3),
        0 6px 6px rgba(251, 191, 36, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    position: relative;
    margin: 15px 0;
    padding: 18px 20px !important;
    animation: gentlePop 0.4s ease;
    transform-origin: left center;
}

@keyframes gentlePop {
    0% {
        transform: scale(0.98);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Owner message text - normal but bold */
.message.owner .message-content {
    color: #1f2937 !important;
    font-weight: 500 !important;
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Owner username - slightly fancy */
.message.owner .message-username {
    color: #92400e !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Owner badge - simple but poppy */
.role-badge.owner {
    background: linear-gradient(135deg, #fbbf24, #dc2626) !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.3);
}

/* Hover effect - subtle pop */
.message.owner:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 15px 25px rgba(251, 191, 36, 0.4),
        0 8px 8px rgba(251, 191, 36, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Time stamp - slightly fancy */
.message.owner .message-time {
    color: #b45309 !important;
    font-weight: 500 !important;
}

/* Make sure it's always readable */
.message.owner * {
    opacity: 1 !important;
    visibility: visible !important;
}
/* Admin Messages */
.message.admin {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.1));
    border-left: 4px solid var(--admin-gradient);
}

/* Message Actions */
.message-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.action-btn-small {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.action-btn-small:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.icon-small {
    width: 16px;
    height: 16px;
}

.like-count, .dislike-count {
    font-size: 0.85rem;
    min-width: 20px;
    text-align: center;
}

/* Message Input */
.message-input-container {
    padding: 20px;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.input-area {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    resize: none;
    min-height: 60px;
    max-height: 120px;
    transition: var(--transition);
    background: var(--surface-color);
    color: var(--text-color);
}

.message-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.input-btn {
    padding: 8px;
    border: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.input-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.input-btn-icon {
    width: 20px;
    height: 20px;
}

.send-btn {
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.send-btn-icon {
    width: 20px;
    height: 20px;
}

/* Like/Dislike Animations */
@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes dislikeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(180deg);
    }
}

.liked .icon-like {
    animation: likeAnimation 0.3s ease;
}

.disliked .icon-dislike {
    animation: dislikeAnimation 0.3s ease;
}

/* Typing Indicator */
.typing-container {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

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

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

/* Theme Picker */
.theme-picker {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.theme-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    transform: rotate(15deg);
    border-color: var(--primary-color);
}

.theme-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.theme-grid {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.theme-picker.open .theme-grid {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-option:hover {
    transform: scale(1.1);
}

.theme-option.active {
    border-color: var(--text-color);
    box-shadow: 0 0 0 2px var(--surface-color);
}

.theme-icon-small {
    width: 20px;
    height: 20px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Admin Controls */
.admin-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-xl);
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.admin-controls.open .admin-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.admin-section {
    margin-bottom: 20px;
}

.admin-section h3 {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    border: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.control-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    transition: transform 0.4s ease;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

.notification-icon {
    width: 24px;
    height: 24px;
    color: var(--warning-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.notification-close:hover {
    background: rgba(0,0,0,0.05);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.open .modal-content {
    transform: translateY(0);
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(0,0,0,0.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .message {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 60vh;
    }
    
    .sidebar.closed {
        display: none;
    }
    
    .main-chat {
        height: 100vh;
    }
    
    .message {
        max-width: 90%;
    }
    
    .theme-picker {
        bottom: 20px;
        right: 20px;
    }
    
    .theme-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .sidebar-header, .user-info, .room-item, .user-item {
        padding: 15px;
    }
    
    .chat-header, .messages-container, .message-input-container {
        padding: 15px;
    }
    
    .input-area {
        flex-direction: column;
        gap: 10px;
    }
    
    .send-btn {
        width: 100%;
        justify-content: center;
    }
    
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

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

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.bg-success {
    background: var(--success-color);
}

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

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

.rounded { border-radius: var(--border-radius); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }

.shadow { box-shadow: var(--shadow-md); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    opacity: 0.5;
}

/* Image Preview */
.image-preview {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.image-preview.show {
    opacity: 1;
    visibility: visible;
}

.preview-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--border-radius);
}

.preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.preview-close:hover {
    background: rgba(255,255,255,0.2);
}

/* =========================================== */
/* THEMES - ALL 10 BEAUTIFUL THEMES */
/* =========================================== */

/* 1. Seaside Theme */
.theme-seaside {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --background-color: #f0f9ff;
    --surface-color: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #cbd5e1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #8b5cf6, #7c3aed);
    --user-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* 2. Cozy House Theme */
.theme-cozy {
    --primary-color: #b45309;
    --secondary-color: #92400e;
    --background-color: #fef3c7;
    --surface-color: #fef9c3;
    --text-color: #451a03;
    --text-secondary: #78350f;
    --border-color: #d97706;
    --success-color: #065f46;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #92400e;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #92400e, #78350f);
    --user-gradient: linear-gradient(135deg, #b45309, #92400e);
}

/* 3. Neon City Theme */
.theme-neon {
    --primary-color: #8b5cf6;
    --secondary-color: #ec4899;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #475569;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0ea5e9;
    --owner-gradient: linear-gradient(135deg, #8b5cf6, #ec4899, #fbbf24);
    --admin-gradient: linear-gradient(135deg, #ec4899, #db2777);
    --user-gradient: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* 4. Forest Retreat Theme */
.theme-forest {
    --primary-color: #059669;
    --secondary-color: #10b981;
    --background-color: #f0fdf4;
    --surface-color: #dcfce7;
    --text-color: #052e16;
    --text-secondary: #166534;
    --border-color: #86efac;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #059669, #047857);
    --user-gradient: linear-gradient(135deg, #10b981, #059669);
}

/* 5. Winter Wonderland Theme */
.theme-winter {
    --primary-color: #0ea5e9;
    --secondary-color: #38bdf8;
    --background-color: #f0f9ff;
    --surface-color: #e0f2fe;
    --text-color: #0c4a6e;
    --text-secondary: #0369a1;
    --border-color: #7dd3fc;
    --success-color: #059669;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --info-color: #0ea5e9;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #0ea5e9, #0284c7);
    --user-gradient: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

/* 6. Starry Night Theme */
.theme-starry {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --background-color: #1e1b4b;
    --surface-color: #312e81;
    --text-color: #e0e7ff;
    --text-secondary: #a5b4fc;
    --border-color: #4f46e5;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0ea5e9;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #8b5cf6, #7c3aed);
    --user-gradient: linear-gradient(135deg, #6366f1, #4f46e5);
}

/* 7. Candyland Theme */
.theme-candy {
    --primary-color: #ec4899;
    --secondary-color: #f472b6;
    --background-color: #fdf2f8;
    --surface-color: #fce7f3;
    --text-color: #831843;
    --text-secondary: #be185d;
    --border-color: #f9a8d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0ea5e9;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #ec4899, #db2777);
    --user-gradient: linear-gradient(135deg, #f472b6, #ec4899);
}

/* 8. Desert Oasis Theme */
.theme-desert {
    --primary-color: #d97706;
    --secondary-color: #f59e0b;
    --background-color: #fef3c7;
    --surface-color: #fde68a;
    --text-color: #78350f;
    --text-secondary: #92400e;
    --border-color: #fbbf24;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #d97706, #b45309);
    --user-gradient: linear-gradient(135deg, #f59e0b, #d97706);
}

/* 9. Retro Arcade Theme */
.theme-arcade {
    --primary-color: #ef4444;
    --secondary-color: #f59e0b;
    --background-color: #1f2937;
    --surface-color: #374151;
    --text-color: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #4b5563;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --owner-gradient: linear-gradient(135deg, #ef4444, #f59e0b, #3b82f6);
    --admin-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --user-gradient: linear-gradient(135deg, #ef4444, #dc2626);
}

/* 10. Autumn Park Theme */
.theme-autumn {
    --primary-color: #ea580c;
    --secondary-color: #f97316;
    --background-color: #fff7ed;
    --surface-color: #fed7aa;
    --text-color: #431407;
    --text-secondary: #9a3412;
    --border-color: #fdba74;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --owner-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #dc2626);
    --admin-gradient: linear-gradient(135deg, #ea580c, #c2410c);
    --user-gradient: linear-gradient(135deg, #f97316, #ea580c);
}

/* QUICK FIX: Make admin button smaller */
#adminToggleBtn {
    padding: 5px 10px !important;
    font-size: 0.8rem !important;
    height: 30px !important;
    min-width: auto !important;
}

#adminToggleBtn .icon-small {
    width: 14px !important;
    height: 14px !important;
}

/* Move it up if blocking messages */
.admin-controls {
    top: 10px !important;
    right: 10px !important;
}


/* SIMPLE FIX: Make private chat button look normal */
#privateChatBtn {
    all: unset;
    cursor: pointer;
    width: 100%;
}

#privateChatBtn:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* Fix for Private Chat button to look like others */
#privateChatBtn {
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 20px !important;
    border-left: 4px solid transparent !important;
    transition: var(--transition) !important;
}

#privateChatBtn:hover {
    background: rgba(59, 130, 246, 0.05) !important;
    text-decoration: none !important;
    color: inherit !important;
}

#privateChatBtn:active {
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Make the ↗ badge look nice */
#privateBadge {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 2px 8px !important;
    border-radius: 10px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}
