/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

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

/* 导航栏 */
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

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

.logo img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 30px;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ffd700;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: 0.4s;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 999;
}

.mobile-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    margin: 20px 0;
    transition: color 0.3s;
}

.mobile-menu a:hover {
    color: #ffd700;
}

/* 移动端菜单打开状态 */
.mobile-menu.open {
    right: 0;
}

/* 移动端菜单按钮动画 */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* 英雄区 */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.6;
    filter: brightness(0.7);
}

/* 服务器地图剪影样式 */
.server-maps {
    padding: 80px 20px;
    text-align: center;
    background: rgba(10, 10, 25, 0.95);
    position: relative;
}

.server-maps h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 50px;
    text-shadow: 0 0 20px rgba(100, 200, 255, 0.7);
    position: relative;
}

.server-maps h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #64c8ff, #a855f7);
    margin: 15px auto 0;
    border-radius: 3px;
}

.map-container {
    position: relative;
    width: 80%;
    max-width: 600px;
    height: 400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(100, 200, 255, 0.3);
}

/* 发光进度条效果 */
.map-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 20px;
    z-index: 10;
    pointer-events: none;
    transition: box-shadow 0.1s linear;
}

.map-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: all 1s ease-in-out;
    opacity: 0;
    filter: brightness(0.9) contrast(1.1);
}

/* 优化后的图片轮换效果 */
.map-img {
    /* 初始化所有图片 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    opacity: 0;
    z-index: 0;
    filter: brightness(0.9) contrast(1.1);
}

/* 第一张图片初始显示 */
.map-img:nth-child(1) {
    opacity: 1;
    z-index: 3;
}

/* 优化后的轮换动画 - 使用关键帧控制切换 */
@keyframes fadeIn {
    from {
        opacity: 0;
        z-index: 2;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        z-index: 3;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        z-index: 3;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0.6;
        z-index: 2;
        transform: translate(-50%, -50%) scale(0.95);
    }
}

@keyframes backgroundOut {
    from {
        opacity: 0.6;
        z-index: 2;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 0;
        z-index: 1;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* 使用JavaScript控制动画，确保切换正确 */
.map-img.active {
    opacity: 1;
    z-index: 3;
    transform: translate(-50%, -50%) scale(1);
}

.map-img.next {
    opacity: 0.6;
    z-index: 2;
    transform: translate(-50%, -50%) scale(0.95);
}

.map-img.prev {
    opacity: 0;
    z-index: 1;
    transform: translate(-50%, -50%) scale(0.9);
}

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

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ffd700;
    color: #000;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #ffed4e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 通用区块样式 */
.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 15px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #ffd700;
    margin: 10px auto 0;
}

.section-description {
    text-align: center;
    font-size: 18px;
    margin-bottom: 50px;
    color: #666;
}

/* 社团介绍 */
.about-section {
    padding: 100px 0;
    background-color: #fff;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #555;
}

.about-text ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.about-text li {
    font-size: 16px;
    margin-bottom: 10px;
    color: #666;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 繁星共创 - 致谢榜单 */
.stars-section {
    padding: 100px 0;
    background-color: #0a0a1f;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 15%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 15%),
        radial-gradient(circle at 40% 70%, rgba(255, 215, 0, 0.05) 0%, transparent 15%),
        radial-gradient(circle at 90% 85%, rgba(255, 255, 255, 0.06) 0%, transparent 15%);
    color: #fff;
}

.stars-section .section-title {
    color: #fff;
}

.stars-section .section-title::after {
    background-color: #ffd700;
}

.sponsor-tier {
    margin-bottom: 60px;
    padding: 30px;
    border-radius: 15px;
    transition: transform 0.3s;
}

.sponsor-tier:hover {
    transform: translateY(-5px);
}

.tier-god {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(218, 165, 32, 0.1));
    border: 2px solid rgba(255, 215, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* 末影龙飞行样式 */
.ender-dragon {
    position: absolute;
    background-image: url('../images/bling/Ender_Dragon.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 160px;
    height: 120px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

/* 末影龙随机路径飞行动画 - 避免倒着飞 */
@keyframes dragonFlight {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    20% {
        transform: translate(60%, 30%) rotate(20deg);
    }
    40% {
        transform: translate(80%, 10%) rotate(-15deg);
    }
    60% {
        transform: translate(60%, 70%) rotate(10deg);
    }
    80% {
        transform: translate(20%, 50%) rotate(-20deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

.tier-guardian {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.2), rgba(70, 130, 180, 0.1));
    border: 2px solid rgba(135, 206, 235, 0.5);
    position: relative;
    overflow: hidden;
}

/* Power粒子样式 */
.falling-power {
    position: absolute;
    background-image: url('../images/bling/power.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}

/* Power粒子下落动画 */
@keyframes fallPower {
    0% {
        top: -20px; /* 确保从顶部上方开始 */
        opacity: 0; /* 开始时完全透明 */
    }
    5% {
        top: 0; /* 到达顶部边缘时 */
        opacity: 0.8; /* 完全显示 */
    }
    90% {
        opacity: 0.8;
    }
    100% {
        top: 100%; /* 到达底部时 */
        opacity: 0;
    }
}

.tier-explorer {
    background: linear-gradient(135deg, rgba(50, 205, 50, 0.2), rgba(34, 139, 34, 0.1));
    border: 2px solid rgba(50, 205, 50, 0.5);
    position: relative;
    overflow: hidden;
}

/* 落叶样式 */
.falling-leaf {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    pointer-events: none;
    transform-origin: center center;
    z-index: 1;
}

/* 落叶旋转动画 */
@keyframes rotateLeaf {
    0% { transform: rotate(0deg) translate(0, 0); }
    100% { transform: rotate(360deg) translate(10px, 10px); }
}

/* 落叶下落动画 */
@keyframes fallLeaf {
    0% {
        top: -20px;
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.tier-newbie {
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.2), rgba(255, 105, 180, 0.1));
    border: 2px solid rgba(255, 192, 203, 0.5);
}

.tier-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.tier-header h3 {
    font-size: 28px;
    margin: 0;
}

.tier-god h3 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.tier-guardian h3 {
    color: #87ceeb;
    text-shadow: 0 0 10px rgba(135, 206, 235, 0.5);
}

.tier-explorer h3 {
    color: #32cd32;
    text-shadow: 0 0 10px rgba(50, 205, 50, 0.5);
}

.tier-newbie h3 {
    color: #ffc0cb;
    text-shadow: 0 0 10px rgba(255, 192, 203, 0.5);
}

.tier-icon img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.tier-description {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 25px;
    text-align: center;
}

.sponsor-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.sponsor-item {
    position: relative;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    min-width: 120px;
    transition: transform 0.3s;
    overflow: hidden;
}

.sponsor-item:hover {
    transform: scale(1.05);
}

.god-item {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2), transparent 70%);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.guardian-item {
    background: radial-gradient(circle, rgba(135, 206, 235, 0.2), transparent 70%);
    border: 1px solid rgba(135, 206, 235, 0.3);
}

.explorer-item {
    background: radial-gradient(circle, rgba(50, 205, 50, 0.2), transparent 70%);
    border: 1px solid rgba(50, 205, 50, 0.3);
}

.newbie-item {
    background: radial-gradient(circle, rgba(255, 192, 203, 0.2), transparent 70%);
    border: 1px solid rgba(255, 192, 203, 0.3);
}

.sponsor-name {
    font-size: 18px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.god-item .sponsor-name {
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
}

.guardian-item .sponsor-name {
    color: #87ceeb;
    text-shadow: 0 0 5px rgba(135, 206, 235, 0.7);
}

.explorer-item .sponsor-name {
    color: #32cd32;
    text-shadow: 0 0 5px rgba(50, 205, 50, 0.7);
}

.newbie-item .sponsor-name {
    color: #ffc0cb;
    text-shadow: 0 0 5px rgba(255, 192, 203, 0.7);
}

/* 特效动画 */
.sponsor-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

/* 创世神特效 */
@keyframes godEffect {
    0% {
        opacity: 0;
        background: radial-gradient(circle, rgba(255, 215, 0, 0.5), transparent 70%);
    }
    50% {
        opacity: 0.8;
        background: radial-gradient(circle, rgba(255, 215, 0, 0.8), transparent 50%);
    }
    100% {
        opacity: 0;
        background: radial-gradient(circle, rgba(255, 215, 0, 0.5), transparent 70%);
    }
}

/* 联系我们 */
.contact-section {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 60px;
}

.contact-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 30px;
    width: calc(33.333% - 20px);
    min-width: 300px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.contact-icon {
    margin-bottom: 20px;
}

.contact-icon img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f0f0f0;
    padding: 10px;
    transition: transform 0.3s;
}

.contact-card:hover .contact-icon img {
    transform: scale(1.1);
}

.contact-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.contact-card p {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.contact-card .btn-primary {
    margin-top: 15px;
}

/* 二维码区域 */
.qrcode-section {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.qrcode-item {
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 250px;
}

.qrcode-item h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.qrcode-placeholder img {
    width: 200px;
    height: 200px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

/* 悬浮弹窗样式 */
.floating-popup {
    position: fixed;
    width: 300px;
    height: 150px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    cursor: default;
    /* 使用背景图片，用户后续可替换路径 */
    background-image: url('../images/sign-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 1.0;
    transition: transform 0.1s ease-out;
}

.popup-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: transparent;
    padding: 20px;
}

.popup-text {
    font-size: 1.0rem;
    line-height: 1.4;
    color: #e2e2e2;
    margin-bottom: 15px;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    text-align: left;
}

.close-popup {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.close-popup:hover {
    background: rgba(58, 58, 58, 0.123);
    transform: scale(1.1);
}

/* 响应式设计 */
/* 平板设备 */
@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .contact-card {
        width: calc(50% - 15px);
    }
    
    /* 服务器地图剪影响应式 */
    .server-maps h2 {
        font-size: 2rem;
    }
    
    .map-container {
        width: 90%;
        height: 350px;
        box-shadow: 0 8px 30px rgba(100, 200, 255, 0.3);
    }
    .map-container::before {
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        border-radius: 18px;
    }
}

/* 移动设备 */
@media (max-width: 768px) {
    /* 导航栏调整 */
    .nav-links {
        display: none;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    /* 英雄区调整 */
    .hero-content h2 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 16px;
    }
    
    /* 区块标题调整 */
    .section-title {
        font-size: 30px;
    }
    
    .section-description {
        font-size: 16px;
    }
    
    /* 联系卡片调整 */
    .contact-card {
        width: 100%;
    }
    
    /* 赞助商列表调整 */
    .sponsor-list {
        flex-direction: column;
        align-items: center;
    }
    
    .sponsor-item {
        width: 80%;
    }
    
    /* 二维码区域调整 */
    .qrcode-section {
        gap: 30px;
    }
    
    .qrcode-item {
        width: 200px;
    }
    
    .qrcode-placeholder img {
        width: 150px;
        height: 150px;
    }
    
    /* 服务器地图剪影响应式 */
    .server-maps {
        padding: 60px 15px;
    }
    
    .server-maps h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .map-container {
        width: 95%;
        height: 280px;
        box-shadow: 0 6px 25px rgba(100, 200, 255, 0.3);
    }
    .map-container::before {
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
        border-radius: 16px;
    }
}

/* 小屏幕移动设备 */
@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    /* 各区域间距调整 */
    .about-section,
    .stars-section,
    .contact-section {
        padding: 60px 0;
    }
    
    /* 赞助层级标题调整 */
    .tier-header h3 {
        font-size: 24px;
    }
    
    .tier-icon img {
        width: 50px;
        height: 50px;
    }
    
    .contact-card {
        padding: 20px;
    }
    
    /* 服务器地图剪影响应式 */
    .server-maps {
        padding: 40px 10px;
    }
    
    .server-maps h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .map-container {
        width: 100%;
        height: 200px;
        box-shadow: 0 4px 20px rgba(100, 200, 255, 0.3);
    }
    .map-container::before {
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        border-radius: 14px;
    }
}