/* 爱情岛 - 完整样式表 */
/* 基础重置与全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --primary-light: #f1948a;
    --bg-light: #fdf2f2;
    --bg-dark: #1a1a2e;
    --text-dark: #333;
    --text-light: #eee;
    --card-bg: #fff;
    --card-shadow: 0 2px 10px rgba(0,0,0,0.05);
    --card-hover-shadow: 0 8px 25px rgba(0,0,0,0.12);
    --border-color: #f0d0d0;
    --gradient-hero: linear-gradient(135deg, #fce4e4, #f8d7da);
    --gradient-header: linear-gradient(135deg, #e74c3c, #c0392b);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    --transition-speed: 0.3s;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
    transition: background var(--transition-speed), color var(--transition-speed);
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    text-decoration: underline;
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    padding-left: 20px;
    color: #555;
}

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

/* 头部导航 */
.header {
    background: var(--gradient-header);
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: box-shadow var(--transition-speed);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

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

.logo svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s;
}

.logo:hover svg {
    transform: scale(1.1) rotate(-5deg);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav a {
    color: #fff;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    position: relative;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
    text-decoration: none;
    transform: translateY(-2px);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: #fff;
    transition: transform var(--transition-speed);
}

.nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

#darkModeToggle {
    font-size: 1.2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed);
}

#darkModeToggle:hover {
    background: rgba(255,255,255,0.3);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    width: 100%;
    max-width: 300px;
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    transition: box-shadow var(--transition-speed);
}

.search-box input:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.search-box button {
    background: #fff;
    color: var(--primary-dark);
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.search-box button:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* 英雄区 */
.hero {
    background: var(--gradient-hero);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '❤️';
    position: absolute;
    font-size: 200px;
    opacity: 0.05;
    top: -50px;
    right: -50px;
    transform: rotate(15deg);
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto 30px;
    animation: fadeInUp 1s ease;
}

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

/* Banner轮播 */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.1);
}

.banner-slide {
    display: none;
    padding: 40px 20px;
    min-height: 250px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.banner-slide.active {
    display: flex;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.banner-slide:nth-child(1) {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}
.banner-slide:nth-child(2) {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}
.banner-slide:nth-child(3) {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.banner-slide h3 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.banner-slide p {
    color: #fff;
    font-size: 1.1rem;
    max-width: 600px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.dot.active {
    background: var(--primary-dark);
    transform: scale(1.3);
}

.dot:hover {
    background: var(--primary-light);
    transform: scale(1.2);
}

/* 通用区块 */
.section {
    padding: 50px 0;
    border-bottom: 1px solid var(--border-color);
}

.section h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-dark);
    margin: 10px auto 0;
    border-radius: 2px;
    transition: width var(--transition-speed);
}

.section h2:hover::after {
    width: 100px;
}

.section h3 {
    font-size: 1.4rem;
    color: #a93226;
    margin: 25px 0 15px;
}

.section h4 {
    font-size: 1.1rem;
    color: #b03a2e;
    margin: 15px 0 10px;
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
}

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s, background var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.card:hover::before {
    transform: scaleX(1);
}

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

.card h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.card .meta {
    color: #999;
    font-size: 0.85rem;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

/* 按钮 */
.btn {
    display: inline-block;
    background: var(--primary-dark);
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    transition: background var(--transition-speed), transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background: var(--primary);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    transition: background var(--transition-speed);
}

.faq-item:hover {
    background: rgba(231, 76, 60, 0.02);
}

.faq-question {
    font-weight: 600;
    color: #a93226;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    transition: color var(--transition-speed);
}

.faq-question::after {
    content: '+';
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.faq-question.open::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-answer {
    padding: 10px 0 0;
    color: #555;
    line-height: 1.7;
    display: none;
    animation: fadeIn 0.3s ease;
}

.faq-answer.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 步骤列表 */
.howto-steps {
    list-style: none;
    counter-reset: step;
}

.howto-steps li {
    counter-increment: step;
    padding: 15px 0 15px 50px;
    position: relative;
    border-left: 3px solid var(--primary);
    margin-left: 20px;
    min-height: 60px;
    transition: border-color var(--transition-speed), background var(--transition-speed);
}

.howto-steps li:hover {
    border-left-color: var(--primary-dark);
    background: rgba(231, 76, 60, 0.02);
}

.howto-steps li::before {
    content: counter(step);
    position: absolute;
    left: -20px;
    top: 15px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform var(--transition-speed), background var(--transition-speed);
}

.howto-steps li:hover::before {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* 文章卡片 */
.articles .card {
    position: relative;
    padding-bottom: 50px;
}

.articles .card .btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 6px 15px;
    font-size: 0.85rem;
}

/* 团队 */
.team-members {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.team-member {
    text-align: center;
    flex: 1 1 200px;
    max-width: 220px;
    transition: transform var(--transition-speed);
}

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

.team-member svg {
    border-radius: 50%;
    background: var(--primary);
    padding: 10px;
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.team-member:hover svg {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.team-member h4 {
    color: #a93226;
    margin-bottom: 5px;
}

.team-member p {
    color: #777;
    font-size: 0.9rem;
}

/* 联系信息 */
.contact-info {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
}

.contact-info:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

.contact-info p {
    margin: 10px 0;
    font-size: 1rem;
}

.contact-info strong {
    color: #a93226;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
}

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

.footer h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer a {
    color: #bdc3c7;
    display: block;
    margin: 5px 0;
    font-size: 0.9rem;
    transition: color var(--transition-speed), padding-left var(--transition-speed);
}

.footer a:hover {
    color: var(--primary);
    padding-left: 5px;
    text-decoration: none;
}

.footer .copyright {
    grid-column: 1/-1;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    margin-top: 20px;
    color: #95a5a6;
    font-size: 0.85rem;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-dark);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
    z-index: 999;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

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

.back-to-top:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* 暗黑模式 */
.dark-mode {
    background: var(--bg-dark);
    color: var(--text-light);
}

.dark-mode .header {
    background: linear-gradient(135deg, #16213e, #0f3460);
}

.dark-mode .hero {
    background: #16213e;
}

.dark-mode .hero h2 {
    color: var(--primary);
}

.dark-mode .hero p {
    color: #ccc;
}

.dark-mode .card {
    background: #16213e;
    color: #ddd;
}

.dark-mode .card p {
    color: #bbb;
}

.dark-mode .card .meta {
    color: #888;
}

.dark-mode .contact-info {
    background: #16213e;
    color: #ddd;
}

.dark-mode .footer {
    background: #0f3460;
}

.dark-mode .faq-question {
    color: var(--primary);
}

.dark-mode .faq-answer {
    color: #ccc;
}

.dark-mode .section h2 {
    color: var(--primary);
}

.dark-mode .section h2::after {
    background: var(--primary);
}

.dark-mode .banner-dots .dot.active {
    background: var(--primary);
}

.dark-mode .banner-dots .dot {
    background: #555;
}

.dark-mode .btn {
    background: var(--primary);
}

.dark-mode .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.dark-mode .btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.dark-mode .section {
    border-bottom-color: #2c3e50;
}

.dark-mode .section h3 {
    color: var(--primary-light);
}

.dark-mode .section h4 {
    color: var(--primary-light);
}

.dark-mode .howto-steps li {
    border-left-color: var(--primary);
}

.dark-mode .howto-steps li::before {
    background: var(--primary);
}

.dark-mode .team-member h4 {
    color: var(--primary-light);
}

.dark-mode .team-member p {
    color: #aaa;
}

.dark-mode .contact-info strong {
    color: var(--primary-light);
}

.dark-mode .faq-item {
    border-bottom-color: #2c3e50;
}

.dark-mode ul, .dark-mode ol {
    color: #ccc;
}

.dark-mode .search-box input {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.dark-mode .search-box input::placeholder {
    color: #aaa;
}

.dark-mode .search-box button {
    background: var(--primary);
    color: #fff;
}

.dark-mode .search-box button:hover {
    background: var(--primary-dark);
}

.dark-mode .nav a::after {
    background: var(--primary);
}

.dark-mode a {
    color: var(--primary-light);
}

.dark-mode a:hover {
    color: var(--primary);
}

.dark-mode .banner-slider {
    background: rgba(0,0,0,0.2);
}

/* 响应式 */
@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .header .container {
        flex-direction: column;
        gap: 10px;
    }

    .nav {
        justify-content: center;
        gap: 10px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .banner-slide {
        padding: 30px 15px;
        min-height: 200px;
    }

    .banner-slide h3 {
        font-size: 1.5rem;
    }

    .section {
        padding: 30px 0;
    }

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

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.4rem;
    }

    .nav a {
        font-size: 0.9rem;
        padding: 3px 8px;
    }

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

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

    .section h2 {
        font-size: 1.6rem;
    }

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

    .team-member {
        flex: 1 1 150px;
    }
}

/* 滚动动画 - 通用 */
.card, .section .grid-2 > div, .section .grid-3 > div {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 辅助动画 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.logo svg {
    animation: pulse 3s infinite;
}

/* 毛玻璃效果 */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.dark-mode ::-webkit-scrollbar-track {
    background: #2c3e50;
}

.dark-mode ::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}