/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(255, 105, 180, 0.9);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    outline: none;
    flex-shrink: 0;
}

.logo:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.admin-btn {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.admin-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-links a:hover {
    transform: translateY(-3px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 英雄区域 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #ff69b4, #8a2be2);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 0;
}

.hero-content {
    outline: none;
}

.hero-content:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 1rem;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease 0.3s both;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.primary-btn {
    background-color: #ff69b4;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
    animation: fadeInUp 1s ease 0.6s both;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.6);
}

/* 画廊区域 */
.gallery {
    padding: 4rem 2rem;
    background-color: white;
}

.gallery h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ff69b4;
    font-family: 'Noto Serif SC', serif;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border: 2px dashed #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
    border-color: #ff69b4;
    color: #ff69b4;
}

.gallery-item {
    outline: none;
}

.gallery-item:focus {
    outline: 2px solid rgba(255, 105, 180, 0.5);
    border-radius: 10px;
}

.gallery h2 {
    outline: none;
}

.gallery h2:focus {
    outline: 2px solid rgba(255, 105, 180, 0.5);
    border-radius: 5px;
    padding: 0.5rem;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* 关于区域 */
.about {
    padding: 4rem 2rem;
    background-color: #f8f8f8;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    outline: none;
}

.about-content:focus {
    outline: 2px solid rgba(255, 105, 180, 0.5);
    border-radius: 10px;
    padding: 1rem;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff69b4;
    font-family: 'Noto Serif SC', serif;
}

.about p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
}

/* 联系区域 */
.contact {
    padding: 4rem 2rem;
    background-color: white;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ff69b4;
    font-family: 'Noto Serif SC', serif;
    outline: none;
}

.contact h2:focus {
    outline: 2px solid rgba(255, 105, 180, 0.5);
    border-radius: 5px;
    padding: 0.5rem;
}

.contact-email {
    text-align: center;
    font-size: 1.2rem;
    color: #ff69b4;
    margin-bottom: 2rem;
    font-weight: 500;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #ff69b4;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* 页脚 */
.footer {
    padding: 2rem;
    background-color: #333;
    color: white;
    text-align: center;
    outline: none;
}

.footer:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 1.5rem 2rem;
}

.footer p {
    font-size: 1rem;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        padding: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(255, 105, 180, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        gap: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .admin-btn {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem;
        margin-top: 0.5rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .gallery h2,
    .about h2,
    .contact h2 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.secondary-btn {
    background-color: #666;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 102, 102, 0.4);
}

.secondary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.6);
}

/* 验证码弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s ease;
}

.modal-content h3 {
    text-align: center;
    color: #ff69b4;
    margin-bottom: 1rem;
    font-family: 'Noto Serif SC', serif;
}

.modal-content p {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #555;
}

.modal-content input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: #ff69b4;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 图片管理区域 */
.image-manager {
    padding: 4rem 2rem;
    background-color: #f8f8f8;
}

.image-manager h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff69b4;
    font-family: 'Noto Serif SC', serif;
}

.image-upload-area {
    max-width: 600px;
    margin: 0 auto 2rem;
    border: 2px dashed #ccc;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.image-upload-area:hover {
    border-color: #ff69b4;
    background-color: #fff5f8;
}

.upload-placeholder p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.9rem !important;
    color: #999 !important;
}

.image-count {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

#gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ff69b4;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff1493;
}