/* ===== 全局样式 ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* 移动端专用变量 */
    --mobile-padding: 1rem;
    --mobile-margin: 0.75rem;
    --mobile-font-size: 0.875rem;
    --mobile-line-height: 1.5;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    /* 防止移动端缩放 */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    /* iOS Safari 优化 */
    -webkit-overflow-scrolling: touch;
    /* 支持安全区域 */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 移动端触摸优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* iOS Safari 特殊优化 */
    -webkit-overflow-scrolling: touch;
    /* 防止iOS Safari的橡皮筋效果 */
    overscroll-behavior: none;
    /* 修复iOS Safari的100vh问题 */
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* ===== 导航栏样式 ===== */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    z-index: 1000;
    height: 70px;
    transition: all 0.3s ease;
    /* iOS Safari 导航栏优化 */
    -webkit-backdrop-filter: blur(20px);
    /* 支持安全区域 */
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin: 0;
    white-space: nowrap;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    white-space: nowrap;
}

/* 移动端导航栏优化 */
@media (max-width: 768px) {
    .navbar {
        height: 60px;
        padding: 0.5rem 0;
    }
    
    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
    
    .brand-title {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 56px;
        padding: 0.375rem 0;
        /* iPhone 15 特殊优化 */
        padding-top: max(0.375rem, env(safe-area-inset-top));
    }
    
    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 0.5rem !important;
    }
    
    .brand-title {
        font-size: 0.9rem;
    }
    
    .brand-subtitle {
        display: none;
    }
    
    .navbar-nav {
        display: none;
    }
}

/* iPhone 15 和类似设备的特殊优化 */
@media only screen 
  and (device-width: 393px) 
  and (device-height: 852px) 
  and (-webkit-device-pixel-ratio: 3) {
    
    /* 修复iPhone 15的viewport问题 */
    .main-wrapper {
        height: 100vh;
        height: -webkit-fill-available;
        padding-top: max(70px, env(safe-area-inset-top) + 70px);
    }
    
    .navbar {
        height: max(70px, env(safe-area-inset-top) + 56px);
        padding-top: env(safe-area-inset-top);
    }
    
    /* 优化触摸区域 */
    .btn, .mobile-sidebar-toggle, .history-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 修复滚动问题 */
    .sidebar-content, .main-content {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* iOS Safari 通用优化 */
@supports (-webkit-touch-callout: none) {
    .main-wrapper {
        height: -webkit-fill-available;
        /* 使用JavaScript设置的CSS变量 */
        height: calc(var(--vh, 1vh) * 100);
    }
    
    .main-wrapper .container-fluid {
        height: calc(-webkit-fill-available - 70px);
        height: calc(var(--vh, 1vh) * 100 - 70px);
    }
    
    /* 修复iOS Safari的输入框缩放问题 */
    .form-control {
        font-size: 16px !important;
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* 优化iOS Safari的滚动 */
    .sidebar-content, .main-content, .history-list {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* iOS Safari 侧边栏优化 */
    .sidebar-wrapper {
        /* 确保在iOS Safari中正确显示 */
        height: -webkit-fill-available;
        height: calc(var(--vh, 1vh) * 100 - 70px);
    }
    
    .mobile-sidebar-toggle {
        /* iOS Safari 触摸优化 */
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .sidebar-overlay {
        /* iOS Safari 遮罩层优化 */
        height: -webkit-fill-available;
        height: calc(var(--vh, 1vh) * 100);
    }
}

/* iOS Safari 特殊样式类 */
.ios-safari {
    /* 防止页面弹跳 */
    position: fixed;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.ios-safari .main-wrapper {
    position: relative;
    overflow: auto;
    height: calc(var(--vh, 1vh) * 100);
    -webkit-overflow-scrolling: touch;
}

.ios-safari .sidebar-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: calc(100% - 80px); /* 减去header高度 */
}

.ios-safari .main-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: 100%;
}

/* ===== 主布局 ===== */
.main-wrapper {
    padding-top: 70px;
    height: 100vh;
    height: -webkit-fill-available; /* iOS Safari 修复 */
    overflow: hidden;
    /* iOS Safari 优化 */
    -webkit-overflow-scrolling: touch;
}

.main-wrapper .container-fluid {
    height: calc(100vh - 70px);
    height: calc(-webkit-fill-available - 70px); /* iOS Safari 修复 */
    /* iOS Safari 滚动优化 */
    -webkit-overflow-scrolling: touch;
}

.main-wrapper .row {
    height: 100%;
    margin: 0;
}

.sidebar-wrapper {
    padding: 0;
    height: 100%;
    position: relative;
}

.sidebar {
    background: var(--bg-primary);
    height: 100%;
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    /* iOS Safari 滚动优化 */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* 移动端侧边栏 */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    /* 增强触摸体验 */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.mobile-sidebar-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.mobile-sidebar-toggle:active {
    transform: translateY(-50%) scale(0.95);
    background: var(--primary-dark);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998; /* 降低z-index，确保在侧边栏下方 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* 增强触摸体验 */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: none;
    /* 确保在所有设备上正确显示 */
    display: block;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* 强制显示 */
    display: block !important;
}

/* 移动端布局调整 */
@media (max-width: 992px) {
    .main-wrapper {
        padding-top: 60px;
    }
    
    .main-wrapper .container-fluid {
        height: calc(100vh - 60px);
    }
    
    .sidebar-wrapper {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 320px;
        height: calc(100vh - 60px);
        z-index: 1001; /* 提高z-index，确保在遮罩层之上 */
        transition: left 0.3s ease;
        /* 增强触摸滚动 */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        /* 确保侧边栏在遮罩层之上 */
        background: var(--bg-primary);
    }
    
    .sidebar-wrapper.show {
        left: 0;
    }
    
    .sidebar {
        border-right: none;
        box-shadow: var(--shadow-xl);
        /* 增强触摸体验 */
        touch-action: pan-y;
        /* 确保内容可见 */
        background: var(--bg-primary) !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* 确保侧边栏内容在移动端可见和可点击 */
    .sidebar-wrapper.show .sidebar-header,
    .sidebar-wrapper.show .sidebar-content {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* 确保侧边栏内的所有交互元素都可点击 */
    .sidebar-wrapper .history-item,
    .sidebar-wrapper .stat-card,
    .sidebar-wrapper .btn-create {
        pointer-events: auto !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
        touch-action: manipulation !important;
    }
    
    /* 移动端触摸优化 */
    .sidebar-wrapper .history-item:active,
    .sidebar-wrapper .stat-card:active,
    .sidebar-wrapper .btn-create:active {
        background-color: rgba(0, 0, 0, 0.05) !important;
        transform: scale(0.98) !important;
        transition: all 0.1s ease !important;
    }
    
    .main-content {
        width: 100%;
        padding: 0;
        /* 防止侧边栏打开时背景滚动 */
        transition: transform 0.3s ease;
    }
    
    .mobile-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 侧边栏打开时的主内容区域 */
    .sidebar-open .main-content {
        transform: translateX(0);
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        padding-top: 60px;
    }
    
    .main-wrapper .container-fluid {
        height: calc(100vh - 60px);
        padding: 0;
    }
    
    .sidebar-wrapper {
        width: 280px;
        top: 60px;
    }
    
    /* 调整遮罩层的覆盖区域 */
    .sidebar-overlay.show {
        clip-path: polygon(280px 0, 100% 0, 100% 100%, 280px 100%);
    }
}

@media (max-width: 480px) {
    .main-wrapper {
        padding-top: 56px;
    }
    
    .main-wrapper .container-fluid {
        height: calc(100vh - 56px);
    }
    
    .sidebar-wrapper {
        width: 280px; /* 增加宽度以适应小屏幕 */
        top: 56px;
    }
    
    .mobile-sidebar-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
        left: 8px;
        /* 增加触摸区域 */
        padding: 8px;
        margin: -8px;
    }
    
    /* 调整遮罩层的覆盖区域 */
    .sidebar-overlay.show {
        clip-path: polygon(280px 0, 100% 0, 100% 100%, 280px 100%);
    }
}

/* 竖屏模式特殊优化 */
@media (max-width: 992px) and (orientation: portrait) {
    .mobile-sidebar-toggle {
        /* 竖屏时调整位置 */
        top: calc(50% + 20px);
        left: 12px;
        /* 增加触摸区域 */
        min-width: 44px;
        min-height: 44px;
    }
    
    .sidebar-wrapper {
        /* 竖屏时侧边栏稍微窄一些 */
        width: min(85vw, 320px);
        /* 确保侧边栏在安全区域内 */
        top: max(60px, env(safe-area-inset-top, 60px));
        height: calc(100vh - max(60px, env(safe-area-inset-top, 60px)));
    }
    
    /* 竖屏时调整遮罩层的覆盖区域 */
    .sidebar-overlay.show {
        clip-path: polygon(min(85vw, 320px) 0, 100% 0, 100% 100%, min(85vw, 320px) 100%);
    }
    
    .sidebar-overlay {
        /* 确保遮罩层完全覆盖，但不覆盖侧边栏区域 */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        /* 确保在iOS Safari中正确显示 */
        height: -webkit-fill-available;
        /* 当侧边栏显示时，遮罩层不覆盖侧边栏区域 */
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    /* 当侧边栏显示时，调整遮罩层的覆盖区域 */
    .sidebar-overlay.show {
        clip-path: polygon(320px 0, 100% 0, 100% 100%, 320px 100%);
    }
}

/* 横屏模式优化 */
@media (max-width: 992px) and (orientation: landscape) {
    .mobile-sidebar-toggle {
        /* 横屏时位置稍微靠上 */
        top: calc(50% - 10px);
        left: 10px;
    }
    
    .sidebar-wrapper {
        /* 横屏时侧边栏可以稍微宽一些 */
        width: min(40vw, 350px);
    }
}

/* 超小屏幕特殊处理 */
@media (max-width: 360px) {
    .mobile-sidebar-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        left: 6px;
    }
    
    .sidebar-wrapper {
        width: calc(100vw - 40px);
    }
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.btn-create {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    touch-action: manipulation;
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark) 0%, #3730a3 100%);
    color: white;
}

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

.sidebar-content {
    padding: 1.25rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 移动端侧边栏内容优化 */
@media (max-width: 768px) {
    .sidebar-header {
        padding: 1rem;
    }
    
    .btn-create {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .sidebar-content {
        padding: 1rem;
    }
    
    .section-header h6 {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .sidebar-header {
        padding: 0.875rem;
    }
    
    .btn-create {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .btn-create i {
        font-size: 0.875rem;
    }
    
    .sidebar-content {
        padding: 0.875rem;
    }
}

.section-header h6 {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

.history-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.history-item h6 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== 用户统计区域 ===== */
.user-stats-section {
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.user-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    min-height: 60px;
}

.stat-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    margin-right: 0.625rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 移动端统计卡片优化 */
@media (max-width: 768px) {
    .user-stats-section {
        margin-bottom: 1.5rem;
    }
    
    .user-stats-grid {
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        min-height: 56px;
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    .stat-card .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        margin-right: 0.5rem;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .user-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.625rem;
        min-height: 52px;
    }
    
    .stat-card .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
        margin-right: 0.5rem;
    }
    
    .stat-number {
        font-size: 0.95rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
}

/* ===== 模式选择样式 ===== */
.mode-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.mode-option {
    position: relative;
}

.mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-label {
    display: block;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.mode-label:hover {
    border-color: var(--primary-light);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mode-option input[type="radio"]:checked + .mode-label {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: var(--shadow-lg);
}

.mode-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.mode-option input[type="radio"]:checked + .mode-label .mode-icon {
    background: var(--primary-color);
    color: white;
}

.mode-info {
    text-align: left;
}

.mode-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mode-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1rem;
}

.mode-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.spec-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.spec-item i {
    margin-right: 0.25rem;
}

.mode-option input[type="radio"]:checked + .mode-label .spec-item {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .mode-selection {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .mode-label {
        padding: 1rem;
    }
    
    .mode-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .mode-title {
        font-size: 0.875rem;
    }
    
    .mode-desc {
        font-size: 0.75rem;
    }
    
    .spec-item {
        font-size: 0.6875rem;
    }
}

/* ===== 主内容区域 ===== */
.main-content {
    padding: 1.5rem;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 移动端主内容区域优化 */
@media (max-width: 992px) {
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0.875rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }
}

/* ===== 欢迎区域 ===== */
.welcome-area {
    margin-bottom: 2rem;
}

.welcome-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 2rem;
}

.welcome-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.welcome-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-item span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== 表单样式 ===== */
.input-form {
    margin-bottom: 2rem;
}

.form-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-title i {
    font-size: 1.25rem;
}

.form-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.form-content {
    padding: 1.75rem;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.required {
    color: var(--danger-color);
    margin-left: 0.25rem;
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.input-counter {
    position: absolute;
    right: 0.875rem;
    bottom: 0.875rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-hint i {
    color: var(--info-color);
}

.form-actions {
    padding: 1.75rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.875rem;
    justify-content: flex-end;
}

/* 移动端表单优化 */
@media (max-width: 768px) {
    .form-content {
        padding: 1.25rem;
        max-height: calc(100vh - 200px);
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.625rem;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .form-control[type="textarea"] {
        min-height: 120px;
    }
    
    .input-counter {
        bottom: 0.75rem;
        right: 0.75rem;
        font-size: 0.65rem;
    }
    
    .form-hint {
        font-size: 0.75rem;
    }
    
    .form-actions {
        padding: 1.25rem;
        gap: 0.75rem;
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-content {
        padding: 1rem;
        max-height: calc(100vh - 160px);
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .form-control {
        padding: 0.625rem;
        font-size: 16px;
    }
    
    .input-counter {
        bottom: 0.625rem;
        right: 0.625rem;
        font-size: 0.6rem;
    }
    
    .form-hint {
        font-size: 0.7rem;
    }
    
    .form-actions {
        padding: 1rem;
    }
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

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

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

.btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--primary-light);
}

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

.btn-generate {
    min-width: 140px;
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        min-height: 44px; /* 符合触摸标准 */
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn-generate {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        min-height: 42px;
    }
    
    .btn-generate {
        min-width: 100px;
    }
}

/* ===== 加载状态 ===== */
.loading-state {
    margin-bottom: 2rem;
}

.loading-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.loading-animation {
    margin-bottom: 2rem;
}

.loading-spinner {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--primary-color) transparent transparent transparent;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.45s;
    border-color: var(--primary-light) transparent transparent transparent;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.3s;
    border-color: var(--primary-dark) transparent transparent transparent;
}

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

.loading-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.loading-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loading-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
    color: var(--primary-color);
}

.step i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step span {
    font-size: 0.875rem;
    font-weight: 500;
}

.progress-container {
    margin-bottom: 1rem;
}

.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-sm);
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0%, 100% { width: 30%; }
    50% { width: 70%; }
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ===== 结果区域 ===== */
.result-area {
    margin-bottom: 2rem;
}

/* ===== 结果区域背景优化 ===== */
.result-area .result-card {
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.result-area .result-content {
    background: #ffffff;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ===== 生成统计面板 ===== */
.generation-stats-panel {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.stats-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.stats-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.stat-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.stat-item:last-child,
.stat-item:nth-last-child(2) {
    border-bottom: none;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== 结果卡片 ===== */
.result-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.result-header {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.result-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.word-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.generation-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    font-weight: 500;
}

.btn-outline-primary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-success {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-success:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.result-content {
    padding: 2rem;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    background: #ffffff;
    color: #1a202c;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.3;
}

.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #2d3748;
    background: #ffffff;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a202c;
    line-height: 1.3;
}

.article-content h1 { 
    font-size: 1.875rem; 
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}
.article-content h2 { 
    font-size: 1.5rem; 
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}
.article-content h3 { font-size: 1.25rem; }
.article-content h4 { font-size: 1.125rem; }
.article-content h5 { font-size: 1rem; }
.article-content h6 { font-size: 0.875rem; }

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    color: #2d3748;
    line-height: 1.8;
    font-weight: 400;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: #f7fafc;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-style: italic;
    color: #4a5568;
}

.article-content code {
    background: #edf2f7;
    color: #6366f1;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
}

.article-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #4a5568;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #ffffff;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
}

.article-content th {
    background: #f7fafc;
    font-weight: 600;
    color: #1a202c;
}

.article-content tr:hover {
    background: #f7fafc;
}

.article-content strong {
    font-weight: 700;
    color: #1a202c;
}

.article-content em {
    font-style: italic;
    color: #4a5568;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-content a:hover {
    border-bottom-color: var(--primary-color);
}

.article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2rem 0;
}

/* ===== 错误提示 ===== */
.error-alert {
    margin-bottom: 2rem;
}

.error-card {
    background: var(--bg-primary);
    border: 2px solid var(--danger-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.error-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
}

.error-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ===== Toast 通知 ===== */
.toast {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1050;
    animation: slideUp 0.3s ease-out;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
}

.toast-icon.success {
    background: var(--success-color);
}

.toast-icon.error {
    background: var(--danger-color);
}

.toast-body {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

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

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

/* ===== 滚动条样式 ===== */
.history-list::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar,
.main-content::-webkit-scrollbar,
.form-content::-webkit-scrollbar,
.result-content::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track,
.form-content::-webkit-scrollbar-track,
.result-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb,
.form-content::-webkit-scrollbar-thumb,
.result-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover,
.sidebar-content::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover,
.form-content::-webkit-scrollbar-thumb:hover,
.result-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1200px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .welcome-card,
    .form-card,
    .result-card {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    /* 移除冲突的侧边栏样式，使用之前定义的 .sidebar-wrapper 样式 */
    
    .main-content {
        padding: 1rem;
        margin-left: 0;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .loading-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        padding-top: 70px;
    }
    
    .navbar {
        padding: 0.75rem 0;
        height: 70px;
    }
    
    .brand-title {
        font-size: 1.125rem;
    }
    
    .brand-subtitle {
        font-size: 0.75rem;
    }
    
    .welcome-card {
        padding: 2rem 1.5rem;
    }
    
    .welcome-card h2 {
        font-size: 1.5rem;
    }
    
    .welcome-desc {
        font-size: 1rem;
    }
    
    .form-content {
        padding: 1.5rem;
        max-height: calc(100vh - 250px);
    }
    
    .form-actions {
        padding: 1.5rem;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .loading-card,
    .result-card {
        margin: 0 -0.5rem;
    }
    
    .result-content {
        padding: 1.5rem;
        max-height: calc(100vh - 300px);
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-content {
        font-size: 0.9375rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .welcome-card,
    .form-card,
    .result-card {
        border-radius: var(--radius-lg);
        margin: 0;
    }
    
    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .loading-steps {
        gap: 0.75rem;
    }
    
    .step span {
        font-size: 0.75rem;
    }
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; } 