/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 容器样式（居中+响应式） */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 24px;
    color: #2c3e50;
}

.logout-btn {
    padding: 8px 16px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* 表单样式（注册/登录） */
.form-box {
    max-width: 450px;
    margin: 50px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-box h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.form-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.form-link a {
    color: #3498db;
    text-decoration: none;
}

.form-link a:hover {
    text-decoration: underline;
}

/* 提示信息（错误/成功） */
.msg {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

.err-msg {
    background-color: #fef2f2;
    color: #dc3545;
}

.succ-msg {
    background-color: #f0fdf4;
    color: #10b981;
}

/* 主页样式（乐子鉴赏按钮） */
.home-content {
    text-align: center;
    margin-top: 80px;
}

.home-content h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #2c3e50;
}

.lezi-btn {
    padding: 15px 30px;
    background-color: #2ecc71;
    font-size: 18px;
    border-radius: 6px;
    text-decoration: none;
}

.lezi-btn:hover {
    background-color: #27ae60;
}

/* 乐子鉴赏页面（图片网格） */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.image-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    text-align: center;
    padding-bottom: 20px;
}

.image-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.image-card img:hover {
    transform: scale(1.02);
}

.image-name {
    padding: 15px 0;
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
}

.incense-btn {
    padding: 8px 20px;
    background-color: #e67e22;
    margin-top: 5px;
}

.incense-btn:hover {
    background-color: #d35400;
}

/* 密码弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

/* 上香特效样式 */
.incense-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    display: none;
}

.incense-effect img {
    width: 180px;
    height: auto;
    animation: rise 1.5s ease-out forwards;
}

/* 弹窗图片（0.5秒消失） */
.popup-img {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
    display: none;
}

.popup-img img {
    width: 220px;
    height: auto;
}

/* 上香升起动画 */
@keyframes rise {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(0.8);
    }
}

/* 响应式适配（手机端） */
@media (max-width: 768px) {
    .header h1 {
        font-size: 20px;
    }

    .home-content h2 {
        font-size: 26px;
    }

    .images-grid {
        grid-template-columns: 1fr;
    }

    .image-card img {
        height: 180px;
    }
}