/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #87CEEB, #4682B4);
    font-family: "Microsoft YaHei", sans-serif;
    position: relative;
    overflow: hidden;
}

/* 云朵动画样式 */
.cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    animation: float linear infinite;
    opacity: 0.8;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud1 {
    width: 100px;
    height: 40px;
    top: 20%;
    left: -100px;
    animation-duration: 30s;
}

.cloud2 {
    width: 60px;
    height: 24px;
    top: 40%;
    left: -60px;
    animation-duration: 20s;
}

.cloud3 {
    width: 80px;
    height: 32px;
    top: 60%;
    left: -80px;
    animation-duration: 25s;
}

.cloud1::before { width: 50px; height: 50px; top: -20px; left: 15px; }
.cloud1::after { width: 40px; height: 40px; top: -15px; left: 45px; }
.cloud2::before { width: 30px; height: 30px; top: -12px; left: 9px; }
.cloud2::after { width: 24px; height: 24px; top: -9px; left: 27px; }
.cloud3::before { width: 40px; height: 40px; top: -16px; left: 12px; }
.cloud3::after { width: 32px; height: 32px; top: -12px; left: 36px; }

/* 云朵浮动动画 */
@keyframes float {
    from { transform: translateX(-100px); }
    to { transform: translateX(calc(100vw + 100px)); }
}

/* 标题样式 */
.title {
    font-size: 36px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 50px 0;
    z-index: 1;
}

/* 按钮容器样式 */
.button-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    z-index: 1;
}

/* 功能按钮样式 */
.feature-button {
    width: 200px;
    height: 200px;
    margin: 10px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.feature-button i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #3498db;
}

/* 游戏弹窗样式 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.game-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
}

.game-modal h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: none;
    border-radius: 15px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-item:hover {
    background: #e9ecef;
    transform: translateY(-3px);
}

.game-item i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #3498db;
}

/* 工具弹窗样式 */
.tool-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.tool-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
}

.tool-modal h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: none;
    border-radius: 15px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-item:hover {
    background: #e9ecef;
    transform: translateY(-3px);
}

.tool-item i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #3498db;
}

/* 通用弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 80%;
    width: 400px;
    position: relative;
    animation: modalAppear 0.3s ease-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 弹窗出现动画 */
@keyframes modalAppear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.modal p {
    margin: 10px 0;
    line-height: 1.6;
    color: #34495e;
}

.modal .contact {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #95a5a6;
    transition: color 0.3s;
}

.modal .close-btn:hover {
    color: #34495e;
}

/* 统计容器样式 */
.stats-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-item i {
    color: #4682B4;
}

.stat-link:hover {
    transform: scale(1.05);
}
/* 用户名容器样式 */
.username-container {
    margin-bottom: 20px;
}


.submit-btn {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

/* 测试平台按钮样式 */
.test-platform-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #2c3e50;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    z-index: 1000;
    text-decoration: none;
    min-width: 20px;
    justify-content: center;
}

.test-platform-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* NAS按钮样式 */
.knowledge-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #2c3e50;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    z-index: 1000;
    text-decoration: none;
    min-width: 20px;
    justify-content: center;
}

.knowledge-button:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* AI按钮样式 */
.ai-button {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #2c3e50;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    z-index: 1000;
    text-decoration: none;
    min-width: 20px;
    justify-content: center;
}

.ai-button:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 响应式样式：768px以下 */
@media screen and (max-width: 768px) {
    .title {
        font-size: 24px;
        margin: 20px 0;
        padding: 10px 20px;
    }

    .button-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 15px;
        gap: 12px;
    }

    .feature-button {
        width: min(140px, 30vw);
        height: min(140px, 30vw);
        font-size: 16px;
        margin: 5px;
    }

    .feature-button i {
        font-size: min(40px, 10vw);
        margin-bottom: 10px;
    }

    .cloud1 { animation-duration: 20s; }
    .cloud2 { animation-duration: 15s; }
    .cloud3 { animation-duration: 18s; }

    /* 弹窗响应式 */
    .game-modal .modal-content,
    .tool-modal .modal-content {
        width: 85%;
        padding: 20px;
    }

    .game-item, .tool-item {
        padding: 15px;
    }

    .game-item i, .tool-item i {
        font-size: 28px;
    }
}

/* 响应式样式：360px以下（特小屏幕） */
@media screen and (max-width: 360px) {
    .button-container {
        gap: 8px;
        padding: 0 10px;
    }

    .feature-button {
        height: 100px;
        font-size: 14px;
    }

    .feature-button i {
        font-size: 28px;
        margin-bottom: 6px;
    }
}

/* 响应式样式：横屏（896px以下） */
@media screen and (max-width: 896px) and (orientation: landscape) {
    body {
        min-height: 120vh;
    }

    .button-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 20px;
    }

    .feature-button {
        height: 100px;
    }
}

/* 响应式样式：480px以下（保持按钮正方形） */
@media screen and (max-width: 480px) {
    .feature-button {
        width: min(120px, 40vw);
        height: min(120px, 40vw);
        font-size: 14px;
    }

    .feature-button i {
        font-size: min(36px, 12vw);
        margin-bottom: 8px;
    }
}

 /* 新增备案信息样式 */
.footer {
    position: absolute;
    bottom: 10px;
    width: 100 %;
    text - align: center;
    padding: 15px 0;
    margin - top: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    z-index: 10;
}

.beian-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.beian-link:hover {
    color: #fff;
    text-decoration: underline;
}