:root {
    --primary-light: #a7c7e7;
    --primary-medium: #7ba7d8;
    --primary-dark: #5a8cca;
    --text-primary: #2c3e50;
    --text-secondary: #546e7a;
    --card-bg: rgba(255, 255, 255, 0.7);
    --bg-blur: rgba(167, 199, 231, 0.4);
    --app-bg: #e3f2fd;
    --error-color: #f44336;
    --warning-color: #ff9800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

body {
    background-color: var(--app-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 16px;
    padding-bottom: 90px;
    background-image: linear-gradient(120deg, #e0f2ff 0%, #c5e3ff 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* 顶部导航栏 */
.app-bar {
    background-color: var(--bg-blur);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 12px 28px;
    border-radius: 24px;
    box-shadow: 0 8px 20px rgba(123, 167, 216, 0.15);
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    position: sticky;
    top: 16px;
    z-index: 100;
    height: 65px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.app-title {
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.spacer {
    flex-grow: 1;
}

/* 内容区域 */
.content-section {
    display: none;
    background-color: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 28px;
    padding: 35px;
    box-shadow: 0 15px 30px rgba(123, 167, 216, 0.18);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    min-height: 60vh;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.section-title {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

/* 主页顶部图片 */
.top-banner {
    width: 100%;
    height: 220px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7ba7d8 0%, #5a8cca 100%);
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    padding: 20px;
}

/* 公告区域 */
.announcement {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.announcement h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.announcement h3 i {
    margin-right: 10px;
    color: var(--primary-medium);
}

.announcement p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 首页内容 */
.hero-section {
    text-align: center;
    padding: 40px 20px;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-medium);
    color: white;
    padding: 14px 28px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    margin: 10px;
    transition: all 0.3s;
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(123, 167, 216, 0.3);
}

/* 文章网格布局 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.article-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.read-more {
    color: var(--primary-medium);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
}

/* 警告区域 */
.warning-banner {
    background-color: rgba(244, 67, 54, 0.15);
    border: 1px solid var(--error-color);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 25px;
    color: var(--error-color);
    display: flex;
    align-items: flex-start;
}

.warning-banner i {
    margin-right: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-banner p {
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

/* AI工具区域 */
.ai-section {
    padding: 20px 0;
}

.api-config {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 5px15px rgba(0, 0, 0, 0.08);
    display: none;
}

.api-config.visible {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.api-config h3 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.api-config input, .api-config select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--primary-light);
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.7);
}

.api-config button {
    background-color: var(--primary-medium);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all .3s;
}

.api-config button:hover {
    background-color: var(--primary-dark);
}

.api-hint {
    background-color: rgba(123, 167, 216, 0.1);
    border-left: 4px solid var(--primary-medium);
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.api-hint a {
    color: var(--primary-dark);
    font-weight: 500;
    text-decoration: none;
}

.api-hint a:hover {
    text-decoration: underline;
}

.model-selector {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.model-selector label {
    margin-right: 12px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.model-selector select {
    flex: 1;
    padding: 10 15px;
    border: 1px solid var(--primary-light);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.7);
}

.advanced-settings-btn {
    background-color: transparent;
    color: var(--primary-medium);
    border: 1px solid var(--primary-medium);
    padding: 10px 16px;
    border-radius: 12px;
   cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
}

.advanced-settings-btn:hover {
    background-color: rgba(123, 167, 216, 0.1);
}

.advanced-settings-btn i {
    margin-right: 8px;
}

.chat-container {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    height: 500px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
    background-color: var(--primary-medium);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.assistant {
    align-self: flex-start;
    background-color: #f0f5ff;
    color: var(--text-primary);
    border-bottom-left-radius: 5px;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--primary-light);
    border-radius: 20px;
    margin-right: 10px;
    font-size: 1rem;
}

.chat-input button {
    background-color: var(--primary-medium);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.chat-input button:hover {
    background-color: var(--primary-dark);
}

/* 活动区域 */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.event-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .1);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.event-date {
    background-color: var(--primary-medium);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 500;
}

.event-content {
    padding: 20px;
}

.event-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.event-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 我的作品区域 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.work-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 30px 20px;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.work-card i {
    font-size: 3rem;
    color: var(--primary-medium);
    margin-bottom: 20px;
}

.work-card h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.work-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* 文章详情页 */
.article-detail {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 25px;
}

.article-detail-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.article-meta-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    gap: 15px;
}

.article-body {
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h3 {
    margin: 25px 0 15px;
    color: var(--primary-dark);
}

.back-button {
    display: inline-flex;
    align-items: center;
    color: var(--primary-medium);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    cursor: pointer;
}

.back-button i {
    margin-right: 8px;
}

/* 底部导航栏 */
.bottom-nav {
    background-color: var(--bg-blur);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 500px;
    border-radius: 25px;
    box-shadow: 0 10px 25px rgba(123, 167, 216, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 14px 0;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-radius: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: transparent;
}

.bottom-nav-item.active {
    color: var(--primary-dark);
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 5px 15px rgba(123, 167, 216, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.bottom-nav-item i {
    margin-bottom: 6px;
    font-size: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-bar {
        padding: 12px 20px;
        height: 60px;
        border-radius: 20px;
        margin-bottom: 12px;
    }
    
    .app-title {
        font-size: 1.2rem;
    }
    
    .top-banner {
        height: 180px;
        border-radius: 20px;
        font-size: 1.8rem;
    }
    
    .content-section {
        padding: 25px 20px;
        border-radius: 24px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .articles-grid, .events-grid, .works-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .bottom-nav {
        width: calc(100% - 32px);
        bottom: 16px;
        border-radius: 22px;
        padding: 12px 0;
    }
    
    .bottom-nav-item {
        padding: 8px 12px;
        font-size: 0.75rem;
        border-radius: 16px;
    }
    
    .bottom-nav-item i {
        font-size: 1.3rem;
    }
    
    .model-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .model-selector label {
        margin-bottom: 8px;
        margin-right: 0;
    }
    
    .model-selector select {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px) scale(0.98); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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