/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
    min-width: 0;
}

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

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.header-text {
    flex: 1;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    color: white;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 桌面端隐藏汉堡按钮 */
.hamburger-btn {
    display: none;
}

/* 导航样式 */
.nav {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Hero区域样式 */
.hero-section {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 10px;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    background: #e74c3c;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-hero:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}


.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-left {
    flex: 1;
}

.nav-right {
    position: relative;
}


.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav a:hover {
    background-color: #667eea;
    color: white;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    min-height: 400px;
}

.content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    overflow-x: auto;
    min-width: 0;
}

.sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    width: 100%;
    min-width: 280px;
    max-width: 300px;
}

/* 搜索区域 */
.search-section {
    margin-bottom: 2rem;
}

.search-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.search-box {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.search-btn {
    padding: 0.8rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #5a6fd8;
}

/* 条目卡片样式 */
.entry-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: white;
    transition: all 0.3s ease;
}

.entry-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.entry-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.entry-title:hover {
    color: #667eea;
}

.entry-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.entry-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.entry-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.entry-actions {
    display: flex;
    gap: 1rem;
}

/* 评分样式 */
.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.star {
    font-size: 1.2rem;
    color: #ffc107;
}

.star.empty {
    color: #ddd;
}

.rating-value {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #667eea;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background: #5a6fd8;
    color: white !important;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #3498db;
    color: white !important;
}

.btn-secondary:hover {
    background: #2980b9;
    color: white !important;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 分类导航 */
.category-nav {
    margin-bottom: 1.5rem;
}

.category-nav h3 {
    margin-bottom: 1rem;
    color: #333;
}

.category-nav ul {
    list-style: none;
}

.category-nav li {
    margin-bottom: 0.5rem;
}

.category-nav a {
    text-decoration: none;
    color: #666;
    padding: 0.3rem 0;
    display: block;
    transition: color 0.3s ease;
}

.category-nav a:hover {
    color: #667eea;
}

/* 消息提示 */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* 条目详情页 */
.entry-detail {
    margin-bottom: 2rem;
}

.entry-detail .entry-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.entry-detail .entry-meta {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.entry-rating {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.rating-label {
    font-weight: 600;
    margin-right: 1rem;
}

.entry-detail .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.tags-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

/* 评分区域 */
.rating-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.rating-item {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rating-user {
    font-weight: 600;
    color: #333;
}

.rating-time {
    color: #666;
    font-size: 0.9rem;
}

.rating-comment {
    color: #555;
    line-height: 1.6;
}

.no-ratings {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* 评分表单 */
.rating-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.rating-stars-input {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.rating-stars-input input[type="radio"] {
    display: none;
}

.rating-stars-input label {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.rating-stars-input input[type="radio"]:checked ~ label,
.rating-stars-input label:hover {
    color: #ffc107;
}

/* 帮助区域 */
.help-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.help-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.help-section ul {
    margin-left: 1.5rem;
}

.help-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.help-text {
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* 侧边栏 */
.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section li {
    margin-bottom: 0.5rem;
}

.sidebar-section a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
}

.sidebar-section a:hover {
    color: #667eea;
}

/* 版本历史 */
.version-history {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.version-item {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.version-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.version-action {
    font-weight: 600;
    color: #667eea;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* 无内容提示 */
.no-entries {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-entries a {
    color: #667eea;
    text-decoration: none;
}

.no-entries a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .container {
        padding: 0 10px;
        min-width: 0;
    }
    
    .content {
        padding: 1rem;
        margin: 0;
        border-radius: 8px;
    }
    
    .sidebar {
        padding: 1rem;
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .entry-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .rating-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

