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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.1);
}

.header-text {
    text-align: left;
}

.header-text h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-text p {
    margin: 0;
    font-size: 1.1rem;
    color: #718096;
}

.header h1 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.1rem;
    color: #718096;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(102, 126, 234, 0.3);
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    color: #2d3748;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(102, 126, 234, 0.6);
    color: #1a202c;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.nav-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-btn.active:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

/* 播客导航按钮特殊样式 */
.podcast-nav-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border-color: rgba(233, 30, 99, 0.3);
}

.podcast-nav-btn:hover {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    border-color: rgba(233, 30, 99, 0.6);
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.podcast-nav-btn:focus {
    border-color: rgba(233, 30, 99, 0.5);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4), 0 0 0 3px rgba(233, 30, 99, 0.3);
}

/* 添加按钮图标样式 */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.nav-btn:active::after {
    width: 100%;
    height: 100%;
}

/* 内容区域 */
.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 学习卡片 */
.learning-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.learning-card h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* 首页特色卡片 */
.welcome-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-card h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2rem;
}

.welcome-card p {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 30px;
    line-height: 1.6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    user-select: none;
    outline: none;
}

.feature-card::after {
    content: '点击学习';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.feature-card:hover::after,
.feature-card:focus::after {
    opacity: 1;
}

.feature-card:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.feature-card:active {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

/* 播客卡片特殊样式 */
.podcast-card {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    position: relative;
}

.podcast-card::after {
    content: '外部链接';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.podcast-card:hover {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(233, 30, 99, 0.4);
}

.podcast-card:hover::after {
    opacity: 1;
    content: '点击访问';
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 1rem;
    opacity: 0.9;
}

/* 邮政编码样式 */
.postal-explanation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.explanation-text h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.explanation-text ul {
    list-style: none;
    padding: 0;
}

.explanation-text li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.explanation-text li:last-child {
    border-bottom: none;
}

.postal-example h3 {
    color: #4a5568;
    margin-bottom: 20px;
}

.postal-visual {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.digit-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.digit {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.label {
    font-size: 0.9rem;
    color: #4a5568;
    text-align: center;
    font-weight: 500;
}

/* 身份证样式 */
.id-structure {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.id-part {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.part-label {
    display: block;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 5px;
}

.part-digits {
    color: #667eea;
    font-weight: bold;
}

.id-breakdown {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.breakdown-part {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* 交互游戏样式 */
.interactive-game {
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
}

.interactive-game h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.game-container p {
    color: #718096;
    margin-bottom: 15px;
}

.postal-game, .id-game, .barcode-game, .qrcode-game {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    min-width: 200px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 游戏统计 */
.game-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.stat {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 游戏区域 */
.game-area {
    background: rgba(255, 255, 255, 0.95);
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.game-question {
    margin-bottom: 30px;
}

.game-question h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.game-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.option-btn {
    background: white;
    border: 3px solid #e2e8f0;
    padding: 18px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.option-btn.correct {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

.option-btn.incorrect {
    background: #f56565;
    color: white;
    border-color: #f56565;
}

.game-feedback {
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
}

.game-feedback.correct {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.game-feedback.incorrect {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.next-btn {
    background: linear-gradient(45deg, #48bb78, #38a169);
    margin-top: 20px;
}

/* 条形码样式 */
.barcode-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.barcode-type {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.barcode-type h4 {
    color: #4a5568;
    margin-bottom: 10px;
}

.barcode-visual {
    height: 60px;
    background: repeating-linear-gradient(
        90deg,
        #000 0px,
        #000 2px,
        transparent 2px,
        transparent 4px
    );
    margin-top: 15px;
    border-radius: 5px;
}

/* 学号编码样式 */
.studentid-structure {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.structure-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.structure-label {
    display: block;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 5px;
}

.structure-digits {
    color: #667eea;
    font-weight: bold;
}

.example-table {
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    margin-top: 15px;
}

.example-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.example-row:last-child {
    border-bottom: none;
}

.example-name {
    font-weight: bold;
    color: #4a5568;
    min-width: 80px;
}

.example-info {
    color: #718096;
    flex: 1;
    margin: 0 15px;
}

.example-id {
    color: #667eea;
    font-weight: bold;
    min-width: 120px;
}

.studentid-game {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-weight: bold;
    color: #4a5568;
}

.input-group input,
.input-group select {
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.studentid-result {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

/* 结果样式 */
.postal-result, .id-result, .barcode-result, .qrcode-result, .studentid-result {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

/* 底部样式 */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-logo {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-image {
        width: 50px;
        height: 50px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .postal-explanation {
        grid-template-columns: 1fr;
    }
    
    .postal-visual {
        flex-direction: column;
        gap: 15px;
    }
    
    .id-structure {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
    }
    
    .game-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        gap: 10px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.feature-card:hover {
    animation: pulse 0.6s ease-in-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 