/* 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航栏 */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: 800; background: linear-gradient(45deg, #6366f1, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; list-style: none; gap: 25px; }
.nav-links a { text-decoration: none; color: #555; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: #6366f1; }
.user-area { display: flex; align-items: center; gap: 15px; }

/* 按钮 */
.btn {
    display: inline-block; padding: 10px 24px; background: #6366f1; color: white; text-decoration: none;
    border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.btn:hover { background: #4f46e5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.4); }
.btn-sm { padding: 6px 16px; font-size: 0.9rem; }
.btn-secondary { background: #8b5cf6; }
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }

/* 首页英雄区 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 15px; }
.hero p { font-size: 1.2rem; opacity: 0.9; }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 50px; }
.stat-card { background: rgba(255,255,255,0.15); padding: 25px 40px; border-radius: 16px; backdrop-filter: blur(10px); }
.stat-number { display: block; font-size: 2.5rem; font-weight: 800; }
.stat-label { font-size: 1rem; opacity: 0.9; }

/* 功能卡片 */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; margin: 50px 0; }
.feature-card {
    background: white; padding: 30px; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    cursor: pointer; transition: all 0.3s; text-align: center;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(99,102,241,0.2); }
.feature-icon { font-size: 2.5rem; margin-bottom: 15px; }
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: #666; }

/* 学习进度 */
.progress-section { background: white; border-radius: 16px; padding: 30px; margin: 40px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.progress-chart { margin: 20px 0; text-align: center; }
.progress-stats { display: flex; justify-content: space-around; padding: 20px 0; }

/* 词汇卡片 */
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin: 30px 0; }
.vocab-card {
    height: 160px; perspective: 1000px; cursor: pointer;
}
.vocab-card .card-front, .vocab-card .card-back {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 20px; transition: 0.6s; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.vocab-card .card-front { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; }
.vocab-card .card-back { background: white; transform: rotateY(180deg); border: 2px solid #6366f1; }
.vocab-card.flipped .card-front { transform: rotateY(180deg); }
.vocab-card.flipped .card-back { transform: rotateY(0deg); }
.vocab-card h3 { font-size: 1.4rem; }
.vocab-controls { display: flex; gap: 15px; margin: 20px 0; }

/* 语法 */
.grammar-item { background: white; border-radius: 12px; padding: 25px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.quiz-box { margin-top: 15px; padding: 15px; background: #f8f9ff; border-radius: 8px; }
.quiz-option { display: block; margin: 8px 0; cursor: pointer; }
.result { margin-left: 15px; font-weight: 600; }

/* 听力 */
.listening-card { background: white; border-radius: 12px; padding: 25px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.listening-card audio { width: 100%; margin: 15px 0; }
.listening-questions { margin-top: 15px; }

/* 阅读 */
.filter-bar { display: flex; gap: 10px; margin: 20px 0; }
.filter-btn.active { background: #6366f1; color: white; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.article-card { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.level-badge { display: inline-block; padding: 4px 12px; background: #e0e7ff; border-radius: 20px; font-size: 0.8rem; font-weight: 600; color: #6366f1; margin-bottom: 10px; }

/* 写作 */
.writing-area { background: white; border-radius: 12px; padding: 30px; margin: 30px 0; }
.writing-area textarea { width: 100%; padding: 15px; border: 2px solid #e0e7ff; border-radius: 8px; font-size: 1rem; font-family: inherit; resize: vertical; }
.writing-area textarea:focus { outline: none; border-color: #6366f1; }
.feedback-box { background: #f0fdf4; border: 2px solid #86efac; border-radius: 8px; padding: 20px; margin-top: 20px; }
.feedback-box pre { white-space: pre-wrap; font-family: inherit; }

/* 管理后台 */
.admin-page { background: #f0f2f5; }
.admin-login { display: flex; justify-content: center; align-items: center; height: 100vh; }
.login-form { background: white; padding: 40px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); text-align: center; }
.login-form input { display: block; width: 100%; margin: 20px 0; padding: 12px; border: 2px solid #e0e7ff; border-radius: 8px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; padding: 40px 0; }
.admin-card { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.inline-form input, .inline-form textarea, .inline-form select { padding: 8px 12px; border: 2px solid #e0e7ff; border-radius: 6px; flex: 1; min-width: 120px; }
.item-list { list-style: none; }
.item-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }

/* 页脚 */
footer { text-align: center; padding: 30px 0; color: #666; margin-top: 50px; border-top: 1px solid #e0e7ff; }

/* 响应式 */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { flex-direction: column; align-items: center; }
}