/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 60px;
    width: auto;
}

/* logo旋转动画 */
.rotate-animation {
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 导航栏样式 */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color: #e74c3c;
}

/* 登录区域样式 */
.login-area button {
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#loginBtn {
    background-color: #e74c3c;
    color: white;
}

#registerBtn {
    background-color: #fff;
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

#loginBtn:hover {
    background-color: #c0392b;
}

#registerBtn:hover {
    background-color: #e74c3c;
    color: white;
}

/* 主体部分样式 */
main {
    margin-top: 80px;
    padding: 2rem 5%;
}

/* 轮播图样式 */
.slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slider img[style*="display: block"] {
    opacity: 1;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.dot:hover {
    transform: scale(1.2);
}

.dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* 添加左右箭头 */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 100;
}

.slider-arrow:hover {
    background-color: rgba(255,255,255,0.8);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

/* 美食推荐区域样式 */
.food-recommend {
    margin-bottom: 3rem;
}

.food-recommend h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.food-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.food-list li {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.food-list li:hover {
    transform: translateY(-5px);
}

.food-list img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.food-list h3 {
    padding: 1rem;
    color: #2c3e50;
}

.food-list p {
    padding: 0 1rem 1rem;
    color: #666;
}

/* 美食文化区域样式 */
.food-culture {
    background-color: #f9f9f9;
    padding: 3rem;
    border-radius: 8px;
}

.food-culture h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.culture-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.culture-content img {
    width: 40%;
    border-radius: 8px;
}

.culture-text {
    flex: 1;
}

.culture-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* 尾部样式 */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 3rem 5% 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-info h3,
.footer-links h3 {
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e74c3c;
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 登录模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .login-area {
        margin-top: 1rem;
    }

    .culture-content {
        flex-direction: column;
    }

    .culture-content img {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
} 