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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.chat-page {
    display: block;
    padding: 0;
    background: #1a1625;
    animation: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Index Page Styles */
.login-type-selector {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-2xl);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.login-type-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.login-type-selector h1 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-type-selector p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 16px;
    font-weight: 400;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-type-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.login-type-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-type-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-type-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

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

.login-type-btn .icon {
    font-size: 24px;
    transition: transform 0.3s;
}

.login-type-btn:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

/* Login Page Styles */
.login-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.login-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.login-form-container h1 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-type-display {
    color: var(--primary-color);
    margin-bottom: 32px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-white);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.submit-btn {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 24px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

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

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.back-link {
    margin-top: 24px;
    text-align: center;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-link a:hover {
    color: var(--secondary-color);
    transform: translateX(-3px);
}

.error-message {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: var(--error-color);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s;
    box-shadow: var(--shadow-sm);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Chat Page Styles - Dark Purple Theme */
.chat-page {
    margin: 0;
    padding: 0;
    background: #1a1625;
    color: #ffffff;
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    font-family: 'Inter', sans-serif;
    display: block;
    overflow: hidden;
}

.chat-layout {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Left Sidebar */
.sidebar {
    width: 320px;
    background: #2d1f3d;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(139, 92, 246, 0.2);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

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

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.logo-text h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.version {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.menu-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.menu-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
}

/* Sidebar Tabs */
.sidebar-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.sidebar-tab {
    flex: 1;
    padding: 8px 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
}

.sidebar-tab:hover {
    background: rgba(139, 92, 246, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-tab.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: #ffffff;
    border-color: #8b5cf6;
}

.tab-icon {
    font-size: 14px;
}

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    flex-direction: column;
}

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

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.history-section {
    margin-bottom: 24px;
}

.history-date-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.history-date-header:hover {
    color: rgba(255, 255, 255, 0.9);
}

.date-label {
    font-weight: 600;
}

.chevron {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s;
}

.history-section.collapsed .chevron {
    transform: rotate(-90deg);
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.history-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item:hover {
    background: rgba(139, 92, 246, 0.15);
}

.history-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.history-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tasks Section */
.tasks-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

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

.tasks-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.refresh-tasks-btn {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.refresh-tasks-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: rotate(180deg);
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tasks-loading,
.tasks-empty,
.tasks-error {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.tasks-error {
    color: rgba(239, 68, 68, 0.8);
}

.task-item {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.05);
    display: flex;
    gap: 12px;
    transition: all 0.2s;
}

.task-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
}

.task-item.task-done {
    border-left: 3px solid #10b981;
}

.task-item.task-fail {
    border-left: 3px solid #ef4444;
}

.task-item.task-pending {
    border-left: 3px solid #f59e0b;
}

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

.task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.task-recipient {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.task-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.new-chat-btn {
    margin: 20px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-icon {
    font-size: 16px;
}

.premium-section {
    margin: 20px;
    padding: 16px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

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

.premium-icon {
    font-size: 24px;
}

.premium-text {
    flex: 1;
}

.premium-price {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.premium-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.upgrade-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all 0.2s;
}

.upgrade-label {
    font-size: 10px;
    opacity: 0.9;
}

.upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Main Area */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1625;
}

.top-bar {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.search-input {
    flex: 1;
    max-width: 300px;
    padding: 10px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 32px;
    height: 32px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.control-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
}

.feature-tabs {
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.feature-tab {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.feature-tab:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
}

.feature-tab.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: #ffffff;
    border-color: #8b5cf6;
}

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

.message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.4s ease-out;
    align-items: flex-start;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.user-avatar-small {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.bot-avatar-small {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
}

.message-bubble {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 12px;
    word-wrap: break-word;
    position: relative;
}

.user-bubble {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.bot-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #ffffff;
    border-bottom-left-radius: 4px;
}

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

.message-sender {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.message-version {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.message-time {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.5);
}

.message-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.message-text ol, .message-text ul {
    margin: 12px 0;
    padding-left: 24px;
}

.message-text li {
    margin: 6px 0;
}

.profile-card-overlay {
    position: absolute;
    top: 20px;
    right: -180px;
    z-index: 10;
}

.profile-card {
    width: 200px;
    padding: 16px;
    background: rgba(139, 92, 246, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

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

.profile-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 24px;
}

.profile-info {
    text-align: center;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.profile-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.message-actions {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    margin-left: 48px;
}

.action-icon {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.action-icon:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
}

.message-input-container {
    padding: 20px;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(26, 22, 37, 0.8);
}

.message-input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.message-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.message-input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
}

.message-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-button {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.help-btn {
    width: 36px;
    height: 36px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.help-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    width: fit-content;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar,
.chat-history::-webkit-scrollbar,
.chat-area::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.chat-history::-webkit-scrollbar-track,
.chat-area::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.chat-history::-webkit-scrollbar-thumb,
.chat-area::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    transition: background 0.3s;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.chat-history::-webkit-scrollbar-thumb:hover,
.chat-area::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .container {
        padding: 16px;
    }
    
    .login-type-selector,
    .login-form-container {
        padding: 32px 24px;
        border-radius: var(--radius-lg);
    }
    
    .login-type-selector h1,
    .login-form-container h1 {
        font-size: 28px;
    }
    
    /* Chat Layout Responsive */
    .chat-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .profile-card-overlay {
        position: relative;
        right: auto;
        margin-top: 12px;
    }
    
    .message-actions {
        margin-left: 0;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .login-type-selector h1,
    .login-form-container h1 {
        font-size: 24px;
    }
    
    .message-content {
        max-width: 90%;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}
