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

body {
    font-family: 'Inter', sans-serif;
    color: #1a1a2e;
    background: #f8f9fa;
    line-height: 1.6;
}

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

/* Header & Nav */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover, .nav-menu a.active {
    color: #fff;
    border-bottom-color: #ffd700;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    background: #ffd700;
    color: #1a1a2e;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: #667eea;
    padding: 0.8rem 2rem;
    border: 2px solid #667eea;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #667eea;
    color: #fff;
}

/* Sections */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin: 3rem 0;
    color: #1a1a2e;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #667eea;
    background: #fff;
    color: #667eea;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: #667eea;
    color: #fff;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    padding: 0.6rem 1rem;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    min-width: 200px;
}

.search-bar input:focus {
    border-color: #667eea;
}

.search-bar button {
    padding: 0.6rem 1.2rem;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #5a6fd6;
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.course-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
}

.difficulty {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty.初级 { background: #e8f5e9; color: #2e7d32; }
.difficulty.中级 { background: #fff3e0; color: #e65100; }
.difficulty.高级 { background: #fce4ec; color: #c62828; }

.favorite-btn {
    background: rgba(255,255,255,0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.favorite-btn.favorited {
    background: #ffd700;
    color: #fff;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #1a1a2e;
}

.card-body p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category {
    background: #f0f0f5;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 600;
}

.btn-detail {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.btn-detail:hover {
    color: #764ba2;
}

/* Teacher Preview */
.teacher-preview {
    background: #fff;
    padding: 4rem 0;
}

.teacher-card {
    display: flex;
    gap: 3rem;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.teacher-avatar img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.teacher-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.teacher-title {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1rem;
}

.teacher-desc {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffd700;
}

/* Admin */
.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: #fff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-container h2 {
    margin-bottom: 2rem;
    color: #1a1a2e;
}

.login-container input {
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.login-container button {
    width: 100%;
    padding: 1rem;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s;
}

.login-container button:hover {
    background: #5a6fd6;
}

.login-container a {
    display: block;
    margin-top: 1.5rem;
    color: #667eea;
    text-decoration: none;
}

.admin-page {
    background: #f8f9fa;
}

.admin-header {
    background: #1a1a2e;
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header a {
    color: #ffd700;
    text-decoration: none;
    margin-left: 1rem;
}

.alert {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    text-align: center;
}

.admin-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.admin-section {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    color: #1a1a2e;
}

.admin-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-form input, .admin-form select, .admin-form textarea {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.admin-form textarea {
    min-height: 100px;
}

.admin-form button {
    padding: 0.8rem;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.admin-form button:hover {
    background: #5a6fd6;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.btn-delete {
    color: #c62828;
    text-decoration: none;
    font-weight: 600;
}

/* Course Detail Page */
.course-detail-page {
    padding: 3rem 0;
}

.detail-card {
    background: #fff;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
}

.detail-card h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.detail-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.detail-meta span {
    background: #f0f0f5;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.detail-outline {
    margin: 2rem 0;
    line-height: 1.8;
}

.detail-comments {
    margin-top: 2rem;
}

.comment-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.comment-item strong {
    color: #667eea;
}

.rating-stars {
    color: #ffd700;
    font-size: 1.2rem;
}

/* Favorites Page */
.favorites-page {
    padding: 3rem 0;
    min-height: 60vh;
}

/* Teacher Page */
.teacher-page {
    padding: 3rem 0;
}

.teacher-full {
    background: #fff;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 900px;
    margin: 0 auto;
}

.teacher-full h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.teacher-full .subtitle {
    color: #667eea;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.teacher-full .bio {
    line-height: 1.8;
    color: #555;
    margin-bottom: 2rem;
}

.teacher-full .qualifications {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 1rem 2rem;
        gap: 1rem;
    }

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

    .hero-content h1 {
        font-size: 2rem;
    }

    .teacher-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        flex: 1;
        min-width: 0;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .detail-card {
        padding: 1.5rem;
    }

    .detail-card h1 {
        font-size: 1.8rem;
    }
}