/* 全局样式 - 玻璃拟态风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: #f1f5f9;
    line-height: 1.5;
    font-size: 14px;
}

/* 玻璃卡片 */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题 */
h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* 按钮 */
.btn {
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* 输入框 */
.input {
    height: 44px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.2s;
}

.input:focus {
    outline: none;
    border-color: #3b82f6;
}

.input::placeholder {
    color: #94a3b8;
}

.input.error {
    border-color: #ef4444;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 14px;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    margin-bottom: 30px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 600;
    color: #f1f5f9;
    text-decoration: none;
}

/* “← 返回”链接：字号和颜色与“首页”链接一致 */
.navbar-back {
    font-size: 14px;
    font-weight: 400;
    color: #94a3b8;
    transition: color 0.2s;
}

.navbar-back:hover {
    color: #f1f5f9;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.navbar-menu a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.navbar-menu a:hover {
    color: #f1f5f9;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 练习卡片 */
.practice-card {
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.practice-card:hover {
    transform: translateY(-5px);
}

.practice-card .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.practice-card .title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.practice-card .subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 20px;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    transition: width 0.1s linear;
}

/* 开关 */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle.active {
    background: #3b82f6;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle.active::after {
    transform: translateX(20px);
}

/* 提示文字 */
.text-muted {
    color: #94a3b8;
    font-size: 12px;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 链接 */
a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table th {
    color: #94a3b8;
    font-weight: 600;
    font-size: 12px;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 响应式 */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
}
