/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 2rem;
    color: #667eea;
    text-align: center;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.brand-tag {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 4px;
}

.brand-tag-sm {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 3px;
}

.tagline {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-link {
    color: #333;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #667eea;
    color: white;
}

/* 主内容区域 */
.main {
    padding: 40px 0;
}

.section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.section h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.section-desc {
    color: #666;
    margin-bottom: 30px;
}

/* Hero 区域 */
.hero {
    text-align: center;
}

.hero-text {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-close {
    background: #ff4757;
    color: white;
    float: right;
}

/* 每日一问模块 */
.qa-container {
    margin-bottom: 30px;
}

.qa-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 10px 10px 0;
}

.qa-date {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.qa-question {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.qa-answer {
    background: #fff3e0;
    padding: 15px;
    border-radius: 8px;
}

/* 教程模块 */
.tutorial-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tutorial-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.tutorial-card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.tutorial-card p {
    color: #666;
    margin-bottom: 20px;
}

.tutorial-content {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #667eea;
}

/* 聊天模块 */
.chat-container {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

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

.message-avatar {
    font-size: 2rem;
    margin-right: 15px;
}

.message-content {
    background: white;
    padding: 15px;
    border-radius: 10px;
    max-width: 70%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message.user .message-content {
    background: #667eea;
    color: white;
    margin-left: auto;
}

.chat-input {
    display: flex;
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    margin-right: 10px;
}

.chat-input input:focus {
    outline: none;
    border-color: #667eea;
}

/* 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section {
        padding: 20px;
    }

    .nav {
        gap: 15px;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .message-content {
        max-width: 85%;
    }
}
