/* style.css */
/* ===== CSS变量定义 ===== */
:root {
    --primary-color: #a8e6cf;
    --secondary-color: #dcedc1;
    --accent-color: #6bb39b;
    --dark-color: #345e54;
    --text-color: #333;
    --light-text: #fff;
}

/* ===== 重置和基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9fdfb;
    overflow-x: hidden;
}

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

.b-border {
    background-color: #f5f5f57a;
    margin: 20px 15px;
    width: calc(100% - 30px);
}

/* ===== 通用组件样式 ===== */
/* 按钮样式 */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--light-text);
}

.btn-primary:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary:hover {
    background-color: var(--dark-color);
    color: var(--light-text);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 链接样式 */
.external-link {
    color: var(--accent-color) !important;
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.external-link:hover {
    color: var(--dark-color) !important;
    text-decoration-color: var(--dark-color);
}

.external-link::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6'%3E%3C/path%3E%3Cpolyline points='15,3 21,3 21,9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

/* 内部链接样式 */
.internal-link {
    color: var(--accent-color) !important;
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.internal-link:hover {
    color: var(--dark-color) !important;
    text-decoration-color: var(--dark-color);
}

.internal-link::after {
    content: none !important;
}

/* 按钮内的链接特殊处理 */
.btn-primary a.external-link,
.btn-secondary a.external-link,
.btn-primary .internal-link,
.btn-secondary .internal-link {
    color: inherit !important;
    text-decoration: none;
}

.btn-primary a.external-link:hover,
.btn-secondary a.external-link:hover,
.btn-primary .internal-link:hover,
.btn-secondary .internal-link:hover {
    color: inherit !important;
    text-decoration: none;
}

/* QQ群按钮样式 */
.qq-group-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 24px;
    text-decoration: none;
}

.qq-group-btn .fa-qq {
    font-size: 1.0rem;
}

/* 下载按钮样式 */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-btn:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 复制按钮样式 */
.copy-btn {
    padding: 6px 12px;
    background-color: var(--accent-color);
    color: var(--light-text);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
}

.copy-btn.copied {
    background-color: #4CAF50;
}

/* ===== 布局组件 ===== */
/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: transparent;
    padding: 20px 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: none;
}

.navbar.scrolled {
    background-color: rgba(168, 230, 207, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
}

.nav-logo img {
    height: 60px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    top: 85px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 1.3rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--light-text);
    margin: 3px 0;
    transition: 0.3s;
}

.navbar.scrolled .bar {
    background-color: var(--dark-color);
}

/* ===== 页面区块样式 ===== */
/* 首页横幅样式 */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--dark-color);
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--dark-color);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--dark-color);
    border-bottom: 2px solid var(--dark-color);
    transform: rotate(45deg);
    margin-top: 10px;
    animation: bounce 2s infinite;
}

/* 图片展示区域 */
.gallery {
    padding: 100px 0;
    background-color: var(--secondary-color);
}

.gallery h2,
.features h2,
.events h2,
.join h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--dark-color);
}

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

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(52, 94, 84, 0.8));
    color: var(--light-text);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* 玩法介绍区域 */
.features {
    padding: 100px 0;
    background-color: #f9fdfb;
}

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

.feature-card {
    background-color: var(--light-text);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* 活动列表区域 */
.events {
    padding: 100px 0;
    background-color: var(--primary-color);
}

.events-list {
    max-width: 800px;
    margin: 0 auto;
}

.event-item {
    display: flex;
    background-color: var(--light-text);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.event-item:hover {
    transform: translateX(10px);
}

.event-date {
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.event-day {
    font-size: 2rem;
    font-weight: bold;
}

.event-month {
    font-size: 1rem;
}

.event-content {
    padding: 20px;
    flex: 1;
}

.event-content h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

/* 加入我们区域 */
.join {
    padding: 100px 0;
    background-color: #f9fdfb;
}

.join-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.join-info{
    background-color: var(--light-text);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.join-info h3{
    margin-bottom: 20px;
    color: var(--dark-color);
}

.join-info p {
    margin-bottom: 10px;
}

.join-form p {
    margin-bottom: 15px;
    text-align: center;
}

.form-note {
    font-size: 0.9rem;
    color: #666;
}

/* 服务器信息样式 */
.server-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(168, 230, 207, 0.1);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.server-info-item:hover {
    background-color: rgba(168, 230, 207, 0.2);
}

.info-label {
    font-weight: bold;
    min-width: 140px;
    color: var(--dark-color);
}

.info-value {
    flex: 1;
    margin: 0 10px;
    color: var(--text-color);
}

/* 服务器状态样式 */
.server-status {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 24px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
}

.server-status.online {
    border-left: 4px solid #2ecc71;
}

.server-status.offline {
    border-left: 4px solid #e74c3c;
}

.server-status.inloading {
    border-left: 4px solid #e39211;
}

.server-status-content {
    display: flex;
    align-items: center;
}

.server-status-details {
    flex-grow: 1;
}

.server-status-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

/* 下载区域样式 */
.download-section {
    margin: 25px 0;
    padding: 20px;
    background-color: rgba(168, 230, 207, 0.1);
    border-radius: 10px;
    text-align: center;
}

.download-section h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.download-section p {
    margin-bottom: 15px;
    color: var(--text-color);
}

/* 友情外链卡片样式 */
.friend-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.friend-link-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 60px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.friend-link-card:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.friend-link-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.friend-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.friend-link-content {
    flex: 1;
}

.friend-link-content h4 {
    color: var(--light-text);
    margin-bottom: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.friend-link-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0;
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 页脚中的链接样式 */
.footer .external-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer .external-link:hover {
    color: var(--light-text) !important;
}

.footer .external-link::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6'%3E%3C/path%3E%3Cpolyline points='15,3 21,3 21,9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.footer .internal-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer .internal-link:hover {
    color: var(--light-text) !important;
}

/* ===== 特效和动画 ===== */
/* 点击特效 */
.click-effect {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(107, 179, 155, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: clickEffect 0.6s ease-out forwards;
    z-index: 9999;
}

@keyframes clickEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.7;
    }

    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

/* 滚动箭头动画 */
@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(45deg);
    }

    40% {
        transform: translateY(-10px) rotate(45deg);
    }

    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* 加载动画样式 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loader.hidden {
    opacity: 0;
}

.loader-container {
    text-align: center;
}

.loader-image {
    width: 140px;
    height: auto;
    opacity: 0;
    animation: fadeInOut 2s infinite ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3.75rem;
    height: 1.25rem;
    margin: -0.625rem 0 0 -1.875rem;
    text-align: center;
}

.spinner>div {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 100%;
    background-color: #fff;
    -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    -webkit-animation-delay: -0.32s;
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    -webkit-animation-delay: -0.16s;
    animation-delay: -0.16s;
}

@-webkit-keyframes sk-bouncedelay {
    0%,
    80%,
    100% {
        -webkit-transform: scale(0);
    }

    40% {
        -webkit-transform: scale(1.0);
    }
}

@keyframes sk-bouncedelay {
    0%,
    80%,
    100% {
        -webkit-transform: scale(0);
        -ms-transform: scale(0);
        transform: scale(0);
    }

    40% {
        -webkit-transform: scale(1.0);
        -ms-transform: scale(1.0);
        transform: scale(1.0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 首页横幅轮播样式 */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* 设置每张背景图片 */
.slide:nth-child(1) {
    background-image: url('../images/background_1.webp');
}

.slide:nth-child(2) {
    background-image: url('../images/background_2.webp');
}

.slide:nth-child(3) {
    background-image: url('../images/background_3.webp');
}

.slide:nth-child(4) {
    background-image: url('../images/background_4.webp');
}

.slide:nth-child(5) {
    background-image: url('../images/background_5.webp');
}

.slide:nth-child(6) {
    background-image: url('../images/background_6.webp');
}

.slide:nth-child(7) {
    background-image: url('../images/background_7.webp');
}

.slide:nth-child(8) {
    background-image: url('../images/background_8.webp');
}

.slide:nth-child(9) {
    background-image: url('../images/background_9.webp');
}

.slide:nth-child(10) {
    background-image: url('../images/background_10.webp');
}

/* 渐变蒙版 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(168, 230, 207, 0.4), rgba(220, 237, 193, 0.4));
    z-index: 2;
}

.hero-content,
.hero-scroll {
    position: relative;
    z-index: 3;
}

/* 运行时间样式 */
#uptime-counter {
    color: var(--primary-color);
}

/* ===== 响应式设计 ===== */
/* 桌面端样式 */
@media (min-width: 769px) {
    .nav-container {
        justify-content: flex-start;
    }

    .nav-menu {
        margin-left: 40px;
    }

    .nav-link {
        margin-right: 30px;
    }

    .nav-link:last-child {
        margin-right: 0;
    }
}

/* 移动端样式 */
@media (max-width: 768px) {
    .nav-container {
        justify-content: space-between;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--primary-color);
        text-align: left;
        transition: all 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
    }

    .nav-menu.active {
        max-height: 100vh;
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
        padding: 15px 0;
    }

    .nav-link {
        margin: 8px 0;
        padding: 8px 20px;
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        text-align: left;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-toggle {
        display: flex;
    }

    .navbar.menu-open {
        background-color: rgba(168, 230, 207, 0.95) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }

    .navbar.menu-open .nav-logo {
        color: var(--dark-color) !important;
    }

    .navbar.menu-open .nav-logo img {
        filter: none !important;
    }

    .navbar.menu-open .bar {
        background-color: var(--dark-color) !important;
    }

    /* 汉堡菜单动画 */
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .server-info-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-label {
        min-width: auto;
        margin-bottom: 5px;
    }

    .info-value {
        margin: 5px 0;
        width: 100%;
    }

    .copy-btn {
        align-self: flex-end;
    }

    .download-section {
        margin: 20px 0;
        padding: 15px;
    }
    
    .download-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .friend-links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .friend-link-card {
        padding: 10px;
        min-height: 55px;
    }
    
    .friend-link-icon {
        font-size: 1.3rem;
        width: 35px;
        height: 35px;
    }
    
    .friend-link-content h4 {
        font-size: 0.95rem;
    }
    
    .friend-link-content p {
        font-size: 0.75rem;
    }
}