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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    min-height: 100vh;  /* 确保body至少占满视口高度 */
    display: flex;      /* 使用flex布局 */
    flex-direction: column;  /* 垂直方向排列 */
}

/* 添加背景图片和毛玻璃效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(1px);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.0);
    backdrop-filter: blur(3px);
    z-index: -1;
}

/* 头部样式 */
header {
    background: linear-gradient(to bottom, 
        rgba(68, 68, 68, 0.8),
        rgba(51, 51, 51, 0.8)
    );
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.main-logo {
    max-height: 60px;
    /*filter: brightness(0) invert(1);   将logo颜色改为白色 */
}

/* 主要内容区域样式 */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;  /* 让main区域占据剩余空间 */
}

.platforms-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.platform-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.platform-logo {
    width: 200px;
    height: 50px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    margin-bottom: 10px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    background-color: rgba(76, 175, 80, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-btn {
    background-color: #4CAF50;
    color: white;
}

.register-btn {
    background-color: rgba(33, 150, 243, 0.9);
    color: white;
}

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

/* 底部样式 */
footer {
    background: linear-gradient(to bottom, 
        rgba(68, 68, 68, 0.8),
        rgba(51, 51, 51, 0.8)
    );
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 20px 0;
    position: relative;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.1);
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;  /* 将footer推到底部 */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.nav-btn {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* 响应式设计 */
@media (min-width: 1200px) {
    .platforms-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .platform-card {
        flex: 0 1 calc(25% - 20px);
        max-width: calc(25% - 20px);
        padding: 20px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .platforms-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .platform-card {
        flex: 0 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 767px) {
    .platforms-container {
        display: flex;
        flex-direction: column;
        align-items: center;  /* 居中对齐 */
    }

    .platform-card {
        width: 90%;  /* 设置宽度为屏幕的80% */
        margin: 0 0 15px;  /* 保持原有的下边距 */
    }

    /* 确保logo和按钮适应新的宽度 */
    .platform-logo {
        width: 80%;
        height: auto;
        max-height: 80px;
        margin-bottom: 10px;
        object-fit: contain;  /* 确保在移动端也保持图片比例 */
    }

    .button-group {
        width: 100%;  /* 按钮组占满卡片宽度 */
    }

    .btn {
        width: 100%;  /* 按钮占满按钮组宽度 */
        padding: 8px 0;  /* 调整内边距 */
        justify-content: center;  /* 文字居中 */
    }

    .footer-info {
        padding: 20px;
    }

    .footer-text {
        padding: 15px;
    }

    .platform-name {
        font-size: 1.1em;
    }
}

/* 侧边联系方式样式 */
.contact-sidebar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-sidebar.left {
    left: 0;
}

.contact-sidebar.right {
    right: 0;
}

.contact-item {
    position: relative;
    width: auto;
    min-width: 80px;
    height: 50px;
    padding: 0 15px;
    background: rgba(68, 68, 68, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-decoration: none;
}

.contact-sidebar.left .contact-item {
    border-radius: 0 10px 10px 0;
}

.contact-sidebar.right .contact-item {
    border-radius: 10px 0 0 10px;
}

.contact-icon {
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.contact-popup {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    width: 200px;
    text-align: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 1s;
}

.contact-sidebar.left .contact-popup {
    left: 60px;
}

.contact-sidebar.right .contact-popup {
    right: 60px;
}

.contact-popup p {
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
}

.contact-popup .qr-code {
    width: 150px;
    height: 150px;
    border-radius: 5px;
}

.contact-item:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, #555, #444);
}

.contact-sidebar.right .contact-item:hover {
    transform: translateX(-5px);
}

.contact-item:hover .contact-popup {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.contact-item:hover .contact-popup {
    animation: none;
}

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

/* QQ和Telegram特定样式 */
.qq {
    background: linear-gradient(135deg, 
        rgba(18, 183, 245, 0.9), 
        rgba(14, 149, 201, 0.9)
    );
}

.telegram {
    background: linear-gradient(135deg, 
        rgba(0, 136, 204, 0.9), 
        rgba(0, 102, 153, 0.9)
    );
}

/* 修改联系方式样式 */
@media (max-width: 768px) {
    .contact-sidebar {
        position: fixed;
        bottom: 20px;
        top: auto;
        right: 20px;
        left: auto;
        transform: none;
        flex-direction: column;
        gap: 10px;
        z-index: 1000;
    }

    /* 重置左右侧边栏的位置 */
    .contact-sidebar.left,
    .contact-sidebar.right {
        right: 20px;
        left: auto;
    }

    /* 调整联系按钮样式为条状 */
    .contact-item {
        width: 140px;
        height: 40px;
        padding: 0 10px;
    }

    /* 移除之前的 after 伪元素文本 */
    .contact-item::after {
        content: none;
    }

    .qq::after,
    .telegram::after {
        content: none;
    }

    /* 重置圆角样式 */
    .contact-sidebar.left .contact-item,
    .contact-sidebar.right .contact-item {
        border-radius: 20px;
    }

    /* 调整弹出框位置 */
    .contact-popup {
        bottom: auto;
        top: 50%;
        left: auto;
        right: 140px;
        transform: translateY(-50%);
    }

    /* 调整弹出框箭头 */
    .contact-popup::after {
        content: '';
        position: absolute;
        right: -8px;
        top: 50%;
        transform: translateY(-50%);
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        border-left: 8px solid white;
        border-right: none;
    }

    /* 重置hover效果 */
    .contact-item:hover,
    .contact-sidebar.right .contact-item:hover {
        transform: translateX(-3px);
    }

    /* 调整动画效果 */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-50%) translateX(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }
    }

    /* 添加底部安全距离（适配全面屏手机） */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .contact-sidebar {
            bottom: calc(20px + env(safe-area-inset-bottom));
        }
    }

    body::before {
        background-attachment: fixed;
    }
    
    .platform-card {
        background: rgba(255, 255, 255, 0.4);
    }

    main {
        margin: 20px auto;  /* 减少移动端的上下边距 */
        padding: 0 15px;
    }

    footer {
        padding: 15px 0;  /* 减少移动端footer的内边距 */
    }

    .platform-card {
        margin: 0 0 5px;  /* 调整卡片间距 */
    }
}

/* 超小屏幕样式调整 */
@media (max-width: 360px) {
    .contact-sidebar {
        right: 10px;
    }

    .contact-item {
        width: 120px;
        height: 35px;
    }

    .contact-icon {
        font-size: 12px;
    }

    .platform-card {
        width: 90%;  /* 更小屏幕上稍微增加宽度比例 */
    }
}

/* 添加加载时间样式 */
.load-time {
    display: inline-block;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: normal;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .load-time {
        font-size: 10px;
        padding: 1px 4px;
        margin-left: 4px;
    }
    
    .btn {
        padding: 10px 15px;
    }

    .footer-nav {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
} 