:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --secondary: #FF6584;
    --accent: #00C9A7;
    --bg: #F8F9FE;
    --bg-light: #FFFFFF;
    --text: #2D3436;
    --text-light: #636E72;
    --shadow: 0 10px 30px rgba(108, 99, 255, 0.1);
    --radius: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

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

/* 导航栏 */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.btn-admin {
    background: var(--primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.btn-admin:hover {
    background: var(--primary-dark);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 3px 0;
    border-radius: 10px;
    transition: var(--transition);
}

/* 英雄区域 */
.hero {
    padding: 140px 0 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #FFD700;
    position: relative;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid #ddd;
}

.btn-sm:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.hero-image {
    flex: 1;
    position: relative;
    height: 300px;
}

.floating-card {
    position: absolute;
    background: white;
    color: var(--text);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: float 6s ease-in-out infinite;
}

.card1 { top: 20%; left: 10%; animation-delay: 0s; }
.card2 { top: 50%; left: 50%; animation-delay: 2s; }
.card3 { top: 30%; left: 70%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* 通用section样式 */
.section {
    padding: 80px 0;
}

.bg-light {
    background: var(--bg-light);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-desc {
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 16px;
}

/* 词汇闪卡 */
.flashcard-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.select-input {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.select-input:focus {
    border-color: var(--primary);
}

.flashcard-container {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.flashcard {
    width: 350px;
    height: 220px;
    cursor: pointer;
    position: relative;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-shadow: var(--shadow);
}

.flashcard-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.flashcard-back {
    background: white;
    color: var(--text);
    transform: rotateY(180deg);
    border: 2px solid var(--primary);
}

.flashcard-front p, .flashcard-back p {
    font-size: 28px;
    font-weight: 700;
}

.card-group {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.8;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

/* 语法练习 */
.grammar-container {
    max-width: 600px;
    margin: 0 auto;
}

.grammar-question {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.option-label:hover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.05);
}

.option-label input[type="radio"] {
    accent-color: var(--primary);
}

.feedback {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
}

.grammar-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

/* 听力训练 */
.listening-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.listening-question {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.listening-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

/* 口语跟读 */
.speaking-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.speaking-text {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.sentence-display {
    font-size: 22px;
    font-weight: 600;
    padding: 20px;
    background: var(--bg);
    border-radius: 12px;
    margin-bottom: 25px;
}

.speaking-result {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg);
    border-radius: 12px;
}

.speaking-result p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 阅读理解 */
.reading-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.reading-container {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.reading-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary);
}

.reading-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.reading-question {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg);
    border-radius: 8px;
}

.reading-question p {
    font-weight: 600;
    margin-bottom: 10px;
}

/* 写作批改 */
.writing-container {
    max-width: 700px;
    margin: 0 auto;
}

#writingInput {
    width: 100%;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
    outline: none;
}

#writingInput:focus {
    border-color: var(--primary);
}

.writing-result {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.writing-result h4 {
    color: var(--primary);
    margin-bottom: 15px;
}

/* 学习日历 */
.calendar-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.calendar-grid .day-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    padding: 8px;
}

.calendar-grid .day {
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: default;
}

.calendar-grid .day.studied {
    background: var(--accent);
    color: white;
}

.calendar-grid .day.today {
    border: 2px solid var(--primary);
    font-weight: 700;
}

.calendar-grid .day.empty {
    background: transparent;
}

.calendar-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.calendar-stats span {
    font-weight: 700;
    color: var(--primary);
}

/* 页脚 */
.footer {
    background: var(--text);
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        height: 200px;
    }

    .floating-card {
        font-size: 14px;
        padding: 10px 18px;
    }

    .section-title {
        font-size: 26px;
    }

    .flashcard {
        width: 280px;
        height: 180px;
    }

    .flashcard-front p, .flashcard-back p {
        font-size: 22px;
    }

    .reading-controls {
        flex-direction: column;
    }
}