/* ============================================
   JEJEDance - 青春活力 极简风格
   ============================================ */

:root {
    --primary: #FF6B6B;
    --primary-dark: #E55A5A;
    --primary-light: #FFE0E0;
    --accent: #FFA726;
    --accent-light: #FFF3E0;
    --bg: #FAFAFA;
    --white: #FFFFFF;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #EEEEEE;
    --radius: 12px;
    --shadow: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.10);
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --header-height: 64px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Header ========== */
.site-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 20px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.main-nav a.active {
    background: var(--primary);
    color: var(--white);
}

/* 移动端菜单 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--text);
    padding: 4px 8px;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

/* ========== Hero ========== */
.hero {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF8F0 50%, #FFF0F6 100%);
    padding: 80px 0 60px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,107,107,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,167,38,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    position: relative;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #FF8E8E);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(255,107,107,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,107,107,0.4);
    color: var(--white);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* ========== Section ========== */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-light);
    font-size: 16px;
}

/* ========== Course Cards ========== */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.course-card-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.course-card-body {
    padding: 20px;
}

.course-card-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.course-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.course-card h3 a {
    color: var(--text);
}

.course-card h3 a:hover { color: var(--primary); }

.course-card-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.course-card-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.course-card-price .original {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 400;
}

.course-card-sales {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== Article Cards ========== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.article-card-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.article-card-body {
    padding: 20px;
}

.article-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--primary); }

.article-card-summary {
    color: var(--text-light);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== Course Detail ========== */
.course-detail {
    padding: 40px 0;
}

.course-detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
}

.course-detail-main {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.course-detail-main h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.course-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.course-gallery img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.course-content {
    line-height: 1.8;
}

.course-content img { max-width: 100%; border-radius: 8px; }

/* 购买侧边栏 */
.course-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    align-self: start;
}

.course-buy-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
}

.course-buy-cover {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 16px;
}

.course-buy-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.course-buy-original {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 20px;
}

.course-buy-card .btn {
    width: 100%;
    margin-bottom: 10px;
    justify-content: center;
}

.btn-cart {
    background: var(--accent-light);
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-cart:hover {
    background: var(--accent);
    color: var(--white);
}

/* 隐藏内容（购买后解锁） */
.locked-content {
    background: #FFF9F0;
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    margin: 24px 0;
}

.locked-content .lock-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.locked-content p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.unlocked-content {
    background: #F0FFF4;
    border: 2px solid #4CAF50;
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
    line-height: 1.8;
}

/* ========== Article Detail ========== */
.article-detail {
    padding: 40px 0;
}

.article-detail-inner {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.article-detail-inner h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.article-detail-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.article-detail-meta span { margin-right: 16px; }

.article-content {
    line-height: 1.9;
    font-size: 16px;
}

.article-content img { max-width: 100%; border-radius: 8px; margin: 16px 0; }
.article-content h2 { font-size: 22px; margin: 28px 0 12px; }
.article-content h3 { font-size: 18px; margin: 20px 0 10px; }
.article-content p { margin-bottom: 16px; }
.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    background: var(--primary-light);
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
}

/* ========== Auth Pages ========== */
.auth-page {
    min-height: calc(100vh - var(--header-height) - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-error {
    background: #FFF0F0;
    color: #D32F2F;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.form-success {
    background: #F0FFF4;
    color: #2E7D32;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* ========== User Center ========== */
.user-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    padding: 40px 0;
}

.user-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.user-sidebar .user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    background: var(--primary-light);
}

.user-sidebar .user-name {
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
}

.user-nav a {
    display: block;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    transition: var(--transition);
    margin-bottom: 4px;
}

.user-nav a:hover,
.user-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

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

.user-content h2 {
    font-size: 22px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

/* 已购课程列表 */
.purchased-list { display: flex; flex-direction: column; gap: 12px; }

.purchased-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.purchased-item:hover { border-color: var(--primary); }

.purchased-item img {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.purchased-item-info { flex: 1; }

.purchased-item-info h4 { font-size: 16px; margin-bottom: 4px; }
.purchased-item-info p { color: var(--text-muted); font-size: 13px; }

/* 推荐奖励统计 */
.referral-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-light), #FFF);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== Footer ========== */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 50px 0 0;
    margin-top: 40px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.footer-brand p { color: var(--text-muted); font-size: 14px; }

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

.footer-links a {
    display: block;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-contact p { font-size: 14px; color: var(--text-light); margin-bottom: 6px; }

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== WeChat Float ========== */
.wechat-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #07C160, #06AD56);
    color: white;
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(7,193,96,0.35);
    z-index: 999;
    transition: var(--transition);
}

.wechat-float:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(7,193,96,0.45); }

.wechat-icon { font-size: 22px; }

.wechat-label { font-size: 14px; font-weight: 600; }

.wechat-popup {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 1000;
    width: 260px;
    text-align: center;
}

.wechat-popup.show { display: block; }

.wechat-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.wechat-popup h4 { font-size: 16px; margin-bottom: 12px; }

.wechat-qr-placeholder {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wechat-qr-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}

.pagination a:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pagination .current { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ========== About Page ========== */
.about-page { padding: 60px 0; }

.about-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #FFF5F5, #FFF0F6);
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.about-hero img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.about-hero h1 { font-size: 28px; margin-bottom: 8px; }
.about-hero p { color: var(--text-light); max-width: 600px; margin: 0 auto; }

.about-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    line-height: 1.9;
}

/* ========== Filter Bar ========== */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.filter-bar a {
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-bar a:hover,
.filter-bar a.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); }

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 60px; margin-bottom: 16px; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .main-nav.show { display: flex; }

    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }

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

    .user-layout { grid-template-columns: 1fr; }

    .footer-inner { grid-template-columns: 1fr; gap: 24px; }

    .referral-stats { grid-template-columns: 1fr; }

    .course-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .article-grid { grid-template-columns: 1fr; }

    .course-card-cover { height: 140px; }
    .article-card-cover { height: 160px; }

    .section { padding: 40px 0; }
    .section-header h2 { font-size: 24px; }

    .auth-card { padding: 30px 24px; }

    .course-detail-main,
    .article-detail-inner { padding: 20px; }

    .wechat-float { bottom: 20px; right: 16px; padding: 8px 14px; }
    .wechat-label { display: none; }
}

@media (max-width: 480px) {
    .course-grid { grid-template-columns: 1fr; }
    .course-card-cover { height: 200px; }
}

/* ========== Admin ========== */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: #1A1A2E;
    color: white;
    padding: 24px 0;
}

.admin-sidebar .admin-logo {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}

.admin-sidebar .admin-logo h2 {
    color: white;
    font-size: 18px;
}

.admin-sidebar a {
    display: block;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.05);
    color: white;
    border-left-color: var(--primary);
}

.admin-main {
    background: #F5F6FA;
    padding: 30px;
}

.admin-main h2 {
    font-size: 22px;
    margin-bottom: 24px;
}

.admin-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.admin-stat {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.admin-stat .stat-val { font-size: 28px; font-weight: 800; color: var(--primary); }
.admin-stat .stat-lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    background: #F8F9FA;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.admin-table tr:hover td { background: #FAFBFC; }

.admin-table img {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.admin-table .actions { display: flex; gap: 6px; }

.admin-table .actions a,
.admin-table .actions button {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    border: none;
    cursor: pointer;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-warning { background: #FFF3E0; color: #E65100; }
.badge-danger { background: #FFEBEE; color: #C62828; }
.badge-info { background: #E3F2FD; color: #1565C0; }

@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* ========== Editor Styles ========== */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
    background: #F8F9FA;
    border: 2px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input[type="color"] {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.editor-toolbar button:hover { background: var(--primary-light); border-color: var(--primary); }
.editor-toolbar select { min-width: 80px; }
.editor-toolbar input[type="color"] { width: 36px; height: 32px; padding: 2px; }

.editor-content {
    min-height: 400px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 0 0 10px 10px;
    outline: none;
    font-size: 15px;
    line-height: 1.8;
    overflow-y: auto;
}

.editor-content:focus { border-color: var(--primary); }

.editor-content img { max-width: 100%; border-radius: 8px; }
.editor-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 8px 16px;
    background: var(--primary-light);
    border-radius: 0 8px 8px 0;
    margin: 12px 0;
}

/* 图片插入弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal-box {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-box h3 { margin-bottom: 20px; }

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 3000;
    animation: toastIn 0.3s ease;
}

.toast-success { background: #4CAF50; }
.toast-error { background: #F44336; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
