:root {
    /* OpenAI-inspired color palette */
    --primary: #10a37f;
    --primary-hover: #0d8f6f;
    --primary-light: #e6f7f3;
    --secondary: #6366f1;
    --background: #ffffff;
    --surface: #f8fafc;
    --surface-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --accent: #8b5cf6;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #10a37f 0%, #0d8f6f 100%);
    --gradient-surface: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

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

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

.app-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.logo h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.new-chat-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.new-chat-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.new-chat-btn:hover::before {
    left: 100%;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 163, 127, 0.3);
}

:root {
    --primary: #10a37f;
    --primary-light: rgba(16, 163, 127, 0.1);
    --background: #f9fafb;
    --surface: #ffffff;
    --surface-hover: rgba(0, 0, 0, 0.05);
    --border: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --gradient-primary: linear-gradient(135deg, #10a37f 0%, #0891b2 100%);
    --success: #10b981;
    --error: #ef4444;
}

.community-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    margin-bottom: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-size: 14px;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(16, 163, 127, 0.2);
}

.community-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.community-btn:hover::before {
    left: 100%;
}

.community-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 163, 127, 0.4);
}

.chat-history {
    margin-top: 20px;
}

/* Mobile Navigation */
.mobile-nav-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    z-index: 1001;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-tab.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-tab svg {
    opacity: 0.7;
}

.nav-tab.active svg {
    opacity: 1;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .mobile-nav-bar {
        display: flex;
    }

    .app-container {
        padding-top: 60px;
    }

    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 999;
    }

    .main-content {
        width: 100vw;
    }
}

.chat-item {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    margin-bottom: 4px;
    position: relative;
}

.chat-item:hover {
    background: var(--surface-hover);
    transform: translateX(4px);
}

.chat-item.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.chat-preview {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

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

.music-player {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.music-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.music-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

#volumeSlider {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

#volumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-icon {
    font-size: 14px;
    opacity: 0.7;
}

.music-title {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.login-container {
    text-align: center;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(16, 163, 127, 0.25);
}

.user-info {
    text-align: center;
    font-weight: 500;
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, #f0fdf4 0%, rgba(15, 15, 35, 0.02) 100%);
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.8);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-title h3 {
    font-size: 18px;
    font-weight: 600;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

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

.header-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.header-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    transform: scale(1.05);
}

.chat-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

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

.welcome-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
    color: var(--primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.welcome-message h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-message p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
}

.user-section {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

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

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.user-email {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
}

.edit-profile-btn, .logout-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-right: 8px;
}

.edit-profile-btn:hover, .logout-btn:hover {
    background: var(--primary-hover);
}

.logout-btn {
    background: #dc2626;
}

.logout-btn:hover {
    background: #b91c1c;
}


.profile-edit-form {
    margin-top: 12px;
    padding: 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--background);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group small {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
    font-style: italic;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.save-btn, .cancel-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn {
    background: var(--primary);
    color: white;
}

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

.cancel-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.cancel-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.usage-tracker {
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #f59e0b;
}

.usage-title {
    font-weight: 600;
    color: #92400e;
    font-size: 14px;
    margin-bottom: 8px;
}

.usage-info {
    margin-bottom: 12px;
}

.uses-left {
    font-weight: 500;
    color: #92400e;
    font-size: 16px;
    margin-bottom: 4px;
}

.usage-timer {
    font-size: 14px;
    color: #b45309;
    font-weight: 500;
}

.upgrade-prompt {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #f59e0b;
}

.upgrade-prompt small {
    display: block;
    color: #92400e;
    margin-bottom: 8px;
    font-size: 12px;
}

.signup-link {
    display: inline-block;
    padding: 8px 16px;
    background: #f59e0b;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.signup-link:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.message {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    opacity: 0;
    animation: slideIn 0.5s ease-out forwards;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message.user .message-bubble {
    background: var(--gradient-primary);
    color: white;
    margin-left: auto;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.message-bubble {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    line-height: 1.6;
}

.message-bubble:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
}

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

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

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

/* Input Container */
.input-container {
    padding: 24px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}

.input-wrapper:focus-within::before {
    opacity: 0.05;
}

#messageInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

#messageInput::placeholder {
    color: var(--text-tertiary);
}

#sendButton {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

#sendButton:disabled {
    background: var(--surface-hover);
    cursor: not-allowed;
    opacity: 0.5;
}

#sendButton:not(:disabled):hover {
    background: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 163, 127, 0.3);
}

.input-footer {
    text-align: center;
    margin-top: 12px;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

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

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

/* Mobile Navigation Bar */
.mobile-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-tab {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.nav-tab.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-tab:hover {
    background: var(--surface-hover);
}

.nav-tab svg {
    width: 20px;
    height: 20px;
}

/* Swipe Transitions */
.main-content {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateX(0);
}

.main-content.sliding {
    transform: translateX(-100%);
}

/* Community View Transitions */
.view-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInView 0.5s ease-out forwards;
}

@keyframes slideInView {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Community View Styles */
.community-container {
    display: flex;
    height: 100vh;
    background: linear-gradient(135deg, #f0fdf4 0%, rgba(15, 15, 35, 0.02) 100%);
}

.community-sidebar {
    width: 300px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

.community-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--background);
}

.community-header {
    padding: 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.community-title {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.community-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.community-chat {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.community-message {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.community-message:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.community-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.community-message-content {
    flex: 1;
}

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

.community-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.community-timestamp {
    color: var(--text-tertiary);
    font-size: 14px;
}

.community-message-text {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
}

.community-input {
    padding: 24px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.community-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    padding: 16px 20px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.community-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.1);
}

#communityMessageInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    resize: none;
    min-height: 24px;
    max-height: 120px;
    font-family: inherit;
}

#communityMessageInput::placeholder {
    color: var(--text-tertiary);
}

#communitySendButton {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#communitySendButton:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 163, 127, 0.3);
}

.back-to-chat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.back-to-chat:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(16, 163, 127, 0.05);
}

.user-profile-card {
    background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 24px;
    margin: 0 auto 12px;
}

.profile-name {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 4px;
}

.profile-email {
    font-size: 14px;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-nav-bar {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed;
        z-index: 999;
        height: calc(100vh - 60px);
        top: 60px;
    }

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

    .main-content {
        margin-top: 60px;
        height: calc(100vh - 60px);
    }

    .app-container {
        flex-direction: column;
    }

    .message-bubble {
        max-width: 85%;
    }

    .input-container {
        padding: 16px;
    }

    .chat-header {
        padding: 16px 20px;
    }

    .chat-container {
        padding: 16px;
    }

    /* Community Mobile Styles */
    .community-container {
        flex-direction: column;
        height: calc(100vh - 60px);
    }

    .community-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow: hidden;
    }

    .community-main {
        flex: 1;
        min-height: 0;
    }

    .community-header {
        padding: 16px 20px;
    }

    .community-title {
        font-size: 24px;
    }

    .community-chat {
        padding: 16px;
        gap: 12px;
    }

    .community-message {
        padding: 12px 16px;
    }

    .community-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .community-input {
        padding: 16px;
    }

    .user-profile-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .profile-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .back-to-chat {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-tab span {
        display: none;
    }

    .nav-tab {
        padding: 8px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Development Notice */
.development-notice {
    margin: 16px 0;
    opacity: 0;
    animation: slideIn 0.5s ease-out forwards;
}

.notice-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    max-width: 70%;
    margin: 0 auto;
}

.notice-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notice-text {
    color: #92400e;
    font-size: 14px;
    line-height: 1.5;
}

.notice-text strong {
    color: #78350f;
    font-weight: 600;
}