/* 前台样式 - 简约风格 */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;

    /* 浅色主题 */
    --chat-bg: #f7f8fa;
    --chat-header-bg: #ffffff;
    --chat-header-text: #1f2329;
    --chat-header-border: #e5e6eb;
    --message-bg: #ffffff;
    --message-text: #1f2329;
    --user-message-bg: #3370ff;
    --user-message-text: #ffffff;
    --input-bg: #ffffff;
    --input-border: #e5e6eb;
    --input-text: #1f2329;
    --textarea-bg: #f7f8fa;
    --quota-text: #8f959e;
    --avatar-ai: linear-gradient(135deg, #3370ff 0%, #245bdb 100%);
    --avatar-user: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
}

/* 深色主题 */
body[data-theme="dark"] {
    --chat-bg: #1a1a1a;
    --chat-header-bg: #2d2d2d;
    --chat-header-text: #e5e5e5;
    --chat-header-border: #3d3d3d;
    --message-bg: #2d2d2d;
    --message-text: #e5e5e5;
    --user-message-bg: #3370ff;
    --user-message-text: #ffffff;
    --input-bg: #2d2d2d;
    --input-border: #3d3d3d;
    --input-text: #e5e5e5;
    --textarea-bg: #1a1a1a;
    --quota-text: #999999;
    --avatar-ai: linear-gradient(135deg, #4a80ff 0%, #3370ff 100%);
    --avatar-user: linear-gradient(135deg, #00e6c3 0%, #00d4aa 100%);
}

/* 护眼主题 */
body[data-theme="eye-care"] {
    --chat-bg: #c7edcc;
    --chat-header-bg: #e8f5e9;
    --chat-header-text: #2e7d32;
    --chat-header-border: #a5d6a7;
    --message-bg: #e8f5e9;
    --message-text: #1b5e20;
    --user-message-bg: #66bb6a;
    --user-message-text: #ffffff;
    --input-bg: #e8f5e9;
    --input-border: #a5d6a7;
    --input-text: #1b5e20;
    --textarea-bg: #f1f8e9;
    --quota-text: #558b2f;
    --avatar-ai: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    --avatar-user: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f7f8fa;
    color: var(--text-color);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
}

/* 导航栏 - 豆包风格 */
.navbar {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: none;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-brand {
    font-size: 22px;
    font-weight: 600;
    color: #3370ff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-menu {
    display: flex;
    gap: 8px;
    align-items: center;
}

.navbar-menu a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.navbar-menu a:hover {
    background: #3370ff;
    color: white;
}

/* 聊天容器 - 豆包风格 */
.chat-container {
    max-width: 100%;
    margin: 0;
    background: var(--chat-bg);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transition: background 0.3s ease;
}

/* 电脑端样式优化 - 必须在基础样式之后 */
@media (min-width: 769px) {
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        min-height: 100vh;
    }
    
    body[data-theme="dark"] {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    body[data-theme="eye-care"] {
        background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
    }
    
    .navbar {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .chat-container {
        position: absolute !important;
        max-width: 900px !important;
        width: 900px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: 80px !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
        height: calc(100vh - 100px) !important;
        overflow: hidden;
    }
    
    .chat-header {
        border-radius: 16px 16px 0 0;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid #e5e6eb;
    }
    
    .chat-input {
        border-radius: 0 0 16px 16px;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .chat-messages {
        background: linear-gradient(180deg, #f7f8fa 0%, #ffffff 100%);
    }
    
    body[data-theme="dark"] .chat-container {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
    
    body[data-theme="dark"] .chat-header,
    body[data-theme="dark"] .chat-input {
        background: rgba(45, 45, 45, 0.98);
    }
    
    body[data-theme="dark"] .chat-messages {
        background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    }
    
    body[data-theme="eye-care"] .chat-container {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
    
    body[data-theme="eye-care"] .chat-header,
    body[data-theme="eye-care"] .chat-input {
        background: rgba(232, 245, 233, 0.98);
    }
    
    body[data-theme="eye-care"] .chat-messages {
        background: linear-gradient(180deg, #c7edcc 0%, #e8f5e9 100%);
    }
    
    .message-content {
        max-width: 70%;
    }
    
    .word-card {
        min-width: 280px;
    }
}

/* 汉堡菜单按钮 */
.menu-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1001;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 4px;
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    opacity: 0.7;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--chat-header-text);
    border-radius: 2px;
    transition: all 0.2s;
    display: block;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 侧边菜单 */
.side-menu {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    background: var(--chat-header-bg);
    z-index: 1002;
    transition: left 0.3s ease, background 0.3s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
}

.side-menu.active {
    left: 0;
}

.side-menu-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e6eb;
    min-height: 56px;
}

.side-menu-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--chat-header-text);
    transition: color 0.3s ease;
}

.menu-close {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--quota-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease;
}

.side-menu-content {
    padding: 4px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--chat-header-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
}

.menu-item:hover {
    background: var(--textarea-bg);
}

.menu-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* 主题切换样式 */
.menu-divider {
    height: 1px;
    background: #e5e6eb;
    margin: 8px 0;
}

.theme-selector {
    cursor: default;
    font-weight: 500;
    color: #1f2329;
}

.theme-selector:hover {
    background: transparent;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px 16px 12px 16px;
}

.theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: #f7f8fa;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #1f2329;
}

.theme-btn:hover {
    background: #e5e6eb;
}

.theme-btn.active {
    background: #e7f0ff;
    border-color: #3370ff;
    color: #3370ff;
}

.theme-btn span:first-child {
    font-size: 24px;
}

/* 遮罩层 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: var(--chat-header-bg);
    color: var(--chat-header-text);
    padding: 0 20px;
    text-align: center;
    border-bottom: 1px solid var(--chat-header-border);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.chat-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.audio-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.audio-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.audio-toggle.active {
    background: rgba(51, 112, 255, 0.1);
}

.audio-toggle.active .audio-icon {
    animation: pulse 1s infinite;
}

body[data-theme="dark"] .audio-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .audio-toggle.active {
    background: rgba(51, 112, 255, 0.2);
}

.speak-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    margin-top: 4px;
    opacity: 0.6;
}

.speak-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

.speak-btn.speaking {
    background: rgba(51, 112, 255, 0.1);
    opacity: 1;
    animation: pulse 1s infinite;
}

body[data-theme="dark"] .speak-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .speak-btn.speaking {
    background: rgba(51, 112, 255, 0.2);
}

.chat-header p {
    display: none;
}

.quota-info {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin: 0;
    font-size: 13px;
    color: var(--quota-text);
    position: absolute;
    right: 20px;
    transition: color 0.3s ease;
}

/* 聊天消息区 - 豆包风格 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    padding-bottom: 8px;
    background: var(--chat-bg);
    transition: background 0.3s ease;
}

.message {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--avatar-ai);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.message.user .message-avatar {
    background: var(--avatar-user);
}

.message-content {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--message-bg);
    color: var(--message-text);
    box-shadow: none;
    font-size: 16px;
    line-height: 1.6;
    word-wrap: break-word;
    transition: all 0.3s ease;
}

.message.user .message-content {
    background: var(--user-message-bg);
    color: var(--user-message-text);
}

.message-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.message-source {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-top: 5px;
    background: #e3f2fd;
    color: #1976d2;
}

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

.word-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 12px 16px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.word-title {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 6px;
    font-family: 'Georgia', serif;
}

.word-meaning {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.text-line {
    padding: 8px 0;
    line-height: 1.7;
    color: var(--message-text);
}

[data-theme="dark"] .word-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-left-color: #8b9fff;
}

[data-theme="dark"] .word-title {
    color: #8b9fff;
}

[data-theme="dark"] .word-meaning {
    color: #e0e0e0;
}

[data-theme="eye-care"] .word-card {
    background: linear-gradient(135deg, #f5f0e6 0%, #faf8f3 100%);
    border-left-color: #8b7355;
}

[data-theme="eye-care"] .word-title {
    color: #8b7355;
}

[data-theme="eye-care"] .word-meaning {
    color: #4a4a4a;
}

@media (max-width: 768px) {
    .word-card {
        padding: 10px 12px;
    }
    
    .word-title {
        font-size: 16px;
    }
    
    .word-meaning {
        font-size: 14px;
    }
}

/* 风格选择器 */
.style-selector-bar {
    padding: 8px 16px;
    background: var(--input-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.style-label {
    display: none;
}

.style-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.style-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--quota-text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.style-btn:hover {
    color: #3370ff;
}

.style-btn.active {
    background: #3370ff;
    color: white;
}

/* 输入区 - APP风格 */
.chat-input {
    padding: 8px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--input-bg);
    border-top: 1px solid var(--input-border);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.input-group {
    display: flex;
    align-items: flex-end;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.input-group textarea {
    flex: 1;
    padding: 12px 52px 12px 16px;
    border: 1px solid var(--input-border);
    border-radius: 24px;
    resize: none;
    font-size: 15px;
    font-family: inherit;
    background: var(--textarea-bg);
    color: var(--input-text);
    transition: all 0.3s;
    max-height: 120px;
    line-height: 1.6;
    min-height: 48px;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.input-group textarea::-webkit-scrollbar {
    display: none;
}

.input-group textarea:focus {
    outline: none;
    border-color: #3370ff;
    background: var(--input-bg);
    box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.1);
}

.btn-send {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3370ff 0%, #245bdb 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(51, 112, 255, 0.3);
}

.btn-send:hover {
    background: linear-gradient(135deg, #245bdb 0%, #1a4bb8 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(51, 112, 255, 0.4);
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send:disabled {
    background: #e5e6eb;
    color: #8f959e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* 加载点点动画 - 豆包风格 */
.loading-dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.loading-dots span {
    animation: bounce 1.4s infinite ease-in-out both;
    font-size: 16px;
    color: white;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

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

/* AI思考动画 - 豆包风格 */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8f959e;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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

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

.message.thinking {
    opacity: 1;
}

.message.thinking .message-content {
    background: white;
    padding: 12px 14px;
}

/* 个人中心 */
.user-center {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.user-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3370ff 0%, #245bdb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
}

.user-details h2 {
    margin-bottom: 5px;
    font-size: 20px;
}

.user-details p {
    color: #666;
    font-size: 14px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #3370ff;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 订单列表 */
.order-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.order-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.order-info h4 {
    margin-bottom: 5px;
}

.order-info p {
    font-size: 14px;
    color: #666;
}

.order-status {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.order-status.pending {
    background: #fff3e0;
    color: #f57c00;
}

.order-status.success {
    background: #e8f5e9;
    color: #388e3c;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 22px;
    margin: 0;
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--quota-text);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--border-color);
    color: var(--text-color);
}

/* 充值页面 */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pricing-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 36px;
    font-weight: bold;
    color: #3370ff;
    margin: 20px 0;
}

.pricing-features {
    list-style: none;
    margin: 20px 0;
    text-align: left;
}

.pricing-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.btn-buy {
    width: 100%;
    padding: 12px;
    background: #3370ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-buy:hover {
    background: #245bdb;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3370ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn:hover {
    background: #245bdb;
    color: white;
}

.btn-primary {
    background: #3370ff;
}

.btn-primary:hover {
    background: #245bdb;
}

.btn-success {
    background: #4CAF50;
}

.btn-success:hover {
    background: #45a049;
}

.btn-danger {
    background: #f56c6c;
}

.btn-danger:hover {
    background: #e64545;
}

.btn-warning {
    background: #e6a23c;
    color: white;
}

.btn-warning:hover {
    background: #d4940f;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* 响应式 - 豆包风格 */
@media (max-width: 768px) {
    body {
        position: fixed;
        width: 100%;
    }

    .navbar {
        display: none; /* 手机端隐藏导航栏 */
    }

    /* 显示汉堡菜单按钮 */
    .menu-toggle {
        display: flex;
    }

    .chat-container {
        height: 100vh;
        height: 100dvh; /* 动态视口高度，适配手机浏览器 */
    }

    .chat-header {
        height: 50px;
        padding: 0 12px;
        padding-left: 50px; /* 为汉堡菜单留出空间 */
        justify-content: center;
    }

    .chat-header h1 {
        font-size: 16px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .quota-info {
        font-size: 12px;
        right: 12px;
    }

    .chat-messages {
        padding: 12px;
        padding-bottom: 8px;
    }

    .chat-input {
        padding: 8px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom)); /* 适配iPhone底部安全区 */
    }

    .message {
        margin-bottom: 12px;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .message-content {
        max-width: 80%;
        padding: 9px 12px;
        font-size: 14px;
    }

    .navbar-container {
        padding: 0 12px;
    }

    .navbar-brand {
        font-size: 16px;
        font-weight: 600;
    }

    .navbar-menu {
        gap: 8px;
    }

    .navbar-menu a {
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 16px;
        background: #f7f8fa;
        color: #1f2329;
    }

    .navbar-menu a:hover {
        background: #e5e6eb;
        color: #1f2329;
    }

    .input-group textarea {
        font-size: 15px;
        padding: 11px 48px 11px 14px;
        min-height: 44px;
        border-radius: 22px;
    }

    .btn-send {
        width: 36px;
        height: 36px;
        font-size: 16px;
        right: 4px;
        bottom: 4px;
    }

    /* 个人中心手机端 */
    .user-center {
        margin: 60px 0 0 0;
        padding: 12px;
        height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .user-card {
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .user-avatar {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .user-details h2 {
        font-size: 18px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-item {
        padding: 16px 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    /* 订单列表手机端 */
    .order-list {
        border-radius: 12px;
    }

    .order-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .order-info h4 {
        font-size: 15px;
    }

    .order-info p {
        font-size: 13px;
    }

    /* 充值页面手机端 */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }

    .pricing-card {
        padding: 20px;
        border-radius: 12px;
    }

    .pricing-card h3 {
        font-size: 20px;
    }

    .pricing-price {
        font-size: 28px;
        margin: 16px 0;
    }

    .pricing-features {
        margin: 16px 0;
    }

    .pricing-features li {
        font-size: 14px;
        padding: 6px 0;
    }

    .btn-buy {
        padding: 10px;
        font-size: 15px;
        border-radius: 20px;
    }
}
