/* 基础样式 */
:root {
    --primary-color: #e6b8c7; /* 淡粉色 */
    --secondary-color: #a5c9ca; /* 淡青色 */
    --accent-color: #e76f51; /* 珊瑚色 */
    --text-color: #4a4a4a;
    --light-text: #f8f9fa;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f1 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 花瓣飘落效果 */
.petal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.petal {
    position: absolute;
    background: rgba(230, 111, 81, 0.3);
    border-radius: 50% 50% 0 50%;
    width: 15px;
    height: 15px;
    opacity: 0.7;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 导航栏 - 修复后的样式 */
.navigation-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 12px 40px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
}

.navigation-bar.nav-hidden {
    transform: translateY(-100%);
}

.navigation-bar.scrolled {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 8px 40px;
}

.logo {
    color: var(--accent-color);
    font-size: 28px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: var(--secondary-color);
    font-size: 16px;
    margin-left: 10px;
    font-style: italic;
}

.navigation-container {
    display: flex;
    align-items: center;
}

.navigation-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation-links li {
    position: relative;
    margin: 0 10px;
}

.navigation-links li a {
    display: block;
    color: var(--text-color);
    text-align: center;
    padding: 10px 15px;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.navigation-links li a:hover {
    color: var(--accent-color);
}

.navigation-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.navigation-links li a:hover::after {
    width: 100%;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

/* 英雄区域 */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-style: italic;
    animation: fadeInUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-description {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
    animation: fadeInUp 1s ease-out 0.4s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-icon {
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    position: relative;
}

.scroll-icon::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 4px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-20px) translateX(-50%);}
    60% {transform: translateY(-10px) translateX(-50%);}
}

@keyframes scroll {
    0% {
        transform: translateY(0) translateX(-50%);
        opacity: 1;
    }
    100% {
        transform: translateY(15px) translateX(-50%);
        opacity: 0;
    }
}

/* 卡片容器 */
.card-container {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    background: white;
    max-width: 400px;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.card:hover::before {
    opacity: 0.1;
}

.card-img-container {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.card h3 {
    margin-top: 0;
    color: var(--accent-color);
    font-size: 1.8rem;
}

.card p {
    color: var(--text-color);
    margin: 15px 0 20px;
    line-height: 1.6;
}

.card a {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    position: relative;
    padding-bottom: 5px;
}

.card a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.card a:hover::after {
    width: 100%;
}

/* 注册表单 */
.reg-and-login-form {
    max-width: 500px;
    margin: 50px auto 100px;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.reg-and-login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.form-header p {
    color: var(--text-color);
    font-size: 1.1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: bold;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: var(--secondary-color);
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.captcha-group {
    display: flex;
    gap: 10px;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-code {
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 2px;
}

.refresh-captcha {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.refresh-captcha:hover {
    background: #8ab3b4;
}

.form-footer {
    text-align: center;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 15px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.login-link a {
    color: var(--accent-color);
    text-decoration: none;
}

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

/* 登录弹窗样式 - 修复后的样式 */
.login-modal-overlay {
    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: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.login-modal-overlay.active .login-modal {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: var(--accent-color);
    margin-bottom: 5px;
}

.modal-header p {
    color: var(--text-color);
}

/* 页脚 */
.site-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 0 20px;
    position: relative;
    font-size: 16px;
    text-align: center;
}

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

.copyright {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
}

.copyright a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.copyright a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(231, 111, 81, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navigation-bar {
        flex-direction: column;
        padding: 10px 15px;
    }

    .navigation-bar.scrolled {
        padding: 6px 15px;
    }

    .logo {
        margin-bottom: 5px;
        font-size: 24px;
    }

    .subtitle {
        margin-bottom: 10px;
        font-size: 14px;
    }

    .navigation-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .navigation-links li {
        margin: 5px;
    }

    .navigation-links li a {
        padding: 8px 12px;
        font-size: 14px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

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

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1.2rem;
    }

    .card-container {
        padding: 50px 20px;
    }

    .reg-and-login-form {
        padding: 30px;
        margin: 30px auto 70px;
    }

    .login-modal {
        padding: 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .navigation-links {
        flex-direction: column;
        align-items: center;
    }

    .navigation-links li {
        margin: 3px 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .reg-and-login-form {
        padding: 20px;
    }

    .captcha-group {
        flex-direction: column;
    }
}