body {
    min-height: 100vh;
    margin: 0;
    background-color: #000000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* 主布局容器 */
.main-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    padding: 20px 0;
    box-sizing: border-box;
}

/* 用户操作区域 */
.user-actions-container {
    width: 100%;
    max-width: 800px;
    background-color: #111111;
    padding: 20px;
    border-bottom: 1px solid #333333;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* 新闻内容区域 */
.news-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
}

/* 中等屏幕适配 */
@media (max-width: 1024px) {
    .user-actions-container {
        max-width: 90%;
        padding: 18px;
    }
    
    .news-container {
        max-width: 90%;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .main-layout {
        padding: 10px 0;
    }
    
    .user-actions-container {
        padding: 15px;
        margin-bottom: 15px;
        max-width: 100%;
    }
    
    .news-container {
        padding: 0 15px;
        max-width: 100%;
    }
}

.news-source {
    margin-bottom: 20px;
    padding: 10px;
    border-bottom: 1px solid #333;
    font-style: italic;
    color: #aaa;
}

.news-content {
    margin-bottom: 20px;
    line-height: 1.6;
}

.news-content p {
    margin: 0.8em 0;
    line-height: 1.6;
}

.news-content p:first-child {
    margin-top: 0;
}

.news-content p:last-child {
    margin-bottom: 0;
}

.news-content br + br {
    display: none;
}

.news-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 5px;
}

#wenxue {
    color: #4CAF50;
}

#adWrapper {
    display: none;
}

img {            
    /* float: left; */
    margin-right: 10px;
    display:grid;
    width: 100%; /* 设置图片宽度为 100% */
    max-width: 100%; /* 限制最大宽度为 100% */
    height: auto; /* 高度自动，保持宽高比例 */        
}

.container {
    width: 100%;
    display: block;
    padding: 10px;
    box-sizing: border-box;
}
#box {
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

li:hover {
    background-color: #333333;
}

.fixed-button {
    position: fixed; /* 设置为固定定位 */
    bottom: 20px; /* 距离底部 20px */
    left: 20px; /* 距离左侧 20px */
    cursor: pointer; /* 鼠标悬停时显示手型 */
    display: none; /* 默认隐藏 */
    z-index: 9999; /* 确保按钮在最上层 */
    width: 28px; /* 与AI logo相同大小 */
    height: 28px; /* 与AI logo相同大小 */
    /* border-radius: 50%;
    background: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: box-shadow 0.2s, transform 0.2s;
    border: 2px solid transparent; */
    object-fit: contain;
}

.fixed-button:hover {
    box-shadow: 0 4px 16px #4CAF50;
    border: 2px solid #4CAF50;
    transform: scale(1.08);
}

#news {
    color: #ffffff;
    line-height: 1.6;
    padding: 0;
}

#news p {
    margin: 0.8em 0;
    padding: 0;
    line-height: 1.6;
    color: #ffffff;
}

#news p:first-child {
    margin-top: 0;
}

#news p:last-child {
    margin-bottom: 0;
}

#news br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

/* 限制连续的br标签，防止过大间距 */
#news br + br {
    display: none;
}

/* 优化段落间距 */
#news .news-content + .news-content {
    margin-top: 1em;
}

/* 清理多余的空白 */
#news div:empty {
    display: none;
}

#newsTitle {
    color: #ffffff;
    margin: 16px 0;
    font-size: 20px;
    line-height: 1.4;
}

#ai-comment-section {
    margin-top: 20px;
    padding: 16px;
    background-color: #2a2a2a;
    border-radius: 8px;
    color: #ffffff;
}

.ai-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 15px;
}

.ai-button:hover {
    background-color: #45a049;
}

#ai-loading {
    color: #66b3ff;
    margin: 15px 0;
    font-style: italic;
}

#ai-analysis {
    color: #ffffff;
    line-height: 1.6;
    padding: 16px;
    border-left: 3px solid #4CAF50;
    margin-top: 15px;
}

.analysis-section {
    margin-bottom: 15px;
    color: #ffffff;
}

.analysis-section h3 {
    color: #4CAF50;
    margin-bottom: 8px;
}

.ai-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.ai-select {
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
    background-color: #333333;
    color: #e0e0e0;
    border: 1px solid #4a4a4a;
    cursor: pointer;
}

.ai-select:hover {
    border-color: #4CAF50;
}

.ai-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.ai-controls-vertical {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none; /* 默认隐藏 */
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 9999; /* 确保在最上层 */
    background: rgba(26, 26, 26, 0); 
    padding: 10px;
    border-radius: 8px;
}

.ai-logo {
    width: 28px;
    height: 28px;
    background: #222;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: box-shadow 0.2s, transform 0.2s;
    border: 2px solid transparent;
    object-fit: contain;
}

.ai-logo:hover {
    box-shadow: 0 4px 16px #4CAF50;
    border: 2px solid #4CAF50;
    transform: scale(1.08);
}

/* 新闻预览样式 */
.news-preview {
    margin-top: 8px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
}

.preview-thumbnail {
    max-width: 100%;
    height: auto;
    margin-bottom: 8px;
    border-radius: 4px;
}

.preview-text {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
}

.news-title {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 4px 0;
    font-size: 16px;
    line-height: 1.4;
}

.news-title:hover {
    color: #4CAF50;
}

#box li {
    margin: 0;
    padding: 8px 0;
    background: none;
    border-radius: 0;
    list-style-type: none;
    border-bottom: 1px solid #333;
}

/* 用户操作区域样式 */
#user-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-info {
    background-color: #222222;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.welcome-text {
    color: #4CAF50;
    font-size: 16px;
    font-weight: 500;
}

.auth-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    background-color: #222222;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #333333;
    box-sizing: border-box;
}

.auth-button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    letter-spacing: 0.5px;
    box-sizing: border-box;
    border: none;
    outline: none;
}

.auth-button:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.auth-button.secondary {
    background-color: #333333;
    border: 1px solid #555555;
}

.auth-button.secondary:hover {
    background-color: #444444;
    border-color: #4CAF50;
}

.logout-button {
    background-color: #d32f2f !important;
    width: auto !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
}

.logout-button:hover {
    background-color: #c62828 !important;
}

.admin-button {
    background-color: #ff9800 !important;
    color: white !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.3s !important;
}

.admin-button:hover {
    background-color: #f57c00 !important;
}

/* 移动端用户操作区域优化 */
@media (max-width: 768px) {
    .auth-buttons {
        padding: 15px;
        flex-direction: column; /* 移动端垂直排列 */
    }
    
    .user-info {
        padding: 15px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .auth-button {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 44px; /* 确保触摸友好 */
    }
    
    .logout-button {
        width: 100% !important;
        padding: 10px 14px !important;
    }
    
    .user-actions-container {
        max-width: 100%;
    }
    
    .news-container {
        max-width: 100%;
    }
}