/* =========================================
   通信原理课程网站 - 紧凑版样式表
   标题：通信原理课程在线仿真网站
   ========================================= */

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif; }

body { min-height: 100vh; color: #1a365d; overflow-x: hidden; }

/* 背景动画 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(-45deg, #f0f8ff, #e0f2fe, #bae6fd, #ffffff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -2;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 飘动光晕 */
.shapes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    filter: blur(60px);
    border-radius: 50%;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 { width: 400px; height: 400px; background: rgba(59, 130, 246, 0.15); top: -10%; left: -10%; }
.shape-2 { width: 500px; height: 500px; background: rgba(14, 165, 233, 0.1); bottom: -10%; right: -5%; }
.shape-3 { width: 300px; height: 300px; background: rgba(125, 211, 252, 0.2); top: 30%; left: 40%; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 60px) scale(1.1); }
}

/* 毛玻璃盒子 */
.glass-box {
    background: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(14, 65, 136, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-box:hover {
    box-shadow: 0 12px 40px 0 rgba(14, 65, 136, 0.12);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 欢迎横幅（紧凑） */
.greeting-banner {
    text-align: center;
    padding: 12px 20px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(59, 130, 246, 0.08));
}

.greeting-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.greeting-icon { font-size: 20px; animation: wave 1s ease-in-out infinite; }

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

#greeting-text { font-size: 16px; font-weight: 600; color: #0284c7; }

/* 头部区域（紧凑） */
.header-section {
    text-align: center;
    padding: 25px 20px;
    margin-bottom: 15px;
}

.header-section h1 {
    font-size: 28px;
    margin-bottom: 8px;
    letter-spacing: 1px;
    color: #0f4c81;
}

.header-section .subtitle {
    font-size: 14px;
    color: #0284c7;
    font-weight: 500;
    margin-bottom: 12px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #bae6fd;
}

/* 项目简介（紧凑） */
.intro-section {
    padding: 15px 20px;
    margin-bottom: 15px;
}

.intro-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.intro-text {
    flex: 1;
}

.intro-text p {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.intro-text strong {
    color: #0284c7;
}

.intro-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.stat-item {
    text-align: center;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    min-width: 80px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.stat-label {
    font-size: 11px;
    opacity: 0.9;
}

/* 人物名片（紧凑横排版） */
.profiles-compact {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.profile-card-compact {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 18px;
    text-decoration: none;
    color: inherit;
}

.profile-card-compact:hover {
    transform: translateY(-3px);
}

.profile-left {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
    color: white;
}

.student-compact .profile-left {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.teacher-compact .profile-left {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.profile-right h3 {
    font-size: 16px;
    color: #0f4c81;
    margin-bottom: 3px;
}

.profile-right p {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
}

.profile-right a {
    font-size: 12px;
    color: #0284c7;
    text-decoration: none;
}

.profile-right a:hover {
    text-decoration: underline;
}

/* 在线仿真入口 */
.modules-section {
    margin-bottom: 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 12px;
    font-size: 22px;
    letter-spacing: 2px;
    color: #0f4c81;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title i {
    color: #0284c7;
}

/* 模块网格（紧凑） */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.module-btn {
    text-decoration: none;
    color: #1e293b;
    width: 100%;
    padding: 18px 12px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 14px;
}

.module-btn i {
    font-size: 32px;
    margin-bottom: 10px;
    transition: transform 0.3s;
    color: #0284c7;
}

.module-btn h3 {
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: bold;
    color: #0f4c81;
}

.module-btn p {
    font-size: 11px;
    color: #64748b;
}

.module-btn:hover i {
    transform: scale(1.15);
}

/* 二维码区域（紧凑） */
.qr-box {
    margin-top: 8px;
    text-align: center;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
    border: 1px solid #e2e8f0;
}

.qr-box canvas {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.qr-text {
    display: block;
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
}

/* 模块颜色 */
.color-1 i { color: #0ea5e9; }
.color-1:hover { background: rgba(14, 165, 233, 0.08); }

.color-2 i { color: #22c55e; }
.color-2:hover { background: rgba(34, 197, 94, 0.08); }

.color-3 i { color: #f59e0b; }
.color-3:hover { background: rgba(245, 158, 11, 0.08); }

.color-4 i { color: #ec4899; }
.color-4:hover { background: rgba(236, 72, 153, 0.08); }

.color-5 i { color: #8b5cf6; }
.color-5:hover { background: rgba(139, 92, 246, 0.08); }

.color-6 i { color: #f97316; }
.color-6:hover { background: rgba(249, 115, 22, 0.08); }

.color-7 i { color: #e11d48; }
.color-7:hover { background: rgba(225, 29, 72, 0.08); }

.color-8 i { color: #7c3aed; }
.color-8:hover { background: rgba(124, 58, 237, 0.08); }

/* 页脚 */
.footer {
    text-align: center;
    padding: 15px;
    margin-top: 10px;
}

.copyright {
    font-size: 13px;
    color: #64748b;
}

/* 进场动画 */
.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式 */
@media (max-width: 900px) {
    .intro-content { flex-direction: column; }
    .intro-stats { justify-content: center; }
    .profiles-compact { flex-direction: column; }
    .modules-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .header-section h1 { font-size: 22px; }
    .modules-grid { grid-template-columns: 1fr; }
    .stat-item { min-width: 70px; padding: 10px 12px; }
    .stat-number { font-size: 20px; }
}
/* 新增模块颜色 */
.color-9 i { color: #06b6d4; }
.color-9:hover { background: rgba(6, 182, 212, 0.08); }

.color-10 i { color: #84cc16; }
.color-10:hover { background: rgba(132, 204, 22, 0.08); }

.color-11 i { color: #d946ef; }
.color-11:hover { background: rgba(217, 70, 239, 0.08); }

.color-12 i { color: #94a3b8; }
.color-12:hover { background: rgba(148, 163, 184, 0.08); }

/* 网格调整为4列（12个模块=3行） */
.modules-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .modules-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .modules-grid { grid-template-columns: 1fr; }
}
