/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    /* 确保子元素继承容器约束 */
    display: block;
}

/* 顶部状态栏样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    min-height: auto;
    height: auto;
}

.brand-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.subtitle {
    font-size: 1.1rem;
    color: #718096;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* 如果需要，也可以更新响应式设计 */
    .language-selector {
        position: fixed;
        top: 15px;
        right: 15px;
        width: auto; /* 恢复默认宽度 */
        text-align: right; /* 右对齐 */
        margin: 0; /* 移除所有外边距 */
    }
.title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a5568;
    margin: 0;
}

/* 主要内容区域 */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* 消息容器样式 */
.messages-container {
    margin-bottom: 30px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* 消息卡片基础样式 */
.message-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(20px);
    opacity: 0;
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 用户消息样式 */
.user-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: 60px;
}

.user-message .card-content {
    color: white;
}

/* AI消息样式 */
.ai-message {
    margin-right: 60px;
}

/* 欢迎卡片特殊样式 */
.welcome-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-align: center;
    margin: 0 0 30px 0;
}

.welcome-card .card-content p {
    margin: 8px 0;
    font-size: 1.1rem;
}

/* 卡片头部样式 */
.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.ai-avatar {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.user-avatar {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.sender-info {
    display: flex;
    flex-direction: column;
}

.sender-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.timestamp {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* 卡片内容样式 */
.card-content {
    font-size: 1rem;
    line-height: 1.7;
}

.card-content p {
    margin-bottom: 12px;
}

.card-content p:last-child {
    margin-bottom: 0;
}

/* 代码块样式 */
.card-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    border-left: 4px solid #4facfe;
}

.card-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

/* 输入区域样式 */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.message-input-div {
    min-height: 120px;
    max-height: 300px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 20px;
    font-size: 1.1rem;
    font-family: inherit;
    line-height: 1.6;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    overflow-y: auto;
    resize: vertical;
    cursor: text;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.message-input-div:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
    background: white;
}

.message-input-div:empty:before {
    content: attr(placeholder);
    color: #999;
    font-style: italic;
}

.message-input-div:focus:empty:before {
    color: #ccc;
}

#messageInput {
    flex: 1;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 15px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

#messageInput:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    background: white;
}

#messageInput::placeholder {
    color: #999;
}

.send-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
    min-width: 100px;
    justify-content: center;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.send-button:active {
    transform: translateY(0);
}

.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.char-count {
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.usage-status {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(79, 172, 254, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    color: #4facfe;
}

.analyze-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
    min-width: 140px;
    justify-content: center;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.analyze-btn:active {
    transform: translateY(0);
}

.analyze-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-text {
    font-size: 1rem;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInScale 0.3s ease-out;
}

@keyframes slideInScale {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal-header h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.modal-body {
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 10px;
    color: #666;
}

.countdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.modal-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .message-card {
        margin-left: 0;
        margin-right: 0;
    }
    
    .user-message {
        margin-left: 20px;
    }
    
    .ai-message {
        margin-right: 20px;
    }
    
    .input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .send-button {
        align-self: flex-end;
        min-width: 120px;
    }
    
    .input-footer {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.3rem;
    }
    
    .message-card {
        padding: 15px;
    }
    
    .card-header {
        margin-bottom: 10px;
    }
    
    .avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .input-section {
        padding: 12px;
        margin: 0 -8px;
    }
    
    .input-group {
        gap: 10px;
    }
    
    .message-input-div {
        min-height: 80px;
        padding: 12px;
        font-size: 0.95rem;
        width: calc(100% - 24px);
    }
    
    .input-footer {
        gap: 10px;
        margin-top: 10px;
    }
    
    .footer-left {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .analyze-btn {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    #messageInput {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .send-button {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 打字机效果 */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid #4facfe;
    white-space: nowrap;
    animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #4facfe; }
}

/* 语言选择器样式 */
.language-selector {
    margin-left: 20px;
}

.language-select {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 32px;
}

.language-select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    background-color: white;
}

.language-select:hover {
    border-color: #4facfe;
    background-color: white;
}

/* 角色卡片样式 */
.role-selection-section {
    margin-bottom: 20px;
}

.role-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

/* 响应式布局 - 桌面端 */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    align-items: start;
    width: 100%;
    /* 确保网格布局继承容器约束 */
    max-width: 100%;
    box-sizing: border-box;
}

.role-selection-section,
.input-section,
.usage-guide-section {
    width: 100%;
    box-sizing: border-box;
    /* 确保section控件继承网格布局约束 */
    max-width: 100%;
}

.role-selection-section {
    grid-column: 1;
    grid-row: 1;
}

.input-section {
    grid-column: 1;
    grid-row: 2;
    /* 确保输入区域正确适配网格列宽 */
    min-width: 0; /* 允许内容收缩 */
}

.usage-guide-section {
    grid-column: 1;
    grid-row: 3;
    /* 确保使用说明区域正确适配网格列宽 */
    min-width: 0; /* 允许内容收缩 */
}

/* 响应式断点 - 平板端 (768px-1024px) */
@media (max-width: 1024px) {
    .main-content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
        /* 确保平板端网格布局正确约束 */
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .role-selection-section,
    .input-section,
    .usage-guide-section {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        box-sizing: border-box;
        /* 确保section控件在平板端正确适配 */
        max-width: 100%;
        min-width: 0;
    }
    
    /* 明确指定各section的行位置，确保垂直排列 */
    .role-selection-section {
        grid-row: 1;
    }
    
    .input-section {
        grid-row: 2;
    }
    
    .usage-guide-section {
        grid-row: 3;
    }
    
    .role-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .usage-guide-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 响应式断点 - 移动端 (小于768px) */
@media (max-width: 768px) {
    .main-content-grid {
        gap: 10px;
        width: 100%;
        /* 确保移动端网格布局正确约束 */
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .role-selection-section,
    .input-section,
    .usage-guide-section {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        box-sizing: border-box;
        padding: 15px; /* 移动端增加内边距 */
        /* 确保section控件在移动端正确适配 */
        max-width: 100%;
        min-width: 0;
        margin: 0; /* 移除可能的外边距干扰 */
    }
    
    .role-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .role-card {
        padding: 20px;
        min-height: 140px;
    }
    
    .role-icon {
        font-size: 2rem;
    }
    
    .role-name {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .role-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .input-section {
        padding: 15px;
        margin: 0 -5px; /* 移动端增加边距适配 */
    }
    
    .input-group {
        gap: 12px;
    }
    
    .message-input-div {
        min-height: 100px;
        padding: 15px;
        font-size: 1rem;
        width: calc(100% - 30px); /* 确保在移动端正确计算宽度 */
        margin: 0 auto;
    }
    
    .input-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        margin-top: 12px;
    }
    
    .footer-left {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .analyze-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
        min-width: auto;
    }
    
    .usage-guide-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .guide-item {
        padding: 18px;
    }
}

.role-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.role-card:hover::before {
    transform: scaleX(1);
}

.role-card.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.role-card.active::before {
    transform: scaleX(1);
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.role-content {
    text-align: center;
}

.role-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.role-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.role-description {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.4;
}

/* 卡片通用样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

/* 使用说明区域样式 */
.usage-guide-section {
    margin-top: 0;
}

.usage-guide-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.guide-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guide-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
}

.guide-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.guide-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-item p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.guide-item strong {
    color: #4facfe;
    font-weight: 600;
}

.guide-item kbd {
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: #4facfe;
}

/* 使用说明区域响应式设计 */
@media (max-width: 1024px) {
    .usage-guide-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .usage-guide-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .guide-item {
        padding: 18px;
    }
    
    .guide-item h4 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .guide-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    font-size: 1.8rem;
}

/* 响应式设计 - 语言选择器 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .language-selector {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
        
    }
    
    .language-select {
        width: 120px;
        margin: 0 auto;
    }
    
    /* 移动端角色卡片响应式 */
    .role-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .role-card {
        padding: 20px;
    }
    
    .role-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .role-name {
        font-size: 1.2rem;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
}

/* ==================== 增强加载状态样式 ==================== */

/* 加载浮层 - 增强视觉显著性 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    animation: slideInScale 0.5s ease-out;
    max-width: 400px;
    width: 90%;
}

@keyframes slideInScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 增强加载动画容器 */
.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    position: relative;
}

/* 主加载动画 - 多层旋转效果 */
.loading-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid #4facfe;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 64px;
    height: 64px;
    border: 3px solid transparent;
    border-bottom: 3px solid #764ba2;
    border-radius: 50%;
    animation: spinReverse 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

/* 加载图标 - AI主题 */
.loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #4facfe;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* 加载文字样式 */
.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* 进度指示器 */
.loading-progress {
    width: 100%;
    height: 6px;
    background: rgba(79, 172, 254, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin: 15px 0;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #764ba2);
    border-radius: 3px;
    width: 0%;
    animation: progressPulse 2s ease-in-out infinite;
    transition: width 0.3s ease;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 加载提示信息 */
.loading-hint {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 10px;
    font-style: italic;
}

/* 趣味性加载效果 - 粒子动画 */
.loading-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #4facfe;
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 80%; animation-delay: 0.5s; }
.particle:nth-child(3) { top: 40%; left: 30%; animation-delay: 1s; }
.particle:nth-child(4) { top: 80%; left: 60%; animation-delay: 1.5s; }
.particle:nth-child(5) { top: 30%; left: 90%; animation-delay: 2s; }

@keyframes float {
    0%, 100% { 
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% { 
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

/* 响应式设计 - 加载状态 */
@media (max-width: 768px) {
    .loading-content {
        padding: 30px 25px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .loading-spinner::after {
        top: 6px;
        left: 6px;
        width: 48px;
        height: 48px;
    }
    
    .loading-icon {
        font-size: 20px;
    }
    
    .loading-text {
        font-size: 1.1rem;
    }
    
    .loading-hint {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .loading-content {
        padding: 25px 20px;
        border-radius: 20px;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .loading-spinner::after {
        top: 5px;
        left: 5px;
        width: 40px;
        height: 40px;
    }
    
    .loading-text {
        font-size: 1rem;
    }
}

/* 页脚浏览统计 */
.footer-stats {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}
.footer-stats .stat-item {
    display: inline-block;
}
.footer-stats .stat-divider {
    margin: 0 10px;
    color: #ccc;
}