:root {
    --primary-color: #4FC3F7;
    --bg-color: #F4FBFF;
    --header-bg: linear-gradient(135deg, #4FC3F7, #4DB6AC);
    --text-primary: #333333;
    --text-secondary: #696969;
    --border-color: #dcdcdc;
    --incoming-bubble: #ffffff;
    --outgoing-bubble: #90EE90;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    overflow: hidden; /* Prevent body scroll */
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff; /* For desktop view centering */
    position: relative;
    padding-bottom: 72px;
}

.landing-container {
    padding: 20px 18px 16px;
}

.landing-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 24px;
    padding-top: 8px;
    overflow-y: auto; /* Allow scrolling if content is long */
    padding-bottom: 20px;
}

.landing-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.landing-tag {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: rgba(135, 206, 235, 0.18);
    color: var(--text-secondary);
    font-size: 12px;
}

.landing-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.landing-subtitle {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.landing-notices {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.notice-card {
    border-radius: 12px;
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
}

.notice-card.warning {
    background-color: #FFF8E1;
    border: 1px solid #FFE082;
}

.notice-card.info {
    background-color: #F3E5F5; /* Gentle Purple/Lavender for Tech/Magic feel */
    border: 1px solid #E1BEE7;
}

/* Override info card color to match request "Unified color scheme (warning style recommended)" or Tech style? 
   User said "Use unified color scheme (suggesting warning color scheme)". 
   But Tech info usually isn't "warning". 
   "Style requirements: Use unified color scheme (suggest warning color system)" might mean they want BOTH to look like notices/alerts.
   Let's make Tech info a different shade but consistent design.
   Maybe Blue for Tech, Orange for Warning.
*/
.notice-card.info {
    background-color: #E3F2FD;
    border: 1px solid #90CAF9;
}

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

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

.warning .notice-icon, .warning .notice-title {
    color: #F57C00;
}

.info .notice-icon, .info .notice-title {
    color: #1976D2;
}

.notice-title {
    font-size: 16px;
    font-weight: 700;
}

.notice-content {
    font-size: 14px;
    color: #37474F;
    line-height: 1.5;
}

.notice-supplement {
    margin-top: 6px;
    font-size: 12px;
    color: #78909C;
    font-style: italic;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-list li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 2px;
}

.notice-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: bold;
    opacity: 0.6;
}

.landing-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.session-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background-color: var(--bg-color);
    padding: 10px 14px 12px;
    overflow-y: auto;
}

.header-menu {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid #f0f0f0;
    z-index: 19;
}

.header-menu-inner {
    display: flex;
    flex-direction: column;
}

.header-menu-item {
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-primary);
}

.header-menu-item + .header-menu-item {
    border-top: 1px solid #f5f5f5;
}

.header-menu-opening {
    animation: headerMenuDown 0.3s ease-out forwards;
}

.header-menu-closing {
    animation: headerMenuUp 0.3s ease-in forwards;
}

@keyframes headerMenuDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes headerMenuUp {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
}

.session-section {
    margin-bottom: 14px;
}

.session-section-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.landing-feature {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.landing-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: rgba(144, 238, 144, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.landing-feature-text h2 {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.landing-feature-text p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.landing-footer {
    padding-top: 12px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.landing-start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #90EE90, #87CEEB);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.landing-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.page-container {
    padding: 16px 16px 0;
}

.page-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 80px;
    overflow-y: auto;
}

.login-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-badge {
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(135, 206, 235, 0.18);
    color: var(--text-secondary);
    font-size: 11px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 14px 12px 16px;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.login-phone-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.login-country-code {
    width: 48%;
    padding: 7px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    font-size: 13px;
}

.login-input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 14px;
}

.login-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.login-captcha {
    height: 38px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.login-sms-btn {
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 13px;
    white-space: nowrap;
}

.login-sms-btn:disabled {
    background-color: #cccccc;
}

.login-status {
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 16px;
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 12px 10px 16px;
    gap: 12px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background-color: rgba(135, 206, 235, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 22px;
}

.profile-avatar-emoji {
    font-size: 26px;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

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

.profile-login-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--primary-color);
    background-color: #ffffff;
    color: var(--primary-color);
    font-size: 13px;
    text-decoration: none;
}

.balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.16), rgba(77, 182, 172, 0.18));
}

.balance-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.balance-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.balance-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.balance-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.balance-action {
    padding: 8px 12px;
    border-radius: 999px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 13px;
    text-decoration: none;
}

.balance-action.disabled,
.invite-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-pill {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
    font-size: 11px;
    color: var(--text-secondary);
}

.tag-pill-active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(135, 206, 235, 0.12);
}

.search-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
}

.search-icon {
    font-size: 14px;
    color: var(--text-secondary);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
}

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

.history-empty {
    padding: 10px 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.history-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid #f0f0f0;
}

.history-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-title {
    font-size: 14px;
    color: var(--text-primary);
}

.history-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.history-snippet {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.history-arrow {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0c0c0;
}

.invite-card {
    padding: 12px 12px 14px;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invite-rule {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.text-strong {
    color: var(--primary-color);
    font-weight: 600;
}

.invite-code-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

.invite-code-value {
    font-weight: 600;
    color: var(--text-primary);
}

.invite-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.invite-link-box {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    background-color: #f2f3f5;
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invite-copy-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background-color: #2563ff;
    color: #ffffff;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.invite-stats {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

.invite-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invite-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.invite-stat-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

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

.recharge-card {
    position: relative;
    padding: 12px 10px;
    border-radius: 12px;
    border: 1px solid rgba(79, 195, 247, 0.25);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.recharge-card-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recharge-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.recharge-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recharge-card-points {
    font-size: 13px;
    color: var(--text-secondary);
}

.recharge-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.recharge-card-tag {
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.recharge-card-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(79, 195, 247, 0.35);
}

.pay-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pay-method {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
}

.pay-method input {
    margin: 0;
}

.pay-method-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: var(--text-secondary);
}

.pay-method-text {
    font-size: 14px;
    color: var(--text-primary);
}

.pay-method-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pay-method-disabled input {
    cursor: not-allowed;
}

.primary-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #4FC3F7, #4DB6AC);
    color: #ffffff;
    font-size: 15px;
}

.primary-btn:disabled {
    background: #d0d0d0;
}

.recharge-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Header */
.chat-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 60px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 12px;
    font-weight: 600;
    font-size: 18px;
    z-index: 20;
}

.header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.header-options {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
}

.chat-page,
.session-page {
    padding-top: 60px;
}

/* Chat Content Area */
.chat-content {
    flex: 1;
    background-color: var(--bg-color);
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 130px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.message {
    display: flex;
    margin-bottom: 10px;
    max-width: 85%;
}

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

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

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

.bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    max-width: 80ch;
    white-space: pre-wrap;
}

.system-message .bubble {
    background-color: var(--incoming-bubble);
    border-radius: 16px 16px 16px 4px;
}

.user-message .bubble {
    background-color: var(--outgoing-bubble);
    border-radius: 16px 16px 4px 16px;
}

.assistant-message .bubble {
    background-color: var(--incoming-bubble);
    border-radius: 16px 16px 16px 4px;
}

.user-message-failed .bubble {
    border: 1px solid #f97373;
}

.message-retry-btn {
    margin-left: 6px;
    align-self: center;
    border: none;
    background: none;
    color: #f97373;
    font-size: 14px;
    cursor: pointer;
}

.out-of-points-bubble {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.08), rgba(77, 182, 172, 0.12));
}

.out-of-points-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.out-of-points-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.out-of-points-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.out-of-points-btn {
    flex: 1;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(79, 195, 247, 0.5);
    background-color: #ffffff;
    font-size: 13px;
    color: var(--primary-color);
}

.out-of-points-btn.primary {
    border: none;
    background: linear-gradient(135deg, #4FC3F7, #4DB6AC);
    color: #ffffff;
}

/* Input Area */
.chat-input-area {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 60px;
    width: 100%;
    max-width: 600px;
    min-height: 55px;
    background-color: #f7f7f7;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 8px 10px;
    gap: 10px;
    z-index: 18;
}

.icon-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    font-size: 20px;
    color: #4a4a4a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-wrapper {
    flex: 1;
    background-color: #fff;
    border-radius: 4px;
    padding: 8px;
}

#message-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    max-height: 100px;
}

.send-btn {
    background-color: var(--outgoing-bubble);
    color: #fff; /* Actually WeChat uses green bg with white text or similar */
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.send-btn:disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
}

.tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 60px;
    padding: 0 20px env(safe-area-inset-bottom);
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.16);
}

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    border-radius: 999px;
}

.tabbar-icon {
    font-size: 18px;
}

.tabbar-icon-main {
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4FC3F7, #4DB6AC);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(79, 195, 247, 0.35);
}

.tabbar-label {
    font-size: 11px;
}

.tabbar-item-active {
    color: var(--primary-color);
    background-color: rgba(79, 195, 247, 0.12);
}

.share-mask {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: 50;
}

.share-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background-color: #ffffff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.12);
    padding: 10px 18px 16px;
    z-index: 60;
}

.share-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.share-sheet-title {
    font-size: 14px;
    color: var(--text-primary);
}

.share-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.share-options {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    margin-top: 4px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: none;
    background: none;
    font-size: 12px;
    color: var(--text-secondary);
}

.share-option i {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.share-footer-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message {
    animation: fadeIn 0.3s ease-out;
}

.page-fade-out {
    animation: pageFadeOut 0.35s ease-out forwards;
}

@keyframes pageFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

.typing-indicator {
    display: inline-flex;
    gap: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

.typing-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    animation: typing 1s infinite ease-in-out;
}

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

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

@keyframes typing {
    0% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
    100% { opacity: 0.2; transform: translateY(0); }
}

.thinking-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.error-message .bubble {
    background-color: #ffecec;
    color: #b00020;
}

.bubble .rich-text h1,
.bubble .rich-text h2,
.bubble .rich-text h3 {
    font-weight: 600;
    margin: 4px 0 2px;
}

.bubble .rich-text h1 {
    font-size: 18px;
}

.bubble .rich-text h2 {
    font-size: 16px;
}

.bubble .rich-text h3 {
    font-size: 15px;
}

.bubble .rich-text p {
    margin: 4px 0;
}

.bubble .rich-text ul,
.bubble .rich-text ol {
    margin: 4px 0 4px 18px;
}

.hidden {
    display: none;
}

.bubble .rich-text code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background-color: rgba(0, 0, 0, 0.04);
    padding: 0 3px;
    border-radius: 2px;
}

.bubble .rich-text pre {
    margin: 4px 0;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre-wrap;
}

/* Emoji Picker */
.emoji-picker {
    height: 200px;
    background-color: #f7f7f7;
    border-top: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

.emoji-picker.hidden {
    display: none;
}

.emoji-item {
    font-size: 24px;
    text-align: center;
    cursor: pointer;
}

.session-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.session-action-btn {
    width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    border: none;
    background-color: #f5f5f5;
    font-size: 14px;
    color: var(--text-primary);
    text-align: left;
}

.session-list {
    margin-top: 12px;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.session-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 6px 2px;
    border-bottom: 1px solid #f0f0f0;
}

.session-item-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.session-item-title {
    font-size: 14px;
    color: var(--text-primary);
}

.session-item-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.session-item-snippet {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.session-item-pin {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffb300;
}

.session-op {
    font-size: 11px;
    color: var(--primary-color);
    cursor: pointer;
}
