/* 字体导入 */
@font-face {
    font-family: 'AiDeep';
    src: url('../image/AiDeep.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@import url('https://fonts.googleapis.com/css2?family=Century+Gothic:wght@400;700&display=swap');

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #f1f2f4;
    padding-top: 100px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: rgba(138, 102, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 0 25px 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    z-index: 2000;
}

.nav-container {
    margin: 0;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.back-btn, .login-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.login-btn {
    background-color: #d8b4fe;
    color: #6b21a8;
}

.login-btn:hover {
    background-color: #c084fc;
    color: #581c87;
}

/* 主内容样式 */
.main-content {
    padding: 50px 0;
}

.page-title {
    font-family: 'AiDeep', Arial, sans-serif;
    font-size: 3.5rem;
    color: #5c30d1;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-subtitle {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 60px;
    color: #666;
}

/* 卡片网格布局 - 修改为2列布局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
}

/* 卡片模块样式 */
.card-module {
    background-color: transparent; /* 去掉白色背景 */
    border-radius: 20px;
    padding: 30px;
    /* 去掉box-shadow和transition，因为悬停效果移到图片上 */
    text-align: center;
    position: relative;
}

/* 去掉整个卡片的悬停效果 */
/* .card-module:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
} */

.card-module img {
    width: 200px;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(147, 112, 219, 0.3);
    transition: all 0.3s ease; /* 添加过渡效果 */
}

/* 将悬停效果只应用在图片上 */
.card-module img:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(147, 112, 219, 0.5);
}

.card-module h3 {
    font-size: 1.5rem;
    color: #5c30d1;
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
}

.card-module h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background-color: #5c30d1;
}

.card-module p {
    color: #666;
    line-height: 1.8;
    text-align: left;
    font-size: 0.95rem;
}

/* 将Upright和Reversed文字设置为灰色 */
.card-module p strong {
    color: #888; /* 灰色 */
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航栏移动端样式 */
    .navbar {
        width: 95%;
    }
    
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .logo img {
        height: 35px;
        flex-shrink: 0;
    }
    
    .nav-buttons {
        gap: 10px;
        flex-shrink: 0;
    }
    
    .back-btn, .login-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .card-module {
        padding: 20px;
    }
    
    .card-module img {
        width: 150px;
        height: 225px;
    }
}

/* 新增小屏幕媒体查询 */
@media (max-width: 480px) {
    .navbar {
        width: 98%;
    }
    
    .nav-container {
        padding: 0 10px;
        height: 55px;
    }
    
    .logo img {
        height: 30px;
    }
    
    .nav-buttons {
        gap: 8px;
    }
    
    .back-btn, .login-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

/* 翻转容器样式 - 修改初始状态 */
.card-flip-container {
    perspective: 1000px;
    width: 200px;
    height: 350px;
    margin: 0 auto 20px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
    /* 初始状态显示背面 */
    transform: rotateY(180deg);
}

/* 点击后翻转到正面 */
.card-flip-inner.flipped {
    transform: rotateY(0deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

.card-back {
    transform: rotateY(180deg);
}

.card-front img, .card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
}

.card-front img:hover, .card-back img:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 移除原来的图片样式，因为现在图片在翻转容器内 */
.card-module > img {
    display: none;
}