
/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    /* 全局文本颜色统一为主题紫色（可通过 --text-purple 修改） */
    --text-purple: #800080;
    color: var(--text-purple);
    background-color: #fcf5ff; /* 浅紫色背景 */
}

a {
    text-decoration: none;
    color: var(--text-purple);
    transition: color 0.3s;
}

a:hover {
    color: #da70d6;
}

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

/* Navbar */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-purple);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-purple);
}

.nav-links a:hover {
    color: #da70d6;
}

/* Page Header */
.page-header {
    background-color: #800080;
    color: white;
    text-align: center;
    padding: 60px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-purple);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #da70d6;
    margin: 15px auto 0;
}

/* Hero Section */
.hero {
    height: 80vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(75, 0, 130, 0.4); /* 紫色遮罩 */
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #da70d6;
    color: white;
    border-radius: 30px;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #ba55d3;
    color: white;
}

/* Intro Grid (Home) */
.intro {
    padding: 80px 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
    margin-top: 40px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

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

/* Features Section */
.features {
    padding: 40px 0 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 40px;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #e6e6fa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(128,0,128,0.1);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-purple);
}

.feature-item p {
    color: var(--text-purple);
}

/* Gallery Section */
.gallery {
    padding: 40px 0 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    aspect-ratio: 3/4;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(128, 0, 128, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.overlay span {
    color: white;
    font-weight: bold;
    border: 2px solid white;
    padding: 10px 20px;
}

/* About Section */
.about {
    padding: 40px 0 80px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-purple);
}

.about-content h2 {
    color: #800080;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e6e6fa;
    padding-bottom: 10px;
}

.about-content p {
    margin-bottom: 20px;
    text-align: justify;
}

/* 404 Error Page */
.error-page {
    padding: 100px 0;
    text-align: center;
    background-color: #fcf5ff;
}

.error-content h1 {
    font-size: 8rem;
    color: #800080;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #da70d6;
}

.error-content h2 {
    font-size: 2rem;
    color: var(--text-purple);
    margin-bottom: 15px;
}

.error-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

/* Footer */
footer {
    background-color: #4b0082;
    color: #fff;
    text-align: center;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #da70d6;
    padding-bottom: 10px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

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

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-bottom a {
    color: #da70d6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* 简化移动端，暂不实现汉堡菜单 */
    }

    .grid-3, .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .grid-3, .gallery-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
