/* Vue v-cloak 指令样式：在 Vue 挂载完成前隐藏模板 */
[v-cloak] {
    display: none !important;
}

/* 全局样式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f6fa;
    --text-color: #2c3e50;
    --border-color: #e1e8ed;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --sidebar-width: 200px;
    --sidebar-collapsed-width: 60px;
    --bg-gradient-1: #b7d0ff;
    --bg-gradient-2: #cadefd;
    --bg-gradient-3: #a3c9fa;
}

@keyframes wave {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes flowLight {
    0% {
        background-position: -100% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes cloudMove {
    from {
        transform: translateX(-100%) scale(1);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    to {
        transform: translateX(100vw) scale(1.2);
        opacity: 0;
    }
}

@keyframes cloudShape {
    0%, 100% {
        border-radius: 60% 40% 70% 30% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 40% 60% 30% 70% / 30% 60% 40% 70%;
    }
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2), var(--bg-gradient-3));
    background-size: 400% 400%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* 页面布局容器 */
.page-container {
    flex: 1;
    display: flex;
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* 主要内容区域容器 */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: margin-left 0.3s ease;
    height: 100%;
    overflow: hidden;
}

/* 当侧边栏展开时，给主内容区域添加左边距 */
.content-wrapper-with-sidebar {
    margin-left: calc(var(--sidebar-width) + 1rem);
}

/* 当侧边栏收起时，减少左边距 */
.content-wrapper-with-sidebar-collapsed {
    margin-left: calc(var(--sidebar-collapsed-width) + 1rem);
}

/* 标题样式 */
.header {
    color: var(--text-color);
    padding: 1rem;
    text-align: center;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    overflow: visible;
}

.clouds-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.cloud {
    position: absolute;
    width: 100px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    filter: blur(5px);
    animation: cloudMove 15s linear infinite, cloudShape 5s ease-in-out infinite;
}

.cloud1 {
    top: 20%;
    animation-delay: 0s;
}

.cloud2 {
    top: 40%;
    animation-delay: -5s;
    opacity: 0.6;
}

.cloud3 {
    top: 30%;
    animation-delay: -8s;
    opacity: 0.4;
}

.title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
    letter-spacing: 0.02em;
    font-style: italic;
}

.subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.85;
    letter-spacing: 0.03em;
}

/* ==================== 顶部右侧按钮区域样式 ==================== */
.header-actions {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 999999;  /* 确保用户菜单能覆盖页面所有元素 */
}

/* 联系我们按钮样式 */
.contact-us {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #4a90e2, #3a7bc8);
    color: white;
    border-radius: 25px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: none;
    text-align: center;
}

.contact-us:hover {
    background: linear-gradient(135deg, #3a7bc8, #2a6cb8);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-us:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==================== 用户头像区域样式 ==================== */
.user-avatar-container {
    position: relative;
    cursor: pointer;
    z-index: 999999;  /* 确保下拉菜单能覆盖页面其他元素 */
}

/* 用户头像（已登录状态） */
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 默认头像（未登录状态） */
.default-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e5ec, #d1d9e6);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.default-avatar svg {
    width: 24px;
    height: 24px;
    color: #8e99a4;
}

.default-avatar:hover {
    background: linear-gradient(135deg, #d1d9e6, #c2ccd8);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 已登录状态的默认头像（绿色系） */
.default-avatar.logged-in {
    background: linear-gradient(135deg, #a8e6cf, #88d8b0);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.default-avatar.logged-in svg {
    color: #2d8659;
}

.default-avatar.logged-in:hover {
    background: linear-gradient(135deg, #88d8b0, #6bcf97);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;  /* 相对于父容器定位，吸附在头像下方 */
    top: 100%;           /* 紧贴在头像下方 */
    right: 0;            /* 与头像右对齐 */
    margin-top: 8px;     /* 与头像保持间距 */
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    width: 420px;        /* 菜单宽度 */
    padding: 0;
    animation: fadeIn 0.2s ease;
    z-index: 999999;     /* 确保在所有元素之上，包括 sticky 元素 */
    overflow: hidden;
    max-height: calc(100vh - 120px);  /* 限制最大高度 */
    overflow-y: auto;
}

.user-info {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
}

.user-email {
    font-size: 0.82rem;
    color: #555;
    word-break: break-all;
    display: block;
    font-weight: 500;
}

/* ==================== 积分信息区域样式 ==================== */
.credits-section {
    padding: 0.8rem 1rem;
    background: #fafbff;
    border-bottom: 1px solid #f0f0f0;
}

.credits-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.credits-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.credits-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a90e2;
    background: linear-gradient(135deg, #4a90e2, #6c5ce7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credits-value.low-credits {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credits-note {
    width: 100%;
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.15rem;
    text-align: left;
}

/* 积分加载中样式 */
.loading-text {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}

.loading-spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid #e0e0e0;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* 加载失败样式 */
.load-failed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #e74c3c;
    font-weight: 500;
}

.retry-btn {
    padding: 0.25rem 0.6rem;
    background: linear-gradient(135deg, #4a90e2, #3a7bc8);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: linear-gradient(135deg, #3a7bc8, #2a6cb8);
    transform: scale(1.02);
}

/* 套餐状态样式 */
.subscription-info {
    margin-top: 0.5rem;
    padding: 0.5rem 0.7rem;
    background: linear-gradient(135deg, #e8f4fd 0%, #e0f0ff 100%);
    border-radius: 8px;
    border: 1px solid #c5ddf8;
}

.subscription-type {
    font-size: 0.8rem;
    color: #3a7bc8;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.subscription-expire-date {
    font-size: 0.72rem;
    color: #666;
}

.subscription-expired {
    font-size: 0.75rem;
    color: #e74c3c;
    font-weight: 500;
    background: #fff5f5;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    margin-top: 0.2rem;
}

/* 积分不足提示 */
.no-credits-alert {
    margin-top: 0.5rem;
    padding: 0.5rem 0.7rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 1px solid #ffcccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.alert-icon {
    font-size: 1rem;
}

.alert-text {
    font-size: 0.75rem;
    color: #c0392b;
    font-weight: 500;
    line-height: 1.3;
}

/* ==================== 套餐购买区域样式 ==================== */
.plans-section {
    padding: 0.8rem 1rem;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.plans-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #333;
    margin-bottom: 0.6rem;
}

/* 套餐卡片容器 - 并排显示 */
.plans-container {
    display: flex;
    gap: 0.6rem;
}

.plan-card {
    position: relative;
    flex: 1;
    padding: 0.7rem 0.8rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 2px solid #e0e8f5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
}

.plan-card:hover {
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.plan-card:active {
    transform: translateY(0);
}

.plan-card.purchasing {
    opacity: 0.6;
    pointer-events: none;
}

/* 套餐卡片禁用状态（支付功能即将上线） */
.plan-card.plan-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.plan-card.plan-disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e0e8f5;
}

.plan-card-yearly.plan-disabled:hover {
    border-color: #f5d78e;
}

/* "即将上线"提示文字（在标题后面） */
.plans-coming-soon {
    font-size: 0.72rem;
    color: #999;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.plan-card-yearly {
    background: linear-gradient(135deg, #fff8e6 0%, #fff3d6 100%);
    border-color: #f5d78e;
}

.plan-card-yearly:hover {
    border-color: #f0b429;
    box-shadow: 0 4px 12px rgba(240, 180, 41, 0.25);
}

.plan-badge {
    position: absolute;
    top: -1px;
    right: 8px;
    background: linear-gradient(135deg, #f0b429, #e69500);
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 4px rgba(240, 180, 41, 0.4);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.plan-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #333;
}

.plan-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4a90e2;
}

.plan-card-yearly .plan-price {
    color: #e69500;
}

.plan-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-credits {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.plan-note {
    font-size: 0.65rem;
    color: #999;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* 购买中遮罩层 */
.purchasing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.purchasing-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 退出登录按钮 */
.user-menu-actions {
    padding: 0.4rem 0;
    background: #fafafa;
}

.logout-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #e74c3c;
    transition: background-color 0.2s;
    display: block;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.logout-btn:hover {
    background-color: #fff0f0;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .header-actions {
        top: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }
    
    .contact-us {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .user-avatar,
    .default-avatar {
        width: 36px;
        height: 36px;
    }
    
    .default-avatar svg {
        width: 20px;
        height: 20px;
    }
    
    /* 移动端用户下拉菜单适配 */
    .user-dropdown {
        width: 340px;
        right: 0;
    }
    
    .credits-section,
    .plans-section,
    .user-info {
        padding: 0.7rem 0.85rem;
    }
    
    .credits-value {
        font-size: 1.3rem;
    }
    
    .plans-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .plan-card {
        padding: 0.6rem 0.75rem;
    }
    
    .plan-name {
        font-size: 0.82rem;
    }
    
    .plan-price {
        font-size: 0.88rem;
    }
}

/* 主容器样式 */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden; /* 改为hidden，由chat-container控制滚动 */
    position: relative; /* 为固定定位的元素提供参考 */
}

/* 聊天区域样式 */
.chat-container {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    min-height: 300px;
    position: relative; /* 为内部滚动提供参考 */
}

.chat-messages {
    position: absolute; /* 绝对定位实现滚动 */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 10px;
}

.chat-messages:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

.message-group {
    margin-bottom: 0.5rem;
}

.user-message {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.uploaded-image {
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.bot-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
}

.bot-avatar {
    margin-right: 1rem;
}

.bot-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.message-content {
    background-color: var(--secondary-color);
    padding: 0.4rem;
    border-radius: 12px;
    max-width: 70%;
    box-shadow: 0 2px 4px var(--shadow-color);
    position: relative;
}

.message-content pre {
    margin: 0;
    padding: 0;
    background: none;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
}

.message-content code {
    font-family: inherit;
    background: none;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 90px;
    justify-content: center;
}

.copy-btn:hover {
    background: #357abd;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: var(--success-color);
    pointer-events: none;
}

.copy-success {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s;
    display: inline-block;
    pointer-events: none;
}

.copy-success.show {
    opacity: 1;
}

.robot-avatar {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    border-radius: 50%;
    object-fit: cover;
}

.robot-message {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
}

/* 打字动画样式 */
.typing-message {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
}

.typing-text {
    display: inline-block;
    color: var(--text-color);
}

.typing-cursor {
    display: inline-block;
    margin-left: 2px;
    font-weight: bold;
    animation: blink 1s infinite;
    color: var(--primary-color);
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 1rem;
    left: 1rem;
    bottom: 1rem;
    width: var(--sidebar-width);
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

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

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 10px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

.sidebar-collapsed {
    width: var(--sidebar-collapsed-width);
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle::before {
    content: "❮";
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.sidebar-collapsed .sidebar-toggle::before {
    content: "❯";
}

.sidebar-toggle:hover {
    background-color: rgba(74, 144, 226, 0.1);
    transform: scale(1.1);
}

.sidebar-content {
    margin-top: 2.4rem;
    padding: 0 0.2rem;
}

.sidebar-content h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    text-align: center;
}

.sidebar-content ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar-content li {
    position: relative;
    padding: 0.6rem 0.6rem 0.6rem 1.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;
    background-color: var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-content li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-content li:before {
    content: "•";
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1;
}

.sidebar-collapsed .sidebar-content {
    display: none;
}

.sidebar-collapsed .important-notice {
    display: none;
}

.sidebar-image {
    margin-top: 0.6rem;
    text-align: center;
    padding: 0.4rem;
    background-color: var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.instruction-image {
    max-width: 90%;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.qrcode-container {
    margin-top: 0.8rem;
    text-align: center;
    padding: 0.5rem;
}

.qrcode-image {
    max-width: 80%;
    border-radius: 2px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
    border: 1px solid white;
}

/* 公式格式区域样式 */
.format-section {
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.format-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.format-header h4 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--primary-color);
}

.format-section pre {
    background: white;
    border-radius: 4px;
    padding: 0.8rem;
    margin: 0;
    overflow-x: auto;
}

.mathml-preview {
    background: white;
    border-radius: 4px;
    padding: 1rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: left;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 90px;
    justify-content: center;
}

.copy-btn:hover {
    background: #357abd;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: var(--success-color);
    pointer-events: none;
}

.copy-success {
    display: none;
    color: var(--success-color);
    font-size: 0.85rem;
    margin-left: 0.5rem;
    position: absolute;
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 0.2s ease;
}

/* 侧边栏子项目样式 */
.sub-item {
    padding-left: 1.2rem;
    font-size: 0.9rem;
    color: #666;
}

/* 上传区域样式 */
.upload-container {
    background: white;
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    flex-shrink: 0; /* 保持不收缩 */
    position: sticky; /* 固定位置 */
    bottom: 0;
    z-index: 10;
    background-color: var(--secondary-color); /* 添加背景色，防止透明 */
    width: 100%; /* 确保宽度为100% */
    margin-top: 1.0rem; /* 添加上边距 */
}

.input-area {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    min-height: 80px; /* 最小高度而不是固定高度 */
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
}

.upload-area {
    flex: 1;
    min-width: 200px; /* 设置最小宽度 */
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    border-color: #a3c9fa; /* 浅蓝色边框 */
}

.upload-icon img {
    width: 40px;
    height: 24px;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.upload-text {
    color: #666;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.75rem, 2vw, 0.95rem); /* 使用clamp函数使字体大小自适应 */
    font-weight: 400;
    letter-spacing: 0.01em;
    max-width: 100%; /* 确保文本不会溢出容器 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 文本溢出时显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制最多显示2行 */
    line-clamp: 2; /* 标准属性，提高兼容性 */
    -webkit-box-orient: vertical;
    word-wrap: break-word; /* 允许长单词换行 */
}

.preview-area {
    flex: 1;
    position: relative;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 90px;
    border-radius: 8px;
}

.remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--error-color);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.remove-btn:hover {
    background-color: #c0392b;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    flex-shrink: 0; /* 防止按钮区域收缩 */
    min-width: 240px; /* 设置最小宽度确保按钮可见 */
}

.send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    min-width: 100px;
}

.send-btn:hover {
    background-color: #357abd;
    transform: translateY(-1px);
}

.send-btn-disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.send-btn-disabled:hover {
    background-color: #ccc;
    transform: none;
}

.export-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0 2rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    min-width: 140px;
    white-space: nowrap;
}

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

/* 必读说明样式 */
.important-notice {
    position: absolute;
    top: 1.1rem;
    left: 0.9rem;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.03em;
}

/* 识别中的提示样式 */
.analyzing-indicator {
    display: flex;
    align-items: center;
    background-color: var(--secondary-color);
    padding: 0.4rem 0.8rem;
    margin: 0;
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

.message-status {
    margin: 0;
    padding: 0;
}

.random-quote {
    margin: 0;
    padding-top: 0.1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 作者信息样式 */
.author-note {
    margin-top: 0.7rem;
    padding: 0.8rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #666;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    text-align: left;
    font-style: italic;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 模态弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    transform-origin: center;
    transition: transform 0.1s ease;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.modal-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 格式信息样式 */
.format-info {
    margin: 1rem 0 0.2rem 0;
    padding: 0.6rem 0.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

.format-info p {
    margin: 0.4rem 0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: #555;
}

.format-info p:first-child {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.clickable-text {
    cursor: pointer;
    transition: color 0.2s ease;
}

.clickable-text:hover {
    color: var(--primary-color);
}

.link-text {
    color: var(--primary-color);
    text-decoration: underline;
    margin-left: 0.3rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .page-container {
        height: auto;
        overflow: visible;
    }

    .content-wrapper {
        margin-left: 0;
    }

    .header {
        position: static; /* 移动端取消固定位置 */
    }

    .upload-container {
        position: sticky; /* 保持固定位置 */
        bottom: 0;
        padding: 0.5rem; /* 减小内边距 */
        margin-top: 0.5rem; /* 减小上边距 */
    }

    .chat-messages {
        position: static; /* 移动端使用普通布局 */
        max-height: 500px; /* 限制移动端高度 */
    }

    .content-wrapper {
        padding: 1rem;
    }

    .content-wrapper-with-sidebar,
    .content-wrapper-with-sidebar-collapsed {
        margin-left: 0;
    }

    .sidebar {
        left: -100%;
    }

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

    .input-area {
        flex-direction: column;
        min-height: auto; /* 移动端不设置最小高度 */
        gap: 0.5rem; /* 减小间距 */
    }

    .action-buttons {
        flex-direction: row;
        width: 100%; /* 确保按钮区域占满宽度 */
        margin-top: 0.5rem; /* 添加上边距 */
    }

    .send-btn, .export-btn {
        flex: 1;
        min-width: 0;
        padding: 0.75rem; /* 减小内边距 */
        font-size: 0.9rem; /* 减小字体大小 */
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .main-container {
        margin: 1rem auto;
    }

    .message-content {
        max-width: 85%;
    }
    
    .upload-text {
        font-size: clamp(0.7rem, 1.5vw, 0.9rem); /* 更小的字体尺寸范围 */
        -webkit-line-clamp: 3; /* 允许显示3行 */
        line-clamp: 3; /* 标准属性，提高兼容性 */
        -webkit-box-orient: vertical;
        word-wrap: break-word; /* 允许长单词换行 */
    }
    
    .action-buttons {
        min-width: 100%; /* 确保按钮区域占满宽度 */
    }
}

/* 添加小屏幕设备的额外适配 */
@media (max-width: 480px) {
    .upload-container {
        padding: 0.4rem;
    }
    
    .input-area {
        gap: 0.4rem;
    }
    
    .send-btn, .export-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
}

/* 随机句子样式 */
.random-quote {
    margin-top: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quote-text {
    font-size: 1.2rem;
    color: #666;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-weight: bold;
    font-style: italic;
    position: relative;
}

.quote-text.fade-in {
    opacity: 1;
}

/* 亮光滑动效果 */
.quote-text.fade-in::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    animation: shine 7s ease-in-out;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* 页脚样式 */
.footer {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 3px 0;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #777;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer p {
    margin: 0;
}

.footer a {
    color: #777;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Footer 分隔符和法律链接样式 */
.footer-separator {
    margin: 0 0.5rem;
    color: #aaa;
}

.legal-link {
    color: #4a90e2 !important;
    text-decoration: underline !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

.legal-link:hover {
    color: #357abd !important;
}

/* ==================== 法律条款弹窗样式 ==================== */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fadeIn 0.2s ease;
}

.legal-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.25s ease;
    display: flex;
    flex-direction: column;
}

.legal-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.4rem;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 10;
}

.legal-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.legal-modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    padding: 1.5rem 2rem;
    margin: 0;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.legal-modal-body {
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;
    flex: 1;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
}

.legal-modal-body::-webkit-scrollbar {
    width: 8px;
}

.legal-modal-body::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.legal-effective-date {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e0e0e0;
}

.legal-modal-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0 0.75rem;
    padding-left: 0.75rem;
    border-left: 3px solid #4a90e2;
}

.legal-modal-body h3:first-of-type {
    margin-top: 0;
}

.legal-modal-body p {
    margin: 0 0 1rem;
    text-align: justify;
}

.legal-modal-body ul {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.legal-modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-modal-body a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-modal-body a:hover {
    color: #357abd;
    text-decoration: underline;
}

.legal-modal-body strong {
    color: #333;
    font-weight: 600;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .legal-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 1rem;
    }
    
    .legal-modal-title {
        font-size: 1.3rem;
        padding: 1.25rem 1.5rem;
        padding-right: 3rem;
    }
    
    .legal-modal-body {
        padding: 1.25rem 1.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .legal-modal-body h3 {
        font-size: 1rem;
    }
    
    .footer-content p {
        font-size: 0.75rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .footer-content p {
        font-size: 0.7rem;
    }
    
    .footer-separator {
        display: block;
        margin: 0.25rem 0;
    }
    
    .legal-modal-content {
        border-radius: 12px;
    }
    
    .legal-modal-title {
        font-size: 1.15rem;
        padding: 1rem 1.25rem;
    }
    
    .legal-modal-body {
        padding: 1rem 1.25rem 1.25rem;
        font-size: 0.85rem;
    }
}

/* ==================== 登录弹窗样式 ==================== */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.login-modal-content {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    width: 90%;
    max-width: 340px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.2s ease;
}

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

/* 关闭按钮 */
.login-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.login-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* 弹窗标题 */
.login-modal-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.login-modal-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    color: #333;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* 登录选项容器 */
.login-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Google 登录按钮 */
.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-login-btn:hover:not(:disabled) {
    border-color: #4285F4;
    background: #f8faff;
}

.google-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* 分隔线 */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #aaa;
    font-size: 0.75rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.login-divider span {
    padding: 0 0.75rem;
}

/* 邮箱登录表单 */
.email-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* 登录输入框 */
.login-input {
    padding: 0.65rem 0.9rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    outline: none;
}

.login-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.login-input::placeholder {
    color: #aaa;
}

/* 错误提示 */
.login-error {
    padding: 0.5rem 0.75rem;
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    color: #e74c3c;
    font-size: 0.8rem;
    text-align: center;
}

/* 邮箱登录/注册按钮 */
.email-auth-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.email-login-btn,
.email-register-btn {
    flex: 1;
    padding: 0.65rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.email-login-btn {
    background: linear-gradient(135deg, #4a90e2, #3a7bc8);
    color: white;
}

.email-login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3a7bc8, #2a6cb8);
}

.email-register-btn {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.email-register-btn:hover:not(:disabled) {
    background: #f0f7ff;
}

.email-login-btn:disabled,
.email-register-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 移动端响应式样式 */
@media (max-width: 480px) {
    .login-modal-content {
        padding: 1.25rem;
        margin: 0.75rem;
    }
    
    .login-modal-header h2 {
        font-size: 1.1rem;
    }
    
    /* 超小屏幕用户下拉菜单适配 */
    .user-dropdown {
        width: calc(100vw - 40px);
        max-width: 320px;
        right: 0;
        left: auto;
    }
    
    .credits-section,
    .plans-section,
    .user-info {
        padding: 0.6rem 0.75rem;
    }
    
    .credits-value {
        font-size: 1.1rem;
    }
    
    .plans-container {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .plan-card {
        padding: 0.55rem 0.65rem;
    }
    
    .plan-name {
        font-size: 0.78rem;
    }
    
    .plan-price {
        font-size: 0.82rem;
    }
    
    .plan-credits {
        font-size: 0.7rem;
    }
    
    .no-credits-alert {
        padding: 0.45rem 0.6rem;
    }
    
    .alert-text {
        font-size: 0.7rem;
    }
}