/* style.css - 爱情岛网站完整样式 */

/* 全局重置与基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
    color: #2d3436;
    line-height: 1.7;
    scroll-behavior: smooth;
    min-height: 100vh;
    transition: background 0.5s ease, color 0.3s ease;
}

/* 渐变Banner */
.banner {
    position: relative;
    max-width: 1200px;
    margin: 30px auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(231, 76, 60, 0.15);
    background: linear-gradient(145deg, #fce4ec 0%, #f8bbd0 50%, #f48fb1 100%);
    transition: box-shadow 0.4s;
}

.banner:hover {
    box-shadow: 0 25px 70px rgba(231, 76, 60, 0.25);
}

.banner-slide {
    display: none;
    animation: fadeSlide 0.8s ease;
}

.banner-slide.active {
    display: block;
}

@keyframes fadeSlide {
    0% { opacity: 0; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

.banner-controls {
    text-align: center;
    padding: 16px 0 20px;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.2);
}

.dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot.active {
    background: #e74c3c;
    border-color: #e74c3c;
    transform: scale(1.25);
    box-shadow: 0 0 15px rgba(231,76,60,0.5);
}

/* 圆角卡片 */
.service-card,
.article-list article,
.faq-item,
blockquote {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card {
    padding: 30px 25px;
    text-align: center;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(231, 76, 60, 0.15);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(231, 76, 60, 0.3);
}

.article-list article {
    padding: 24px 28px;
    margin-bottom: 18px;
    border-left: 5px solid #e74c3c;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.article-list article:hover {
    transform: translateX(6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-left-color: #c0392b;
}

.faq-item {
    padding: 20px 24px;
    margin-bottom: 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.faq-item:hover {
    background: rgba(231, 76, 60, 0.08);
    transform: scale(1.01);
}

.faq-item.active {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.faq-item p {
    display: none;
    margin-top: 12px;
    color: #555;
    line-height: 1.8;
}

.faq-item.active p {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

blockquote {
    padding: 20px 28px;
    margin: 20px 0;
    border-left: 6px solid #e74c3c;
    font-style: italic;
    color: #444;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 毛玻璃效果通用 */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

/* 导航栏毛玻璃 */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: #2d3436;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 3px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 60%;
}

.nav-links a:hover {
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-box input {
    padding: 8px 18px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 30px;
    outline: none;
    width: 200px;
    font-size: 14px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.search-box input:focus {
    width: 260px;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231,76,60,0.15);
}

.search-box button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(231,76,60,0.3);
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231,76,60,0.4);
}

.dark-toggle, .menu-toggle {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(0,0,0,0.05);
    font-size: 22px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 30px;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.dark-toggle:hover, .menu-toggle:hover {
    background: rgba(231,76,60,0.1);
    transform: scale(1.05);
}

.menu-toggle {
    display: none;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        padding: 24px 20px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.1);
        border-radius: 0 0 24px 24px;
        gap: 12px;
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .search-box input {
        width: 120px;
    }

    .search-box input:focus {
        width: 160px;
    }

    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    h3 { font-size: 18px; }

    .service-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .banner {
        margin: 16px 12px;
        border-radius: 16px;
    }

    .section {
        padding: 0 16px;
        margin: 30px auto;
    }

    footer .footer-links ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .search-box input {
        width: 90px;
        font-size: 12px;
    }

    .search-box input:focus {
        width: 130px;
    }

    .nav-links a {
        padding: 10px 14px;
        font-size: 14px;
    }

    .banner-controls .dot {
        width: 10px;
        height: 10px;
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 暗色模式 */
.dark-mode {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #e0e0e0;
}

.dark-mode header {
    background: rgba(15, 12, 41, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dark-mode .nav-links a {
    color: #e0e0e0;
}

.dark-mode .nav-links a:hover {
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
}

.dark-mode .nav-links a::after {
    background: linear-gradient(90deg, #e94560, #f39c12);
}

.dark-mode .service-card,
.dark-mode .article-list article,
.dark-mode .faq-item,
.dark-mode blockquote {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
}

.dark-mode .service-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(233, 69, 96, 0.3);
}

.dark-mode .article-list article {
    border-left-color: #e94560;
}

.dark-mode .article-list article:hover {
    border-left-color: #ff6b6b;
}

.dark-mode .faq-item:hover {
    background: rgba(233, 69, 96, 0.08);
}

.dark-mode .faq-item.active {
    background: rgba(233, 69, 96, 0.12);
    border-color: rgba(233, 69, 96, 0.2);
}

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

.dark-mode blockquote {
    border-left-color: #e94560;
    background: rgba(255, 255, 255, 0.04);
}

.dark-mode .banner {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

.dark-mode .dot {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.dark-mode .dot.active {
    background: #e94560;
    border-color: #e94560;
    box-shadow: 0 0 15px rgba(233,69,96,0.5);
}

.dark-mode .search-box input {
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.1);
}

.dark-mode .search-box input:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233,69,96,0.2);
}

.dark-mode .search-box button {
    background: linear-gradient(135deg, #e94560, #c0392b);
}

.dark-mode .dark-toggle,
.dark-mode .menu-toggle {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #e0e0e0;
}

.dark-mode footer {
    background: rgba(15, 12, 41, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.dark-mode footer a {
    color: #e94560;
}

.dark-mode h1, .dark-mode h2, .dark-mode h3 {
    color: #f1c40f;
}

.dark-mode h1 {
    border-left-color: #e94560;
}

.dark-mode h2 {
    border-bottom-color: rgba(233,69,96,0.2);
}

/* hover动画补充 */
.service-card svg {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover svg {
    transform: scale(1.1) rotate(-2deg);
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s;
}

.read-more::after {
    content: ' →';
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    display: inline-block;
}

.read-more:hover::after {
    opacity: 1;
    transform: translateX(4px);
}

.read-more:hover {
    color: #c0392b;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    display: none;
    box-shadow: 0 8px 25px rgba(231,76,60,0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
    backdrop-filter: blur(4px);
}

#back-to-top:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 12px 35px rgba(231,76,60,0.5);
    background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.dark-mode #back-to-top {
    background: linear-gradient(135deg, #e94560, #c0392b);
    box-shadow: 0 8px 25px rgba(233,69,96,0.3);
}

.dark-mode #back-to-top:hover {
    box-shadow: 0 12px 35px rgba(233,69,96,0.4);
}

/* 服务网格 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin: 30px 0;
}

/* 文章列表 */
.article-list time {
    color: #888;
    font-size: 13px;
    display: block;
    margin: 6px 0;
    letter-spacing: 0.5px;
}

/* 通用标题 */
.section h1 {
    font-size: 32px;
    color: #c2185b;
    margin-bottom: 20px;
    border-left: 5px solid #e74c3c;
    padding-left: 18px;
    letter-spacing: -0.5px;
}

.section h2 {
    font-size: 26px;
    color: #880e4f;
    margin: 30px 0 18px;
    border-bottom: 3px solid rgba(231,76,60,0.15);
    padding-bottom: 10px;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 3px;
}

.section h3 {
    font-size: 20px;
    color: #4a148c;
    margin: 20px 0 12px;
}

.dark-mode .section h1 {
    color: #f1c40f;
    border-left-color: #e94560;
}

.dark-mode .section h2 {
    color: #f1c40f;
    border-bottom-color: rgba(233,69,96,0.2);
}

.dark-mode .section h3 {
    color: #e0e0e0;
}

/* 联系信息 */
.contact-info p {
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.dark-mode .contact-info p {
    border-bottom-color: rgba(255,255,255,0.05);
}

/* 页脚 */
footer {
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ecf0f1;
    padding: 40px 24px;
    text-align: center;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

footer a {
    color: #f1c40f;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #e74c3c;
}

footer .footer-links {
    margin-bottom: 24px;
}

footer .footer-links ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

footer p {
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.8;
}

/* 列表样式 */
#howto ol, #howto ul {
    margin-left: 28px;
    margin-bottom: 18px;
}

#howto li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* 网站地图 */
#site-map ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

#site-map ul li a {
    text-decoration: none;
    color: #e74c3c;
    padding: 6px 16px;
    border-radius: 30px;
    background: rgba(231,76,60,0.06);
    transition: all 0.3s;
    font-weight: 500;
}

#site-map ul li a:hover {
    background: rgba(231,76,60,0.15);
    transform: translateY(-2px);
}

.dark-mode #site-map ul li a {
    color: #e94560;
    background: rgba(233,69,96,0.08);
}

.dark-mode #site-map ul li a:hover {
    background: rgba(233,69,96,0.2);
}

/* 性能优化：减少重排 */
img, svg {
    max-width: 100%;
    height: auto;
}

/* 选择与焦点样式 */
::selection {
    background: rgba(231, 76, 60, 0.25);
    color: #fff;
}

:focus-visible {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 暗色模式滚动条 */
.dark-mode ::-webkit-scrollbar {
    width: 8px;
}

.dark-mode ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.dark-mode ::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 10px;
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}