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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* 导航栏 */
.navbar {
    background: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #007bff;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.navbar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.auth-buttons a {
    margin-left: 0.5rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
}

.btn-login {
    border: 1px solid #007bff;
    color: #007bff;
}

.btn-register {
    background: #007bff;
    color: #fff;
}

/* 英雄区 */
.hero {
    background: url('/static/upload/image/20250618/1750214355172313.jpg') no-repeat center center/cover;
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* 按钮 */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* 功能区 */
.features {
    padding: 4rem 0;
    background: #fff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: #f1f1f1;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.feature-item i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 1rem;
}

/* 新闻区 */
.news {
    padding: 4rem 0;
    background: #f0f8ff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 调整最小宽度以适应图片 */
    gap: 2rem;
}

.news-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: left; /* 左对齐文本 */
}

.news-item img {
    width: 100%; /* 图片宽度为容器宽度 */
    height: auto; /* 保持图片比例 */
    border-radius: 8px;
    margin-bottom: 1rem; /* 图片与下方文字之间留出空间 */
}

.date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 评价区 */
.reviews {
    padding: 4rem 0;
    background: #fff;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.review-item {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 1rem;
}

.name-rating strong {
    display: block;
}

.stars i {
    color: #ffc107;
}

/* CTA 区 */
.cta {
    background: #878787;
    color: white;
    text-align: center;
    padding: 4rem 0;
}

/* 底部 */
.footer {
    background: #222;
    color: #ccc;
    padding: 3rem 0;
}

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

.footer-column h4 {
    margin-bottom: 1rem;
}

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

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.copyright {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.text-center {
    text-align: center;
    margin-top: 2rem;
}
