/* 通用样式 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 20px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: border-bottom 0.3s, background-color 0.3s;
}

nav ul li a.active,
nav ul li a:hover {
    border-bottom: 2px solid #fff;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

main {
    padding: 20px;
    min-height: 80vh;
}

/* 主页样式 */
.welcome {
    text-align: center;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.welcome h2 {
    margin-bottom: 10px;
    color: #4CAF50;
}

.welcome p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.welcome .btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.welcome .btn:hover {
    background-color: #45a049;
}

/* 相册页样式 */
.gallery .photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 20px;
    margin-top: 20px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.photo-item:hover img {
    transform: scale(1.2);
}

/* 关于页样式 */
.about {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    margin: 20px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about h2 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.about p {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.about ul {
    list-style: none;
    padding: 0;
}

.about ul li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.about ul li::before {
    content: "•";
    color: #4CAF50;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* 使用教程页样式 */
.tutorial {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    margin: 20px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tutorial h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    text-align: center;
}

.tutorial h3 {
    color: #4CAF50;
    margin-top: 25px;
    margin-bottom: 10px;
}

.tutorial ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.tutorial ol li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.tutorial ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.tutorial ul li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.tutorial strong {
    color: #333;
}

/* 页脚样式 */
footer {
    background-color: #4CAF50;
    color: white;
    text-align: center;
    padding: 15px 0;
    position: relative;
    width: 100%;
    bottom: 0;
    margin-top: 40px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

footer p {
    margin: 0;
    font-size: 1em;
}

/* 弹出预览样式 */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.popup-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #4CAF50;
}