/* 引入 Google 字体，让文本更好看 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif, 'Microsoft YaHei', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* 将背景修改为 bg.png，并使其覆盖整个页面 */
    background: url('bg.png') no-repeat center center/cover;
    background-attachment: fixed; /* 背景图片固定，不随滚动条滚动 */
}

.container {
    position: relative;
    text-align: center;
    padding: 20px;
}

.container h1 {
    color: #fff;
    font-size: 2.5em;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.cards-grid {
    display: grid;
    /* 在大屏幕上显示4列 */
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    justify-content: center;
}

.card {
    position: relative;
    width: 280px;
    height: 350px;
    /* 液态玻璃效果核心 */
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    backdrop-filter: blur(15px); /* 毛玻璃模糊效果 */
    border: 1px solid rgba(255, 255, 255, 0.2); /* 浅色边框 */
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1); /* 阴影增加立体感 */
    
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.5s, background 0.5s; /* 平滑过渡动画 */
}

.card:hover {
    transform: translateY(-15px); /* 鼠标悬停时向上移动 */
    background: rgba(255, 255, 255, 0.2); /* 悬停时更亮一点 */
}

.card .card-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.card .card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.card .card-description {
    font-size: 0.9em;
    font-weight: 300;
}

/* 响应式设计：当屏幕宽度小于1200px时，变为2x2布局 */
@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 响应式设计：当屏幕宽度小于768px时（手机），变为单列布局 */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .container h1 {
        font-size: 2em;
    }
    .card {
        width: 100%;
        max-width: 320px;
    }
}

/* --- 加载动画样式 --- */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(22, 22, 35, 0.9); /* 深色半透明背景，与页面风格一致 */
    backdrop-filter: blur(5px); /* 毛玻璃效果 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 确保在最顶层 */
    transition: opacity 0.75s, visibility 0.75s;
    opacity: 1;
    visibility: visible;
}

/* 用于隐藏加载动画的类 */
.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.sakura-loader {
    font-size: 5em; /* 调整樱花的大小 */
    animation: rotate-sakura 2s linear infinite;
    text-shadow: 0 0 15px rgba(255, 105, 180, 0.7); /* 为樱花添加粉色辉光 */
}

@keyframes rotate-sakura {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}