/**
 * ChatApp - Main Stylesheet
 * Design imported from user templates
 */

/* ===== CSS Variables ===== */
:root {
    /* Primary colors */
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --primary-light: rgba(139, 92, 246, 0.1);
    --accent: #8B5CF6;
    --accent-color: #8B5CF6;
    --accent-hover: #7C3AED;

    /* Success/Error */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;

    /* Light theme */
    --bg-primary: #E5E7EB;
    --bg-secondary: #F3F4F6;
    --bg-tertiary: #F9FAFB;
    --card-bg: #FFFFFF;
    --border-color: #E5E7EB;

    /* Text colors */
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --text-muted: #9CA3AF;
}

body.dark {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --card-bg: #1a1a1a;
    --border-color: #2d2d2d;

    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --text-muted: #6b7280;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    transition: background 0.3s, color 0.3s;
    overflow-y: scroll;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
}

/* ===== Container ===== */
.container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--bg-secondary);
    min-height: 100vh;
    padding-bottom: 70px;
}

body.dark .container {
    background: #0f0f0f;
}

/* ===== Main Wrapper with Sidebars ===== */
.main-wrapper {
    display: flex;
    justify-content: center;
    gap: 3px;
    max-width: 1274px;
    /* 280 + 3 + 680 + 3 + 280 + 28 padding */
    margin: 0 auto;
    padding: 16px 14px 0;
}

.main-wrapper .content {
    flex: 1;
    max-width: 680px;
    min-width: 0;
    order: 2;
}

/* Sidebar order for correct layout */
.sidebar-left {
    order: 1;
}

.sidebar-right {
    order: 3;
}

/* ===== Sidebars ===== */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
    /* header 56px + 16px gap */
    height: fit-content;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

/* Left Sidebar */
.sidebar-left {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark .sidebar-left {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Sidebar Profile Card */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 8px;
}

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

.sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-tertiary);
}

.sidebar-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #10B981;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

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

.sidebar-profile-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar-profile-name:hover {
    color: var(--accent-color);
}

.sidebar-verify-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-color);
}

.sidebar-profile-username {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.sidebar-nav-item:hover {
    background: var(--bg-secondary);
}

.sidebar-nav-item.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-color);
}

.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #EF4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav-badge.online {
    background: #10B981;
}

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

/* Sidebar Premium */
.sidebar-premium {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    transition: opacity 0.2s;
}

.sidebar-premium:hover {
    opacity: 0.9;
}

.sidebar-premium svg {
    width: 18px;
    height: 18px;
}

.sidebar-premium-active {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

.sidebar-premium-active svg {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

/* Sidebar Logout */
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    color: #EF4444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: auto;
    transition: background 0.15s;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-logout svg {
    width: 18px;
    height: 18px;
}

/* Right Sidebar */
.sidebar-right {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-y: visible;
    max-height: none;
}

body.dark .sidebar-right {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sidebar-right-section {
    margin-bottom: 20px;
}

.sidebar-right-section:last-of-type {
    margin-bottom: 0;
}

.sidebar-right-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.sidebar-online-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.sidebar-online-indicator {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.sidebar-quick-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s;
}

.sidebar-quick-link:hover {
    background: var(--bg-secondary);
}

.sidebar-quick-link svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.sidebar-right-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}

.sidebar-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.sidebar-footer-links a {
    font-size: 12px;
    color: var(--text-tertiary);
    text-decoration: none;
}

.sidebar-footer-links a:hover {
    color: var(--text-secondary);
}

.sidebar-footer-copy {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* Burger button - hidden on desktop */
.burger-btn {
    display: none;
}

/* Desktop: show sidebars */
@media (min-width: 1024px) {
    .sidebar {
        display: flex;
        flex-direction: column;
    }

    .burger-btn {
        display: none !important;
    }

    .bottom-nav {
        display: none !important;
    }

    .container {
        padding-bottom: 20px;
    }

    /* Desktop Footer */
    .desktop-footer {
        display: block !important;
    }
}

/* Desktop Footer */
.desktop-footer {
    display: none;
    max-width: 1274px;
    margin: 40px auto 0;
    padding: 24px 14px;
    border-top: 1px solid var(--border-color);
}

.desktop-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.desktop-footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.desktop-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.desktop-footer-links a:hover {
    color: var(--accent-color);
}

.desktop-footer-copy {
    color: var(--text-muted);
    font-size: 12px;
}

.desktop-footer-copy a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Tablet/Mobile: hide sidebars, show burger */
@media (max-width: 1023px) {
    .main-wrapper {
        padding: 0;
    }

    .main-wrapper .content {
        max-width: 100%;
    }

    .sidebar-right {
        display: none;
    }

    .sidebar-left {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        border-radius: 0;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        max-height: 100vh;
        padding-top: 20px;
        padding-bottom: 100px;
    }

    .sidebar-left.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    .sidebar-overlay.active {
        pointer-events: auto;
    }

    .burger-btn {
        display: flex !important;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* Nav avatar in footer */
.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-tertiary);
    border: 2px solid transparent;
}

.nav-avatar-item.active .nav-avatar {
    border-color: var(--accent-color);
}

/* ===== Header ===== */
.header {
    height: 56px;
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (min-width: 1024px) {
    .header {
        max-width: 1274px;
        margin: 0 auto;
        padding: 0 14px;
        border-radius: 0 0 16px 16px;
    }
}

body.dark .header {
    background: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F3F4F6;
    text-decoration: none;
    transition: background 0.2s;
    flex-shrink: 0;
}

.back-btn:hover {
    background: #E5E7EB;
}

body.dark .back-btn {
    background: #262626;
}

body.dark .back-btn:hover {
    background: #333333;
}

.back-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.2s;
}

.back-icon:hover {
    color: #111827;
}

body.dark .back-icon {
    color: #9ca3af;
}

body.dark .back-icon:hover {
    color: #e5e7eb;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    padding-right: 20px;
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 30px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 30px), transparent 100%);
}

body.dark .header-title {
    color: #e5e7eb;
}

.logo-icon {
    width: 22px;
    height: 22px;
    color: #3B82F6;
}

/* Header Logo Image */
.header-logo {
    height: 28px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
}

@media (max-width: 480px) {
    .header-logo {
        height: 24px;
        max-width: 100px;
    }
}

.status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #10B981;
    font-weight: 500;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
}

.header-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon:hover {
    color: #111827;
}

body.dark .header-icon {
    color: #9ca3af;
}

body.dark .header-icon:hover {
    color: #e5e7eb;
}

.header-icon svg {
    width: 20px;
    height: 20px;
}

.header-icon-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover .header-icon {
    color: #111827;
}

body.dark .header-icon-btn:hover .header-icon {
    color: #e5e7eb;
}

/* Notification badge in header */
.header-notif-btn {
    position: relative;
}

.header-notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #EF4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: center/cover;
    cursor: pointer;
    border: 2px solid #e5e7eb;
}

body.dark .avatar {
    border-color: #374151;
}

/* Theme Icons */
.theme-icon-moon {
    display: block;
}

.theme-icon-sun {
    display: none;
}

body.dark .theme-icon-moon {
    display: none;
}

body.dark .theme-icon-sun {
    display: block;
}

/* ===== Welcome Block ===== */
.welcome {
    padding: 20px 16px 12px;
}

.welcome h1 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

body.dark .welcome h1 {
    color: #e5e7eb;
}

.welcome p {
    font-size: 13px;
    color: #6B7280;
}

body.dark .welcome p {
    color: #9ca3af;
}

/* ===== Dashboard Cards ===== */
.dashboard {
    padding: 8px 16px 16px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.card {
    position: relative;
    background: #A7DFFF;
    border-radius: 16px;
    padding: 16px 14px;
    height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.95);
}

.card-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
}

.card-1 {
    background: #8B5CF6;
}

.card-2 {
    background: #EC4899;
}

.card-3 {
    background: #F59E0B;
}

.card-4 {
    background: #10B981;
}

.card-5 {
    background: #EF4444;
}

.card-6 {
    background: #3B82F6;
}

/* ===== Quick Topics ===== */
.topics {
    padding: 16px 0 16px 16px;
}

.topics-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

body.dark .topics-title {
    color: #d1d5db;
}

.topics-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.topics-scroll::-webkit-scrollbar {
    display: none;
}

.topic-pill {
    background: #FFFFFF;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    text-decoration: none;
}

.topic-pill:hover {
    background: #F9FAFB;
}

body.dark .topic-pill {
    background: #262626;
    color: #d1d5db;
}

body.dark .topic-pill:hover {
    background: #333333;
}

/* ===== Section ===== */
.section {
    margin-bottom: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

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

.section-header .section-title {
    margin-bottom: 0;
}

.section-action {
    font-size: 13px;
    color: #8B5CF6;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-action-icon {
    width: 14px;
    height: 14px;
}

.view-all {
    font-size: 13px;
    color: #8B5CF6;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all-icon {
    width: 14px;
    height: 14px;
}

/* ===== Chat List ===== */
.chat-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    background: #FFFFFF;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chat-item:hover {
    background: #F9FAFB;
}

body.dark .chat-item {
    background: #262626;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .chat-item:hover {
    background: #333333;
}

.chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: center/cover;
    flex-shrink: 0;
}

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

.chat-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

body.dark .chat-name {
    color: #e5e7eb;
}

.chat-message {
    font-size: 12px;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark .chat-message {
    color: #9ca3af;
}

.chat-arrow {
    width: 16px;
    height: 16px;
    color: #9CA3AF;
    flex-shrink: 0;
}

/* ===== Rooms List ===== */
.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.room-item {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.room-item:hover {
    background: #F9FAFB;
}

body.dark .room-item {
    background: #262626;
}

body.dark .room-item:hover {
    background: #333333;
}

.room-icon {
    width: 18px;
    height: 18px;
    color: #3B82F6;
}

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

.room-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

body.dark .room-name {
    color: #e5e7eb;
}

.room-count {
    font-size: 11px;
    color: #10B981;
    margin-top: 2px;
}

.room-action {
    font-size: 12px;
    font-weight: 500;
    color: #3B82F6;
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-action-icon {
    width: 14px;
    height: 14px;
}

/* ===== AI Features ===== */
.ai-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #FFFFFF;
    border-radius: 12px;
}

body.dark .ai-item {
    background: #262626;
}

.ai-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-icon {
    width: 18px;
    height: 18px;
    color: #8B5CF6;
}

.ai-text {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

body.dark .ai-text {
    color: #e5e7eb;
}

/* ===== Toggle Switch ===== */
.toggle {
    width: 38px;
    height: 20px;
    background: #D1D5DB;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle.active {
    background: #10B981;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle.active::after {
    transform: translateX(18px);
}

.toggle-switch {
    width: 48px;
    height: 28px;
    background: #D1D5DB;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: #10B981;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

/* ===== Premium Item ===== */
.premium-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
    text-decoration: none;
}

.premium-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

body.dark .premium-item {
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

body.dark .premium-item:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.premium-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.premium-icon {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.95);
}

.premium-text-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.premium-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
}

.premium-subtext {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
}

.premium-badge {
    background: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.95);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.premium-badge-icon {
    width: 12px;
    height: 12px;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 650px;
    height: 60px;
    background: #FFFFFF;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    z-index: 100;
}

body.dark .bottom-nav {
    background: #1a1a1a;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.nav-icon {
    width: 22px;
    height: 22px;
    color: #9CA3AF;
    transition: color 0.2s;
}

.nav-item:hover .nav-icon {
    color: #6B7280;
}

.nav-item.active .nav-icon {
    color: #8B5CF6;
}

.nav-text {
    font-size: 10px;
    color: #9CA3AF;
    font-weight: 500;
}

.nav-item.active .nav-text {
    color: #8B5CF6;
}

.nav-item.center .nav-icon {
    width: 44px;
    height: 44px;
    background: #8B5CF6;
    color: white;
    border-radius: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.nav-item.center:hover .nav-icon {
    color: white;
    transform: scale(1.05);
    background: #7C3AED;
}

.nav-item.center .nav-icon svg {
    width: 22px;
    height: 22px;
}


/* Nav badge for notifications */
.nav-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-badge {
    position: absolute;
    top: -8px;
    left: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #EF4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}



/* ===== Profile Hero ===== */
.profile-hero {
    background: #FFFFFF;
    padding: 24px 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

body.dark .profile-hero {
    background: #1a1a1a;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: center/cover;
    border: 4px solid #8B5CF6;
    position: relative;
    margin-bottom: 16px;
    cursor: pointer;
}

.avatar-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 24px;
    height: 24px;
    background: #10B981;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
}

body.dark .avatar-badge {
    border-color: #1a1a1a;
}

.profile-name-main {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.dark .profile-name-main {
    color: #e5e7eb;
}

.verify-icon-main {
    width: 20px;
    height: 20px;
    color: #3B82F6;
}

.profile-username {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 12px;
}

body.dark .profile-username {
    color: #9ca3af;
}

.profile-stats-mini {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
}

body.dark .stat-mini {
    color: #9ca3af;
}

.stat-icon-mini {
    width: 16px;
    height: 16px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.action-btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn-primary {
    background: #8B5CF6;
    color: white;
}

.action-btn-primary:hover {
    background: #7C3AED;
}

.action-btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.action-btn-secondary:hover {
    background: #E5E7EB;
}

body.dark .action-btn-secondary {
    background: #262626;
    color: #9ca3af;
}

body.dark .action-btn-secondary:hover {
    background: #333333;
}

.action-btn-tertiary {
    background: transparent;
    color: #6B7280;
    border: 1px solid #E5E7EB;
    padding: 10px 12px;
    min-width: auto;
}

.action-btn-tertiary:hover {
    background: #F3F4F6;
}

body.dark .action-btn-tertiary {
    color: #9CA3AF;
    border-color: #374151;
}

body.dark .action-btn-tertiary:hover {
    background: #262626;
}

.action-btn-tertiary.friend-accept {
    color: #10B981;
    border-color: #10B981;
}

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

/* ===== Content Area ===== */
.content {
    padding: 0 16px 16px;
}

@media (max-width: 1023px) {
    .content {
        padding: 16px;
    }
}

/* ===== Stats Row (Profile) ===== */
.stats-row {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px 16px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-box {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Info Grid ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.info-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark .info-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.info-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon-wrapper.purple {
    background: rgba(139, 92, 246, 0.1);
}

.info-icon-wrapper.blue {
    background: rgba(59, 130, 246, 0.1);
}

.info-icon-wrapper.green {
    background: rgba(16, 185, 129, 0.1);
}

.info-icon-wrapper.orange {
    background: rgba(245, 158, 11, 0.1);
}

.info-icon {
    width: 20px;
    height: 20px;
}

.info-icon-wrapper.purple .info-icon {
    color: #8B5CF6;
}

.info-icon-wrapper.blue .info-icon {
    color: #3B82F6;
}

.info-icon-wrapper.green .info-icon {
    color: #10B981;
}

.info-icon-wrapper.orange .info-icon {
    color: #F59E0B;
}

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

.info-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

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

/* ===== Section Card ===== */
.section-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark .section-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== Bio ===== */
.bio-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Interests Tags ===== */
.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

/* ===== Badges Horizontal ===== */
.badges-horizontal {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.badges-horizontal::-webkit-scrollbar {
    display: none;
}

.badge-item {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.badge-item:hover {
    transform: translateY(-2px);
}

.badge-item.locked {
    background: #E5E7EB;
}

body.dark .badge-item.locked {
    background: #262626;
}

.badge-icon-circle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.badge-item.locked .badge-icon-circle {
    background: #D1D5DB;
}

body.dark .badge-item.locked .badge-icon-circle {
    background: #374151;
}

.badge-icon-small {
    width: 18px;
    height: 18px;
    color: white;
}

.badge-item.locked .badge-icon-small {
    color: #9CA3AF;
}

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

.badge-name-small {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.badge-item.locked .badge-name-small {
    color: #6B7280;
}

body.dark .badge-item.locked .badge-name-small {
    color: #9ca3af;
}

.badge-desc-small {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.badge-item.locked .badge-desc-small {
    color: #9CA3AF;
}

/* ===== Gallery Grid ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gallery-photo {
    aspect-ratio: 1;
    border-radius: 12px;
    background: #F3F4F6;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-photo:hover {
    transform: scale(1.03);
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-add {
    aspect-ratio: 1;
    border-radius: 12px;
    background: #F3F4F6;
    border: 2px dashed #D1D5DB;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-add:hover {
    background: #E5E7EB;
    border-color: #8B5CF6;
}

body.dark .gallery-add {
    background: #262626;
    border-color: #374151;
}

body.dark .gallery-add:hover {
    background: #333333;
    border-color: #8B5CF6;
}

.gallery-add-icon {
    width: 24px;
    height: 24px;
    color: #9CA3AF;
}

.gallery-add-text {
    font-size: 11px;
    color: #9CA3AF;
    font-weight: 500;
}

/* ===== Settings List ===== */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-item {
    padding: 14px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
    border-bottom: 1px solid #F3F4F6;
}

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

.setting-item:hover {
    opacity: 0.7;
}

body.dark .setting-item {
    border-bottom-color: #262626;
}

.setting-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.setting-icon-wrap.purple {
    background: rgba(139, 92, 246, 0.1);
}

.setting-icon-wrap.blue {
    background: rgba(59, 130, 246, 0.1);
}

.setting-icon-wrap.red {
    background: rgba(239, 68, 68, 0.1);
}

.setting-icon-wrap.green {
    background: rgba(16, 185, 129, 0.1);
}

.setting-icon-item {
    width: 18px;
    height: 18px;
}

.setting-icon-wrap.purple .setting-icon-item {
    color: #8B5CF6;
}

.setting-icon-wrap.blue .setting-icon-item {
    color: #3B82F6;
}

.setting-icon-wrap.red .setting-icon-item {
    color: #EF4444;
}

.setting-icon-wrap.green .setting-icon-item {
    color: #10B981;
}

.setting-text-wrap {
    flex: 1;
}

.setting-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

body.dark .setting-title {
    color: #e5e7eb;
}

.setting-desc {
    font-size: 12px;
    color: #6B7280;
}

body.dark .setting-desc {
    color: #9ca3af;
}

.setting-arrow {
    width: 16px;
    height: 16px;
    color: #9CA3AF;
}

.setting-item.logout .setting-title {
    color: #EF4444;
}

body.dark .setting-item.logout .setting-title {
    color: #FCA5A5;
}

/* ===== Settings Page ===== */
.settings-card {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark .settings-card {
    background: #1a1a1a;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #F3F4F6;
}

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

.settings-item:hover {
    background: #F9FAFB;
}

body.dark .settings-item {
    border-bottom-color: #262626;
}

body.dark .settings-item:hover {
    background: #262626;
}

.settings-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-icon-wrap.purple {
    background: rgba(139, 92, 246, 0.1);
}

.settings-icon-wrap.blue {
    background: rgba(59, 130, 246, 0.1);
}

.settings-icon-wrap.green {
    background: rgba(16, 185, 129, 0.1);
}

.settings-icon-wrap.orange {
    background: rgba(245, 158, 11, 0.1);
}

.settings-icon-wrap.red {
    background: rgba(239, 68, 68, 0.1);
}

.settings-icon-wrap.gray {
    background: rgba(107, 114, 128, 0.1);
}

.settings-icon {
    width: 20px;
    height: 20px;
}

.settings-icon-wrap.purple .settings-icon {
    color: #8B5CF6;
}

.settings-icon-wrap.blue .settings-icon {
    color: #3B82F6;
}

.settings-icon-wrap.green .settings-icon {
    color: #10B981;
}

.settings-icon-wrap.orange .settings-icon {
    color: #F59E0B;
}

.settings-icon-wrap.red .settings-icon {
    color: #EF4444;
}

.settings-icon-wrap.gray .settings-icon {
    color: #6B7280;
}

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

.settings-label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

body.dark .settings-label {
    color: #e5e7eb;
}

.settings-desc {
    font-size: 12px;
    color: #6B7280;
}

body.dark .settings-desc {
    color: #9ca3af;
}

.settings-value {
    font-size: 14px;
    color: #6B7280;
    flex-shrink: 0;
}

body.dark .settings-value {
    color: #9ca3af;
}

.settings-arrow {
    width: 18px;
    height: 18px;
    color: #9CA3AF;
    flex-shrink: 0;
}

/* Badge */
.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.badge.premium {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: white;
}

.badge.new {
    background: #10B981;
    color: white;
}

/* Profile Card (Settings) */
.profile-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 14px;
}

body.dark .profile-card {
    background: #1a1a1a;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: center/cover;
    border: 3px solid #8B5CF6;
    flex-shrink: 0;
}

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

.profile-name {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.dark .profile-name {
    color: #e5e7eb;
}

.verify-icon {
    width: 16px;
    height: 16px;
    color: #3B82F6;
}

.profile-email {
    font-size: 13px;
    color: #6B7280;
}

body.dark .profile-email {
    color: #9ca3af;
}

.profile-edit {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.profile-edit:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

.profile-edit-icon {
    width: 18px;
    height: 18px;
    color: #8B5CF6;
}

/* ===== Rooms Page ===== */
.search-container {
    padding: 12px 16px 8px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 8px 14px;
    transition: all 0.2s;
}

.search-bar:focus-within {
    border-color: #3B82F6;
    background: white;
}

body.dark .search-bar {
    background: #262626;
    border-color: #333333;
}

body.dark .search-bar:focus-within {
    border-color: #3B82F6;
    background: #262626;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: #9CA3AF;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #111827;
}

.search-bar input::placeholder {
    color: #9CA3AF;
}

body.dark .search-bar input {
    color: #e5e7eb;
}

body.dark .search-bar input::placeholder {
    color: #6b7280;
}

.create-btn {
    width: 40px;
    height: 40px;
    background: #8B5CF6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    border: none;
}

.create-btn:hover {
    background: #7C3AED;
    transform: translateY(-1px);
}

.create-icon {
    width: 20px;
    height: 20px;
    color: white;
}

/* Stats Section */
.stats-section {
    padding: 8px 16px 12px;
}

.stats-mini {
    display: flex;
    gap: 8px;
}

.stat-mini-card {
    flex: 1;
    background: #FFFFFF;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark .stat-mini-card {
    background: #262626;
}

.stat-mini-icon {
    width: 18px;
    height: 18px;
    color: #8B5CF6;
}

.stat-mini-text {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

body.dark .stat-mini-text {
    color: #e5e7eb;
}

/* Filters */
.filters {
    padding: 8px 0 12px 0;
}

.filters-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filters-scroll::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    background: #FFFFFF;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 18px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    border: none;
}

.filter-pill:hover {
    background: #F9FAFB;
}

.filter-pill.active {
    background: #8B5CF6;
    color: white;
}

body.dark .filter-pill {
    background: #262626;
    color: #d1d5db;
}

body.dark .filter-pill:hover {
    background: #333333;
}

body.dark .filter-pill.active {
    background: #8B5CF6;
    color: white;
}

/* Popular Rooms */
.popular-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popular-room {
    position: relative;
    background: #FFFFFF;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.popular-room:hover {
    background: #F9FAFB;
    transform: translateY(-1px);
}

body.dark .popular-room {
    background: #262626;
}

body.dark .popular-room:hover {
    background: #2d2d2d;
}

.popular-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 8px;
}

.popular-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.popular-icon {
    width: 28px;
    height: 28px;
    color: white;
}

.popular-content {
    flex: 1;
}

.popular-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

body.dark .popular-name {
    color: #e5e7eb;
}

.popular-desc {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 8px;
}

body.dark .popular-desc {
    color: #9ca3af;
}

.popular-stats {
    display: flex;
    gap: 12px;
}

.popular-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6B7280;
}

.popular-stat.users {
    color: #8B5CF6;
    font-weight: 600;
}

body.dark .popular-stat.users {
    color: #A78BFA;
}

.popular-stat.active {
    color: #10B981;
    font-weight: 600;
}

body.dark .popular-stat.active {
    color: #34D399;
}

body.dark .popular-stat {
    color: #9ca3af;
}

.popular-stat-icon {
    width: 14px;
    height: 14px;
}

/* Room Cards */
.rooms-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.room-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.room-card:hover {
    background: #F9FAFB;
}

body.dark .room-card {
    background: #262626;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .room-card:hover {
    background: #2d2d2d;
}

.room-icon-wrapper {
    width: 48px;
    height: 48px;
    background: #EDE9FE;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark .room-icon-wrapper {
    background: #3B2763;
}

.room-card-icon {
    width: 24px;
    height: 24px;
    color: #8B5CF6;
}

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

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

.room-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

body.dark .room-card-name {
    color: #e5e7eb;
}

.room-badge {
    background: #10B981;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.room-badge.new {
    background: #3B82F6;
}

.room-badge.vip {
    background: #F59E0B;
}

.room-desc {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark .room-desc {
    color: #9ca3af;
}

.room-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.room-stats-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6B7280;
}

.room-stats-item.users {
    color: #8B5CF6;
    font-weight: 600;
}

body.dark .room-stats-item.users {
    color: #A78BFA;
}

.room-stats-item.active {
    color: #10B981;
    font-weight: 600;
}

body.dark .room-stats-item.active {
    color: #34D399;
}

body.dark .room-stats-item {
    color: #9CA3AF;
}

.room-stats-icon {
    width: 14px;
    height: 14px;
}

.room-enter {
    align-self: center;
    flex-shrink: 0;
}

.enter-btn {
    background: #8B5CF6;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.enter-btn:hover {
    background: #7C3AED;
}

.enter-icon {
    width: 14px;
    height: 14px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 300;
}

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

.modal {
    background: #FFFFFF;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 650px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideUp 0.3s ease-out;
}

body.dark .modal {
    background: #1a1a1a;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: #D1D5DB;
    border-radius: 2px;
    margin: 12px auto 8px;
}

body.dark .modal-handle {
    background: #374151;
}

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

body.dark .modal-header {
    border-bottom-color: #262626;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

body.dark .modal-title {
    color: #e5e7eb;
}

.modal-subtitle {
    font-size: 13px;
    color: #6B7280;
}

body.dark .modal-subtitle {
    color: #9ca3af;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: #FFFFFF;
}

body.dark .modal-footer {
    background: #1a1a1a;
    border-top-color: #262626;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-cancel {
    background: #F3F4F6;
    color: #374151;
}

.modal-btn-cancel:hover {
    background: #E5E7EB;
}

body.dark .modal-btn-cancel {
    background: #262626;
    color: #9ca3af;
}

body.dark .modal-btn-cancel:hover {
    background: #333333;
}

.modal-btn-save,
.modal-btn-primary {
    background: #8B5CF6;
    color: white;
}

.modal-btn-save:hover,
.modal-btn-primary:hover {
    background: #7C3AED;
}

.modal-btn-danger {
    background: #EF4444;
    color: white;
}

.modal-btn-danger:hover {
    background: #DC2626;
}

.modal-button {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-button.cancel {
    background: #E5E7EB;
    color: #374151;
}

.modal-button.cancel:hover {
    background: #D1D5DB;
}

body.dark .modal-button.cancel {
    background: #374151;
    color: #d1d5db;
}

body.dark .modal-button.cancel:hover {
    background: #4B5563;
}

.modal-button.create {
    background: #8B5CF6;
    color: white;
}

.modal-button.create:hover {
    background: #7C3AED;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

body.dark .form-label {
    color: #d1d5db;
}

.form-input,
.form-textarea,
.modal-input,
.modal-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    color: #111827;
    background: #FFFFFF;
    transition: border-color 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

body.dark .form-input,
body.dark .form-textarea,
body.dark .modal-input,
body.dark .modal-textarea {
    background: #262626;
    border-color: #374151;
    color: #e5e7eb;
}

.form-input:focus,
.form-textarea:focus,
.modal-input:focus,
.modal-textarea:focus {
    outline: none;
    border-color: #8B5CF6;
}

.form-textarea,
.modal-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #9CA3AF;
}

.form-hint::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #D1D5DB;
    border-radius: 50%;
    flex-shrink: 0;
}

body.dark .form-hint {
    color: #6B7280;
}

body.dark .form-hint::before {
    background: #4B5563;
}

.form-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #EF4444;
}

.form-error::before {
    content: '!';
    width: 16px;
    height: 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
}

.form-input.error,
.form-textarea.error {
    border-color: #F87171;
    background: rgba(254, 202, 202, 0.1);
}

.form-input.error:focus,
.form-textarea.error:focus {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

body.dark .form-input.error,
body.dark .form-textarea.error {
    border-color: #F87171;
    background: rgba(239, 68, 68, 0.1);
}

/* Password toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #6B7280;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

body.dark .password-toggle {
    color: #6B7280;
}

body.dark .password-toggle:hover {
    color: #9CA3AF;
}

/* Chips */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background: #F3F4F6;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.chip:hover {
    background: #E5E7EB;
}

body.dark .chip {
    background: #374151;
    color: #d1d5db;
}

body.dark .chip:hover {
    background: #4B5563;
}

.chip.selected {
    background: #8B5CF6;
    color: white;
    border-color: #8B5CF6;
}

.chip.selected:hover {
    background: #7C3AED;
    border-color: #7C3AED;
}

/* Slider */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #E5E7EB;
    outline: none;
    -webkit-appearance: none;
}

body.dark .slider {
    background: #374151;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8B5CF6;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8B5CF6;
    cursor: pointer;
    border: none;
}

body.dark .slider::-webkit-slider-thumb {
    background: #8B5CF6;
}

.slider-value {
    font-size: 14px;
    font-weight: 600;
    color: #8B5CF6;
    min-width: 40px;
    text-align: right;
}

/* Switch */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #D1D5DB;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.switch.active {
    background: #10B981;
}

.switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.switch.active::after {
    transform: translateX(20px);
}

/* Interests Selection */
.interests-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-selectable {
    background: #F3F4F6;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

body.dark .interest-selectable {
    background: #262626;
    color: #d1d5db;
}

.interest-selectable:hover {
    background: #E5E7EB;
}

body.dark .interest-selectable:hover {
    background: #333333;
}

.interest-selectable.selected {
    background: #8B5CF6;
    color: white;
    border-color: #8B5CF6;
}

.interest-selectable.selected:hover {
    background: #7C3AED;
    border-color: #7C3AED;
}

/* Avatar Options - Clean List Style */
.avatar-options {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-secondary, #F5F5F5);
    border-radius: 12px;
    overflow: hidden;
}

body.dark .avatar-options {
    background: #2a2a2a;
}

.avatar-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: background 0.15s;
}

.avatar-option:last-child {
    border-bottom: none;
}

body.dark .avatar-option {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.avatar-option:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.dark .avatar-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.avatar-option:active {
    background: rgba(0, 0, 0, 0.08);
}

.avatar-option-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-color, #8B5CF6);
    flex-shrink: 0;
}

.avatar-option.danger .avatar-option-icon {
    color: #EF4444;
}

.avatar-option-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
}

body.dark .avatar-option-title {
    color: #f0f0f0;
}

.avatar-option.danger .avatar-option-title {
    color: #EF4444;
}

body.dark .avatar-option.danger .avatar-option-title {
    color: #F87171;
}

.avatar-option-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary, #999);
    flex-shrink: 0;
}

/* Legacy support - hide unused elements */
.avatar-option-icon-wrap,
.avatar-option-text,
.avatar-option-desc {
    display: none;
}

/* Logout/Delete Modal Content */
.logout-modal-content,
.delete-modal-content {
    text-align: center;
    padding: 20px 0;
}

.logout-icon-wrapper,
.delete-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.logout-icon-big,
.delete-icon-big {
    width: 40px;
    height: 40px;
    color: #EF4444;
}

.logout-modal-title,
.delete-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

body.dark .logout-modal-title,
body.dark .delete-modal-title {
    color: #e5e7eb;
}

.logout-modal-desc,
.delete-modal-desc {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
}

body.dark .logout-modal-desc,
body.dark .delete-modal-desc {
    color: #9ca3af;
}

/* Language Options */
.language-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.language-option {
    padding: 16px 0;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    opacity: 0.7;
}

body.dark .language-option {
    border-bottom-color: #262626;
}

.language-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

body.dark .language-name {
    color: #e5e7eb;
}

.language-check {
    width: 20px;
    height: 20px;
    color: #8B5CF6;
}

/* ===== Auth Pages ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 16px;
    max-width: 400px;
    margin: 0 auto;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 40px;
    margin-bottom: 32px;
}

@media (min-height: 800px) {
    .auth-logo {
        margin-top: 60px;
    }
}

.logo-text {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1F2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -1px;
}

.logo-text-accent {
    font-size: 2.25rem;
    font-weight: 700;
    color: #8B5CF6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -1px;
}

body.dark .logo-text {
    color: #F9FAFB;
}

body.dark .logo-text-accent {
    color: #A78BFA;
}

.auth-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark .auth-card {
    background: #1a1a1a;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
    color: #111827;
}

body.dark .auth-title {
    color: #e5e7eb;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: #6B7280;
}

body.dark .auth-footer {
    color: #9ca3af;
}

.auth-footer a {
    color: #8B5CF6;
    font-weight: 500;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #FFFFFF;
    border-radius: 12px;
    text-decoration: none;
    color: #6B7280;
    font-size: 13px;
    transition: all 0.2s;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lang-btn:hover {
    background: #F9FAFB;
    border-color: #8B5CF6;
    color: #8B5CF6;
}

.lang-btn.active {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
    border-color: #8B5CF6;
}

.lang-flag {
    display: flex;
    align-items: center;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.lang-flag svg {
    display: block;
}

.lang-name {
    font-weight: 500;
}

/* Mobile: hide text, show only flags */
@media (max-width: 400px) {
    .lang-switcher {
        flex-wrap: nowrap;
    }

    .lang-btn {
        padding: 10px 12px;
        gap: 0;
    }

    .lang-name {
        display: none;
    }
}

body.dark .lang-btn {
    background: #262626;
    border-color: #3d3d3d;
    color: #9CA3AF;
}

body.dark .lang-btn:hover {
    background: #333333;
    border-color: #8B5CF6;
    color: #A78BFA;
}

body.dark .lang-btn.active {
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
    border-color: #8B5CF6;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.custom-checkbox:hover .checkmark {
    border-color: #8B5CF6;
}

.custom-checkbox input:checked~.checkmark {
    background: #8B5CF6;
    border-color: #8B5CF6;
}

.custom-checkbox input:checked~.checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.custom-checkbox .checkbox-label {
    font-size: 14px;
    color: #6B7280;
}

body.dark .custom-checkbox .checkmark {
    border-color: #4B5563;
    background: transparent;
}

body.dark .custom-checkbox:hover .checkmark {
    border-color: #8B5CF6;
}

body.dark .custom-checkbox input:checked~.checkmark {
    background: #8B5CF6;
    border-color: #8B5CF6;
}

body.dark .custom-checkbox .checkbox-label {
    color: #9CA3AF;
}

/* Form Row Between */
.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.forgot-link {
    font-size: 14px;
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Social Proof Block */
.auth-social-proof {
    margin-top: 32px;
    padding: 24px 20px;
    background: #FFFFFF;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.dark .auth-social-proof {
    background: #1a1a1a;
    border-color: #2d2d2d;
}

.social-proof-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

body.dark .social-proof-title {
    color: #F3F4F6;
}

.social-proof-subtitle {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E7EB;
}

body.dark .social-proof-subtitle {
    color: #9CA3AF;
    border-bottom-color: #3d3d3d;
}

.social-proof-avatars {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    margin-top: 16px;
}

.social-proof-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
    margin-left: -12px;
    object-fit: cover;
    background: #E5E7EB;
}

.social-proof-avatar:first-child {
    margin-left: 0;
}

body.dark .social-proof-avatar {
    border-color: #1a1a1a;
    background: #262626;
}

.social-proof-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    color: white;
    font-size: 12px;
    font-weight: 700;
    margin-left: -12px;
    border: 3px solid #FFFFFF;
}

body.dark .social-proof-more {
    border-color: #1a1a1a;
}

.social-proof-text {
    color: #3B82F6;
    font-size: 14px;
    margin: 0;
    font-weight: 600;
}

body.dark .social-proof-text {
    color: #60A5FA;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: #8B5CF6;
    color: white;
}

.btn-primary:hover {
    background: #7C3AED;
}

.btn-block {
    width: 100%;
}

.btn svg {
    width: 20px;
    height: 20px;
}

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

.message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
}

.message.own {
    align-self: flex-end;
}

.message.other {
    align-self: flex-start;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.own .message-bubble {
    background: #8B5CF6;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.other .message-bubble {
    background: #FFFFFF;
    color: #111827;
    border-bottom-left-radius: 4px;
}

body.dark .message.other .message-bubble {
    background: #262626;
    color: #e5e7eb;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #9CA3AF;
    margin-top: 4px;
    padding: 0 4px;
}

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

/* Chat Input */
.chat-input-container {
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    padding: 12px 16px;
}

body.dark .chat-input-container {
    background: #1a1a1a;
    border-top-color: #262626;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-input {
    flex: 1;
    max-height: 120px;
    padding: 10px 14px;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    resize: none;
    overflow-y: auto;
    font-size: 14px;
    color: #111827;
}

body.dark .chat-input {
    background: #262626;
    border-color: #374151;
    color: #e5e7eb;
}

.chat-input:focus {
    outline: none;
    border-color: #8B5CF6;
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    background: #8B5CF6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.chat-send-btn:hover {
    background: #7C3AED;
}

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

/* ===== Utilities ===== */
.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* ===== Dialog Page Layout (Chat/Room) ===== */
body.dialog-page {
    height: 100vh;
    overflow: hidden;
}

body.dialog-page .container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
    background: #FFFFFF;
}

body.dark.dialog-page .container {
    background: #1a1a1a;
}

/* Dialog Header */
.dialog-header {
    height: 64px;
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 12px;
    flex-shrink: 0;
    z-index: 100;
    gap: 10px;
}

body.dark .dialog-header {
    background: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dialog-header .back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #F3F4F6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    text-decoration: none;
}

.dialog-header .back-btn:hover {
    background: #E5E7EB;
}

body.dark .dialog-header .back-btn {
    background: #262626;
}

body.dark .dialog-header .back-btn:hover {
    background: #333333;
}

/* User info in dialog header */
.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

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

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.online-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: #10B981;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
}

body.dark .online-badge {
    border-color: #1a1a1a;
}

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

.user-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark .user-name {
    color: #e5e7eb;
}

.user-status {
    font-size: 12px;
    color: #6B7280;
}

body.dark .user-status {
    color: #9ca3af;
}

.user-status.online {
    color: #10B981;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    background: #F3F4F6;
}

body.dark .header-btn:hover {
    background: #262626;
}

.header-btn-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
}

body.dark .header-btn-icon {
    color: #9ca3af;
}

/* Messages container */
.dialog-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #F9FAFB;
}

body.dark .dialog-messages {
    background: #0f0f0f;
}

/* Message styles */
.message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.message.own {
    align-self: flex-end;
}

.message.other,
.message.them {
    align-self: flex-start;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.message.other .message-bubble,
.message.them .message-bubble {
    background: #FFFFFF;
    color: #111827;
    border-bottom-left-radius: 4px;
}

body.dark .message.other .message-bubble,
body.dark .message.them .message-bubble {
    background: #262626;
    color: #e5e7eb;
}

.message.own .message-bubble {
    background: #8B5CF6;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 0 4px;
}

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

.message-time {
    font-size: 10px;
    color: #9CA3AF;
}

.message-status {
    display: flex;
    align-items: center;
}

.message-status svg {
    width: 14px;
    height: 14px;
    color: #9CA3AF;
}

.message-status.read svg {
    color: #3B82F6;
}

/* Room message username */
.message-username {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #8B5CF6;
}

.message-username.color-1 {
    color: #8B5CF6;
}

.message-username.color-2 {
    color: #EC4899;
}

.message-username.color-3 {
    color: #3B82F6;
}

.message-username.color-4 {
    color: #10B981;
}

.message-username.color-5 {
    color: #F59E0B;
}

.message-username.color-6 {
    color: #EF4444;
}

/* Date Separator */
.date-separator {
    text-align: center;
    padding: 12px 0;
}

.date-separator-text {
    font-size: 12px;
    color: #9CA3AF;
    background: #F9FAFB;
    padding: 4px 12px;
    border-radius: 12px;
}

body.dark .date-separator-text {
    background: #1a1a1a;
    color: #6B7280;
}

/* System message */
.system-message {
    text-align: center;
    font-size: 12px;
    color: #9CA3AF;
    padding: 8px 0;
}

/* Empty messages state */
.empty-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.empty-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-bottom: 16px;
    border: 3px solid #8B5CF6;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

body.dark .empty-title {
    color: #e5e7eb;
}

.empty-text {
    font-size: 13px;
    color: #6B7280;
}

body.dark .empty-text {
    color: #9ca3af;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.typing-indicator.active {
    display: flex;
}

.typing-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.typing-bubble {
    background: #FFFFFF;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

body.dark .typing-bubble {
    background: #262626;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #8B5CF6;
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite;
}

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

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

@keyframes typingAnimation {

    0%,
    60%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Input Container */
.input-container {
    padding: 12px 16px;
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    flex-shrink: 0;
}

body.dark .input-container {
    background: #1a1a1a;
    border-top-color: #262626;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: #F3F4F6;
    border-radius: 24px;
    padding: 8px 8px 8px 16px;
}

body.dark .input-wrapper {
    background: #262626;
}

.message-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #111827;
    resize: none;
    max-height: 120px;
    min-height: 24px;
    line-height: 1.4;
    font-family: inherit;
}

body.dark .message-input {
    color: #e5e7eb;
}

.message-input::placeholder {
    color: #9CA3AF;
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #8B5CF6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #7C3AED;
    transform: scale(1.05);
}

.send-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
}

body.dark .send-btn:disabled {
    background: #374151;
}

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

/* Input action buttons */
.input-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.input-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark .input-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.input-action-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
}

body.dark .input-action-icon {
    color: #9ca3af;
}

/* ===== Room Dialog Specific ===== */
.room-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    cursor: pointer;
}

.room-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.room-avatar-icon {
    width: 16px;
    height: 16px;
    color: white;
}

.room-header-text {
    flex: 1;
    min-width: 0;
}

.room-header-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark .room-header-name {
    color: #e5e7eb;
}

.room-header-status {
    font-size: 11px;
    color: #10B981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot-small {
    width: 5px;
    height: 5px;
    background: #10B981;
    border-radius: 50%;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 160px;
    z-index: 200;
    display: none;
}

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

body.dark .dropdown-menu {
    background: #262626;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    color: #374151;
}

.dropdown-item:hover {
    background: #F3F4F6;
}

body.dark .dropdown-item {
    color: #d1d5db;
}

body.dark .dropdown-item:hover {
    background: #333333;
}

.dropdown-item.danger {
    color: #EF4444;
}

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

/* Action Menu in Modal */
.action-menu {
    padding: 8px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.action-item:hover {
    background: #F3F4F6;
}

body.dark .action-item:hover {
    background: #262626;
}

.action-item.danger {
    color: #EF4444;
}

.action-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark .action-icon-wrapper {
    background: #262626;
}

.action-item.danger .action-icon-wrapper {
    background: rgba(239, 68, 68, 0.1);
}

.action-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
}

body.dark .action-icon {
    color: #9ca3af;
}

.action-item.danger .action-icon {
    color: #EF4444;
}

.action-text {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

body.dark .action-text {
    color: #e5e7eb;
}

.action-item.danger .action-text {
    color: #EF4444;
}

/* ===== 404 Page ===== */
.error-page .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

.error-wrapper {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 40px 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.dark .error-wrapper {
    background: #1a1a1a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.error-icon-wrapper {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: floatAnimation 3s ease-in-out infinite;
}

.error-icon {
    width: 48px;
    height: 48px;
    color: #EF4444;
}

.error-code {
    font-size: 72px;
    font-weight: 800;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1;
}

.error-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

body.dark .error-title {
    color: #e5e7eb;
}

.error-description {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 28px;
}

body.dark .error-description {
    color: #9ca3af;
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

body.dark .btn-secondary {
    background: #262626;
    color: #d1d5db;
}

body.dark .btn-secondary:hover {
    background: #333333;
}

/* Quick Links */
.quick-links {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

body.dark .quick-links {
    border-top-color: #262626;
}

.quick-links-title {
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark .quick-links-title {
    color: #9ca3af;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #F9FAFB;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-link:hover {
    background: #F3F4F6;
    transform: translateY(-1px);
}

body.dark .quick-link {
    background: #262626;
}

body.dark .quick-link:hover {
    background: #333333;
}

.quick-link-icon {
    width: 18px;
    height: 18px;
    color: #8B5CF6;
}

.quick-link-text {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

body.dark .quick-link-text {
    color: #d1d5db;
}

.footer-link {
    margin-top: 24px;
    font-size: 13px;
    color: #9CA3AF;
}

.footer-link a {
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 500;
}

.footer-link a:hover {
    text-decoration: underline;
}

@keyframes floatAnimation {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== Attach Menu (Room) ===== */
.attach-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-end;
    z-index: 300;
    animation: fadeIn 0.2s ease-out;
}

.attach-menu-overlay.active {
    display: flex;
}

.attach-menu {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: slideUp 0.3s ease-out;
}

body.dark .attach-menu {
    background: #1f1f1f;
}

.attach-menu-header {
    padding: 0 0 16px 0;
    text-align: center;
}

.attach-menu-handle {
    width: 36px;
    height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    margin: 0 auto 12px;
}

body.dark .attach-menu-handle {
    background: #374151;
}

.attach-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

body.dark .attach-menu-title {
    color: #e5e7eb;
}

.attach-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.attach-menu-item:hover {
    background: #F3F4F6;
}

body.dark .attach-menu-item:hover {
    background: #333333;
}

.attach-menu-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attach-menu-icon-wrapper.file {
    background: rgba(59, 130, 246, 0.1);
}

.attach-menu-icon-wrapper.poll {
    background: rgba(139, 92, 246, 0.1);
}

.attach-menu-icon-wrapper.location {
    background: rgba(16, 185, 129, 0.1);
}

.attach-menu-icon {
    width: 20px;
    height: 20px;
}

.attach-menu-icon-wrapper.file .attach-menu-icon {
    color: #3B82F6;
}

.attach-menu-icon-wrapper.poll .attach-menu-icon {
    color: #8B5CF6;
}

.attach-menu-icon-wrapper.location .attach-menu-icon {
    color: #10B981;
}

.attach-menu-text {
    flex: 1;
}

.attach-menu-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

body.dark .attach-menu-item-title {
    color: #e5e7eb;
}

.attach-menu-desc {
    font-size: 11px;
    color: #6B7280;
}

body.dark .attach-menu-desc {
    color: #9ca3af;
}

/* ===== Reply Preview ===== */
.reply-preview {
    display: none;
    background: var(--bg-secondary);
    border-radius: 12px 12px 0 0;
    padding: 10px 14px;
    border-left: 3px solid var(--primary);
}

.reply-preview.active {
    display: block;
}

body.dark .reply-preview {
    background: #262626;
}

.reply-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.reply-preview-name {
    font-size: 12px;
    font-weight: 600;
    color: #8B5CF6;
}

.reply-preview-close {
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    color: #6B7280;
}

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

body.dark .reply-preview-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.reply-preview-text {
    font-size: 13px;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark .reply-preview-text {
    color: #9ca3af;
}

/* ===== Message Reactions ===== */
.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.reaction {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.reaction:hover {
    background: rgba(139, 92, 246, 0.2);
}

.reaction.active {
    background: #8B5CF6;
    color: white;
}

body.dark .reaction {
    background: rgba(255, 255, 255, 0.1);
}

body.dark .reaction:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Voice Recording Overlay ===== */
.voice-recording-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 400;
}

.voice-recording-overlay.active {
    display: flex;
}

.voice-recording-animation {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: voicePulse 1.5s ease-in-out infinite;
}

@keyframes voicePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.voice-recording-icon {
    width: 48px;
    height: 48px;
    color: white;
}

.voice-recording-timer {
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.voice-recording-hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.voice-recording-actions {
    display: flex;
    gap: 20px;
}

.voice-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.voice-action-btn:hover {
    transform: scale(1.1);
}

.voice-action-btn.cancel {
    background: rgba(239, 68, 68, 0.2);
}

.voice-action-btn.send {
    background: #10B981;
}

.voice-action-icon {
    width: 24px;
    height: 24px;
}

.voice-action-btn.cancel .voice-action-icon {
    color: #EF4444;
}

.voice-action-btn.send .voice-action-icon {
    color: white;
}

/* ===== Poll Modal ===== */
.poll-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
}

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

.poll-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

body.dark .poll-modal-content {
    background: #1f1f1f;
}

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

body.dark .poll-modal-header {
    border-bottom-color: #374151;
}

.poll-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

body.dark .poll-modal-title {
    color: #e5e7eb;
}

.poll-modal-body {
    padding: 20px;
}

.poll-input-group {
    margin-bottom: 20px;
}

.poll-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

body.dark .poll-label {
    color: #9ca3af;
}

.poll-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    color: #111827;
    background: white;
    transition: border-color 0.2s;
}

.poll-input:focus {
    outline: none;
    border-color: #8B5CF6;
}

body.dark .poll-input {
    background: #262626;
    border-color: #374151;
    color: #e5e7eb;
}

.poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-option-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.poll-option-input {
    flex: 1;
}

.poll-remove-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #FEE2E2;
    color: #EF4444;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.poll-remove-btn:hover {
    background: #FECACA;
}

body.dark .poll-remove-btn {
    background: rgba(239, 68, 68, 0.2);
}

.poll-add-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed #E5E7EB;
    background: transparent;
    color: #8B5CF6;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 12px;
}

.poll-add-btn:hover {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.05);
}

body.dark .poll-add-btn {
    border-color: #374151;
    color: #A78BFA;
}

.poll-settings {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

body.dark .poll-settings {
    border-top-color: #374151;
}

.poll-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.poll-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.poll-checkbox-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

body.dark .poll-checkbox-label {
    color: #9ca3af;
}

.poll-modal-footer {
    padding: 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
}

body.dark .poll-modal-footer {
    border-top-color: #374151;
}

.poll-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.poll-btn-cancel {
    background: #F3F4F6;
    color: #374151;
}

.poll-btn-cancel:hover {
    background: #E5E7EB;
}

body.dark .poll-btn-cancel {
    background: #262626;
    color: #9ca3af;
}

.poll-btn-send {
    background: #8B5CF6;
    color: white;
}

.poll-btn-send:hover {
    background: #7C3AED;
}

/* ===== Reaction Picker ===== */
.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border-radius: 20px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 8px;
    animation: popIn 0.2s;
    z-index: 10;
}

.message.own .reaction-picker,
.message.me .reaction-picker {
    left: auto;
    right: 0;
}

.reaction-picker.active {
    display: flex;
}

body.dark .reaction-picker {
    background: #262626;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.reaction-option {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 4px;
}

.reaction-option:hover {
    transform: scale(1.3);
}

.reply-option {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
}

.reply-option:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* ===== Reply Bar ===== */
.reply-bar {
    background: #F3F4F6;
    border-top: 1px solid #E5E7EB;
    padding: 8px 16px;
    display: none;
    align-items: center;
    gap: 12px;
}

body.dark .reply-bar {
    background: #262626;
    border-top-color: #374151;
}

.reply-bar.active {
    display: flex;
}

.reply-bar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reply-bar-author {
    font-size: 12px;
    font-weight: 600;
    color: #8B5CF6;
}

body.dark .reply-bar-author {
    color: #A78BFA;
}

.reply-bar-text {
    font-size: 12px;
    color: #6B7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark .reply-bar-text {
    color: #9ca3af;
}

.reply-bar-close {
    width: 20px;
    height: 20px;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
}

.reply-bar-close:hover {
    color: #111827;
}

body.dark .reply-bar-close:hover {
    color: #e5e7eb;
}

/* ===== Reply Block in Message ===== */
.reply-block {
    background: rgba(0, 0, 0, 0.05);
    border-left: 3px solid #8B5CF6;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.reply-block:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.dark .reply-block {
    background: rgba(255, 255, 255, 0.05);
}

.message.own .reply-block,
.message.me .reply-block {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: rgba(255, 255, 255, 0.5);
}

.reply-author {
    font-size: 12px;
    font-weight: 600;
    color: #8B5CF6;
    margin-bottom: 2px;
}

.message.own .reply-author,
.message.me .reply-author {
    color: rgba(255, 255, 255, 0.9);
}

.reply-text {
    font-size: 12px;
    color: #6B7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

body.dark .reply-text {
    color: #9ca3af;
}

.message.own .reply-text,
.message.me .reply-text {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Room Chat Header ===== */
.chat-header {
    height: 56px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    flex-shrink: 0;
}

body.dark .chat-header {
    background: #1a1a1a;
    border-bottom-color: #262626;
}

.chat-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

body.dark .room-name {
    color: #e5e7eb;
}

.room-status {
    font-size: 11px;
    color: #10B981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ===== Search Modal ===== */
.search-modal {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 650px;
    padding: 0;
    animation: slideUp 0.3s ease-out;
    max-height: 70vh;
    overflow-y: auto;
}

body.dark .search-modal {
    background: #262626;
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

body.dark .search-modal-header {
    background: #262626;
    border-bottom-color: #374151;
}

.search-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

body.dark .search-modal-title {
    color: #e5e7eb;
}

.close-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
}

.close-icon-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

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

body.dark .close-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-input-wrapper {
    position: relative;
    padding: 16px 20px;
    background: white;
}

body.dark .search-input-wrapper {
    background: #262626;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    color: #111827;
    background: white;
}

body.dark .search-input {
    background: #1a1a1a;
    border-color: #374151;
    color: #e5e7eb;
}

.search-input:focus {
    border-color: #8B5CF6;
}

.search-icon {
    position: absolute;
    right: 32px;
    top: 28px;
    width: 18px;
    height: 18px;
    color: #9CA3AF;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 20px 20px;
}

.search-result-item {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    color: #374151;
}

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

body.dark .search-result-item {
    color: #d1d5db;
}

body.dark .search-result-item:hover {
    background: #1a1a1a;
}

/* ===== Message Username Colors (Room) ===== */
.message-username[data-user="1"] {
    color: #EF4444;
}

.message-username[data-user="2"] {
    color: #F59E0B;
}

.message-username[data-user="3"] {
    color: #10B981;
}

.message-username[data-user="4"] {
    color: #3B82F6;
}

.message-username[data-user="5"] {
    color: #8B5CF6;
}

.message-username[data-user="6"] {
    color: #EC4899;
}

/* ===== Voice Recording Modal (Room Style) ===== */
.voice-recording-modal {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    animation: popIn 0.3s;
}

body.dark .voice-recording-modal {
    background: #262626;
}

.voice-recording-modal .voice-recording-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #8B5CF6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(139, 92, 246, 0);
    }
}

.voice-recording-modal .voice-recording-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.voice-recording-time {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
}

body.dark .voice-recording-time {
    color: #e5e7eb;
}

.voice-recording-text {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 20px;
}

body.dark .voice-recording-text {
    color: #9ca3af;
}

.voice-recording-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.voice-recording-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.voice-recording-btn:hover {
    transform: scale(1.1);
}

.voice-cancel-btn {
    background: #EF4444;
}

.voice-send-btn {
    background: #10B981;
}

.voice-recording-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* ===== Room Message Specific ===== */
.message-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
    margin-bottom: 4px;
}

.message-avatar-small {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
}

.message.own .message-footer,
.message.me .message-footer {
    justify-content: flex-end;
}

/* ===== Home Page ===== */
.welcome {
    padding: 20px 16px 12px;
}

.welcome h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.welcome p {
    font-size: 13px;
    color: var(--text-secondary);
}

.dashboard {
    padding: 8px 16px 16px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.card {
    background: #A7DFFF;
    border-radius: 16px;
    padding: 16px 14px;
    height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    position: relative;
    text-decoration: none;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-1 {
    background: #A7DFFF;
}

.card-2 {
    background: #FFD6E0;
}

.card-3 {
    background: #C8B6FF;
}

.card-4 {
    background: #B8F2E6;
}

.card-5 {
    background: #FFF3B0;
}

.card-6 {
    background: #FFB5A7;
}

.card-icon {
    width: 24px;
    height: 24px;
    color: #111827;
}

.card-text {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10B981;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Topics */
.topics {
    padding: 0 16px 16px;
}

.topics-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.topics-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.topics-scroll::-webkit-scrollbar {
    display: none;
}

.topic-pill {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.topic-pill:hover {
    background: var(--primary);
    color: white;
}

/* AI Features */
.ai-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: var(--card-bg);
    border-radius: 12px;
}

.ai-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.ai-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle {
    width: 44px;
    height: 24px;
    background: #D1D5DB;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

body.dark .toggle {
    background: #374151;
}

.toggle.active {
    background: #10B981;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.toggle.active::after {
    transform: translateX(20px);
}

/* ===== Chats Page ===== */
.search-container {
    padding: 0 16px 12px;
}

.chats-list {
    display: flex;
    flex-direction: column;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    transition: background 0.2s;
}

.chat-item:hover {
    background: var(--bg-tertiary);
}

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

.chat-avatar-wrapper .chat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #10B981;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

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

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

.chat-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-time {
    font-size: 12px;
    color: var(--text-muted);
}

.chat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-message {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.chat-message.unread {
    font-weight: 600;
    color: var(--text-primary);
}

.you-prefix {
    color: var(--text-muted);
}

.unread-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

/* Filters */
.filters {
    margin-bottom: 8px;
}

.filters-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filters-scroll::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-pill:hover {
    background: var(--border-color);
}

.filter-pill.active {
    background: var(--primary);
    color: white;
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
}

.filter-pill:not(.active) .filter-count {
    background: var(--border-color);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.empty-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.empty-button:hover {
    background: var(--primary-dark);
}

.empty-button svg {
    width: 18px;
    height: 18px;
}

/* ===== Rooms Page ===== */
.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.add-btn {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
}

.add-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

.add-btn:hover {
    background: var(--primary-dark);
}

.rooms-stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.rooms-stats-row::-webkit-scrollbar {
    display: none;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card-bg);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.stat-item svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

/* Popular Rooms */
.popular-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.popular-scroll::-webkit-scrollbar {
    display: none;
}

.popular-card {
    flex-shrink: 0;
    width: 200px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    text-decoration: none;
    transition: all 0.2s;
}

.popular-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.popular-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}

.popular-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.popular-icon-wrap svg {
    width: 24px;
    height: 24px;
    color: white;
}

.popular-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.popular-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-stats {
    display: flex;
    gap: 12px;
}

.popular-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.popular-stat svg {
    width: 12px;
    height: 12px;
}

.popular-stat.active {
    color: var(--success);
}

/* Rooms Grid */
.rooms-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.room-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark .room-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.room-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.room-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.room-icon-wrap svg {
    width: 20px;
    height: 20px;
    color: white;
}

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

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

.room-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.room-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--success);
    color: white;
}

.room-badge.vip {
    background: #F59E0B;
}

.room-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-stats {
    display: flex;
    gap: 12px;
}

.room-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.room-stat svg {
    width: 12px;
    height: 12px;
}

.room-stat.active {
    color: var(--success);
}

.room-action {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}

.room-action:hover {
    background: rgba(139, 92, 246, 0.2);
}

.room-action svg {
    width: 14px;
    height: 14px;
}

/* ===== Profile Page - New Design ===== */
.profile-header-block {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark .profile-header-block {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.profile-cover {
    height: 100px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.profile-cover.no-cover {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
}

.profile-cover-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}

.cover-action-btn {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cover-action-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.cover-action-btn svg {
    width: 18px;
    height: 18px;
}

.profile-info-section {
    padding: 0 16px 16px;
    position: relative;
}

.profile-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-top: -45px;
    position: relative;
}

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

.profile-avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 4px solid var(--card-bg);
    cursor: pointer;
    position: relative;
}

.profile-online-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border: 3px solid var(--card-bg);
    border-radius: 50%;
}

.profile-rating-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    border: 2px solid var(--card-bg);
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.profile-rating-badge svg {
    width: 11px;
    height: 11px;
}

.profile-name-block {
    text-align: center;
    margin-top: 16px;
}

.profile-display-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-verify-icon {
    width: 16px;
    height: 16px;
    color: #3B82F6;
    flex-shrink: 0;
}

.profile-premium-icon {
    width: 14px;
    height: 14px;
    color: #F59E0B;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
    flex-shrink: 0;
}

.profile-username-text {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-mini-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
}

.mini-stat svg {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
}

.profile-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.profile-btn svg {
    width: 18px;
    height: 18px;
}

.profile-btn-primary {
    flex: 1;
    background: var(--primary);
    color: white;
}

.profile-btn-primary:hover {
    background: var(--primary-dark);
}

.profile-btn-secondary {
    width: 44px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.profile-btn-secondary:hover {
    background: var(--border-color);
}

.profile-btn-gift {
    width: 44px;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white;
}

.profile-btn-gift:hover {
    opacity: 0.9;
}

.profile-btn-friend {
    width: 44px;
    background: #10B981;
    color: white;
}

.profile-btn-friend:hover {
    background: #059669;
}

.profile-btn-pending {
    width: 44px;
    background: #f59e0b;
    color: white;
}

.profile-btn-pending:hover {
    background: #d97706;
}

.profile-btn-accept {
    width: 44px;
    background: #10B981;
    color: white;
}

.profile-btn-accept:hover {
    background: #059669;
}

.profile-btn-friends {
    width: 44px;
    background: var(--bg-secondary);
    color: var(--text-tertiary);
    cursor: default;
}

/* Profile Gifts */
.profile-gifts {
    margin-top: 16px;
}

.profile-gifts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.profile-gifts-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.gifts-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    text-transform: none;
    letter-spacing: normal;
}

.profile-gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
}

.profile-gift-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.profile-gift-item:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.profile-gift-emoji {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 4px;
}

.profile-gift-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 4px;
}

.profile-gift-from {
    font-size: 10px;
    color: var(--text-tertiary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.gifts-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: var(--text-tertiary);
}

.gifts-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.gifts-empty-text {
    font-size: 13px;
}

/* Legacy profile styles - keep for compatibility */
.profile-hero {
    display: none;
}

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

/* ===== Search Page ===== */
.title-section {
    margin-bottom: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.quick-action {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-icon.purple {
    background: rgba(139, 92, 246, 0.1);
}

.quick-action-icon.pink {
    background: rgba(236, 72, 153, 0.1);
}

.quick-action-icon svg {
    width: 22px;
    height: 22px;
}

.quick-action-icon.purple svg {
    color: #8B5CF6;
}

.quick-action-icon.pink svg {
    color: #EC4899;
}

.quick-action-text {
    flex: 1;
}

.quick-action-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-action-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Stats Card */
.stats-card {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    color: white;
}

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

.stats-title {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}

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

.stats-value {
    font-size: 32px;
    font-weight: 700;
}

.stats-label {
    font-size: 13px;
    opacity: 0.8;
}

/* User Results */
.user-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-item {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.user-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-info-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
}

.user-avatar .online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

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

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-name .verify-icon {
    width: 14px;
    height: 14px;
    color: #3B82F6;
}

.user-name .premium-icon {
    width: 14px;
    height: 14px;
    color: #F59E0B;
}

.user-details {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.user-action {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-action svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Start Button */
.start-btn {
    width: 100%;
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.start-btn svg {
    width: 20px;
    height: 20px;
}

/* Search Loading */
.search-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.search-loading.active {
    display: flex;
}

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

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

.search-loading-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Settings Page ===== */
.profile-settings-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar-settings-wrapper {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.profile-avatar-settings {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--primary);
}

.avatar-overlay {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

.avatar-overlay i {
    width: 14px;
    height: 14px;
    color: white !important;
}

/* Avatar Options moved to earlier in file - see line ~3418 */

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

.profile-name-settings {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-email-settings {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-edit-btn {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.profile-edit-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

.profile-edit-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Badge */
.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.badge.premium {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: white;
}

.badge.new {
    background: var(--success);
    color: white;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

body.dark ::-webkit-scrollbar-thumb {
    background: #374151;
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background: #4B5563;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 70px;
    /* Below header (56px + 14px margin) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100% - 40px);
    width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 22px;
    height: 22px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.toast-close svg {
    width: 16px;
    height: 16px;
}

/* Toast Types */
.toast-success {
    border-left-color: #10B981;
}

.toast-success .toast-icon {
    color: #10B981;
}

.toast-error {
    border-left-color: #EF4444;
}

.toast-error .toast-icon {
    color: #EF4444;
}

.toast-warning {
    border-left-color: #F59E0B;
}

.toast-warning .toast-icon {
    color: #F59E0B;
}

.toast-info {
    border-left-color: #3B82F6;
}

.toast-info .toast-icon {
    color: #3B82F6;
}

/* ===== Gift Store ===== */
.modal.modal-large {
    max-height: 85vh;
}

.gift-categories {
    display: flex;
    gap: 8px;
    padding: 16px;
    overflow-x: auto;
    border-bottom: 1px solid #E5E7EB;
}

body.dark .gift-categories {
    border-bottom-color: #333;
}

.gift-category {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #E5E7EB;
    background: transparent;
    font-size: 13px;
    color: #6B7280;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

body.dark .gift-category {
    border-color: #444;
    color: #9CA3AF;
}

.gift-category:hover {
    background: #F3F4F6;
}

body.dark .gift-category:hover {
    background: #333;
}

.gift-category.active {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border-color: transparent;
    color: white;
}

.gift-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #F9FAFB;
    font-size: 14px;
    color: #6B7280;
}

body.dark .gift-balance {
    background: #1a1a1a;
    color: #9CA3AF;
}

.balance-icon {
    width: 18px;
    height: 18px;
    color: #F59E0B;
}

.gift-balance strong {
    color: #111827;
    font-weight: 600;
}

body.dark .gift-balance strong {
    color: #e5e7eb;
}

.buy-coins-link {
    margin-left: auto;
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
}

.buy-coins-link:hover {
    text-decoration: underline;
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .gifts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gift-item {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .gift-item {
    background: #262626;
    border-color: #333;
}

.gift-item:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6;
}

.gift-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gift-image {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
}

.gift-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gift-emoji {
    font-size: 48px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.gift-preview-image .gift-emoji {
    font-size: 64px;
}

.gift-name {
    font-size: 12px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark .gift-name {
    color: #e5e7eb;
}

.gift-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #F59E0B;
}

.gift-coin-icon {
    width: 14px;
    height: 14px;
}

.gifts-loading,
.gifts-empty,
.gifts-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
}

body.dark .gifts-loading,
body.dark .gifts-empty,
body.dark .gifts-error {
    color: #9CA3AF;
}

.gifts-error {
    color: #EF4444;
}

/* Gift Preview */
.gift-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
    margin-bottom: 16px;
}

body.dark .gift-preview {
    background: #1a1a1a;
}

.gift-preview-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.gift-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gift-preview-info {
    flex: 1;
}

.gift-preview-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

body.dark .gift-preview-name {
    color: #e5e7eb;
}

.gift-preview-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #F59E0B;
    font-weight: 600;
}

.gift-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

body.dark .input-label {
    color: #d1d5db;
}

.input-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

body.dark .input-textarea {
    background: #1a1a1a;
    border-color: #333;
    color: #e5e7eb;
}

.input-textarea:focus {
    outline: none;
    border-color: #3B82F6;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

body.dark .checkbox-label {
    color: #d1d5db;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3B82F6;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1F2937;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

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

/* ===== PWA Install Banner ===== */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 20px 20px 0 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.pwa-install-banner.show {
    transform: translateY(0);
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-install-icon i {
    width: 24px;
    height: 24px;
    color: white;
}

.pwa-install-text {
    flex: 1;
}

.pwa-install-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.pwa-install-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.pwa-install-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-install-later {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.pwa-install-later:hover {
    background: var(--bg-tertiary);
}

.pwa-install-now {
    background: var(--primary);
    color: white;
}

.pwa-install-now:hover {
    background: var(--primary-dark);
}

/* PWA Update Banner */
.pwa-update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1001;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.pwa-update-banner button {
    background: white;
    color: var(--primary);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.pwa-update-banner button:hover {
    opacity: 0.9;
}

/* PWA Mode Adjustments */
body.pwa-mode {
    /* Hide browser UI hints in PWA mode */
}

body.pwa-mode .bottom-nav {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/* ===== Stories Row (Home Page) ===== */
.stories-row {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -16px;
}

.stories-row::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    flex-shrink: 0;
}

.story-avatar-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899, #F59E0B);
}

.story-avatar-ring.no-story {
    background: var(--border-color);
}

.story-avatar-ring.all-viewed {
    background: var(--text-muted);
}

.story-avatar-ring.has-new {
    background: linear-gradient(135deg, #8B5CF6, #EC4899, #F59E0B);
}

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-secondary);
    border: 2px solid var(--card-bg);
    position: relative;
}

.story-item .add-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid var(--card-bg);
}

.story-item .add-icon svg {
    width: 12px;
    height: 12px;
}

.story-item .verified-mini {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #3B82F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid var(--card-bg);
}

.story-item .verified-mini svg {
    width: 10px;
    height: 10px;
}

.story-name {
    font-size: 11px;
    color: var(--text-secondary);
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.story-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== Unified Post Card Styles ===== */
.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark .post-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 10px;
}

.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.post-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-author .verified-badge {
    width: 14px;
    height: 14px;
    color: #3B82F6;
}

.post-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.post-more-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    flex-shrink: 0;
}

.post-more-btn:hover {
    background: var(--bg-secondary);
}

.post-more-btn svg {
    width: 18px;
    height: 18px;
}

/* Post Media */
.post-media {
    margin-bottom: 0;
    padding: 0;
}

.post-media img {
    width: 100%;
    display: block;
    border-radius: 6px;
}

.post-media-grid {
    display: grid;
    gap: 2px;
    border-radius: 6px;
    overflow: hidden;
}

.post-media-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
}

.post-media-grid.grid-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.post-media-grid.grid-3 img:first-child {
    grid-row: span 2;
}

.post-media-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
}

.post-media-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    min-height: 120px;
    border-radius: 0;
}

/* Border radius for grid corners */
.post-media-grid.grid-2 img:first-child {
    border-radius: 6px 0 0 6px;
}

.post-media-grid.grid-2 img:last-child {
    border-radius: 0 6px 6px 0;
}

.post-media-grid.grid-3 img:first-child {
    border-radius: 6px 0 0 6px;
}

.post-media-grid.grid-3 img:nth-child(2) {
    border-radius: 0 6px 0 0;
}

.post-media-grid.grid-3 img:nth-child(3) {
    border-radius: 0 0 6px 0;
}

.post-media-grid.grid-4 img:nth-child(1) {
    border-radius: 6px 0 0 0;
}

.post-media-grid.grid-4 img:nth-child(2) {
    border-radius: 0 6px 0 0;
}

.post-media-grid.grid-4 img:nth-child(3) {
    border-radius: 0 0 0 6px;
}

.post-media-grid.grid-4 img:nth-child(4) {
    border-radius: 0 0 6px 0;
}

.post-media-grid.grid-5 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
}

.post-media-grid.grid-5 img:nth-child(1) {
    border-radius: 6px 0 0 0;
}

.post-media-grid.grid-5 img:nth-child(3) {
    border-radius: 0 6px 0 0;
}

.post-media-grid.grid-5 img:nth-child(4) {
    border-radius: 0 0 0 6px;
}

.post-media-grid.grid-5 img:nth-child(5) {
    border-radius: 0 0 6px 0;
    grid-column: span 2;
}

.post-media-grid.grid-6 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
}

.post-media-grid.grid-6 img:nth-child(1) {
    border-radius: 6px 0 0 0;
}

.post-media-grid.grid-6 img:nth-child(3) {
    border-radius: 0 6px 0 0;
}

.post-media-grid.grid-6 img:nth-child(4) {
    border-radius: 0 0 0 6px;
}

.post-media-grid.grid-6 img:nth-child(6) {
    border-radius: 0 0 6px 0;
}

/* Post Media Slider - Instagram style */
.post-media-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bg-tertiary);
    touch-action: pan-y pinch-zoom;
    border-radius: 6px;
}

.post-media-slider.swiping {
    touch-action: none;
}

.slider-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
}

.slider-slide {
    flex-shrink: 0;
    width: 100%;
}

.slider-slide img {
    width: 100%;
    display: block;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
}

.slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    background: var(--card-bg);
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.2s;
    cursor: pointer;
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.slider-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 10;
}

/* Post Content */
.post-content {
    padding: 12px;
    cursor: pointer;
}

/* Текст після фото - більший відступ зверху */
.post-media+.post-content,
.post-media-slider+.post-content {
    padding-top: 12px;
}

/* Текст без фото (одразу після header) - менший відступ */
.post-header+.post-content {
    padding-top: 0;
}

.post-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
}

/* Post text truncation - 3 lines max */
.post-text.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.post-show-more {
    display: inline-block;
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
    background: none;
    border: none;
    padding: 0;
}

.post-show-more:hover {
    text-decoration: underline;
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-top: 1px solid var(--border-color);
}

.post-actions-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.15s;
}

.post-action-btn:hover {
    color: var(--text-primary);
}

.post-action-btn svg {
    width: 22px;
    height: 22px;
}

.post-action-btn .count {
    font-weight: 600;
    font-size: 14px;
}

.post-action-btn.liked {
    color: #EF4444;
}

.post-action-btn.liked svg {
    fill: #EF4444;
}

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

.post-action-btn.bookmarked svg {
    fill: var(--accent-color);
}

/* Pinned indicator - іконка біля 3 точок */
.post-pinned-icon {
    color: #F59E0B;
    margin-right: 4px;
}

.post-pinned-icon svg {
    width: 16px;
    height: 16px;
}

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

.confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: var(--card-bg);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 24px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.confirm-modal-overlay.active .confirm-modal {
    transform: translateY(0);
}

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.confirm-modal-icon svg {
    width: 28px;
    height: 28px;
    color: #EF4444;
}

.confirm-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.confirm-modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.confirm-modal-buttons {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn.cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.confirm-btn.cancel:hover {
    background: var(--bg-tertiary);
}

.confirm-btn.danger {
    background: #EF4444;
    color: white;
}

.confirm-btn.danger:hover {
    background: #DC2626;
}

/* ===== Comments Modal ===== */
.comments-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.comments-modal.active {
    transform: translateY(0);
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.comments-header .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.comments-header .back-btn svg {
    width: 24px;
    height: 24px;
}

.comments-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.comments-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.comment-item:hover {
    background: var(--bg-tertiary);
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.comment-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-verified {
    width: 14px;
    height: 14px;
    color: #3B82F6;
}

.comment-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.comment-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.comment-action-btn {
    font-size: 12px;
    color: var(--text-tertiary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.comment-action-btn:hover {
    color: var(--text-primary);
}

.comment-replies-toggle {
    font-size: 12px;
    color: var(--text-tertiary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-replies-toggle:hover {
    color: var(--text-primary);
}

.comment-replies {
    margin-left: 48px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.comments-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.comments-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-tertiary);
}

.comments-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.comments-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-primary);
    resize: none;
    outline: none;
}

.comments-input::placeholder {
    color: var(--text-tertiary);
}

.comments-send-btn {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

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

.comments-send-btn svg {
    width: 18px;
    height: 18px;
}