* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Microsoft Yahei", "PingFang SC", sans-serif; }
body { background: #f0f2eb; color: #333; line-height: 1.8; }
a { text-decoration: none; color: inherit; }

/* 头部导航 - MC绿色主题 */
.header { background: linear-gradient(135deg, #2d5016, #4CAF50); color: #fff; padding: 0; box-shadow: 0 2px 12px rgba(0,0,0,.2); position: sticky; top: 0; z-index: 100; }
.nav-wrap { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; flex-wrap: wrap; gap: 10px; }
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { height: 42px; border-radius: 50%; border: 2px solid #fff; }
.logo-text { font-size: 19px; font-weight: bold; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { color: #fff; padding: 8px 14px; border-radius: 6px; font-size: 15px; transition: background .2s; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.2); }

/* 横幅 - MC风格 */
.banner { min-height: 340px; background: linear-gradient(180deg, #87CEEB 0%, #87CEEB 60%, #4CAF50 60%, #2d5016 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 40px 20px; position: relative; overflow: hidden; }
.banner::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 8px; background: repeating-linear-gradient(90deg, #5D4037 0, #5D4037 20px, #6D4C41 20px, #6D4C41 40px); }
.banner .avatar { width: 100px; height: 100px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 4px 15px rgba(0,0,0,.3); margin-bottom: 16px; object-fit: cover; background: #4CAF50; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.banner h1 { font-size: 32px; margin-bottom: 8px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.banner p { font-size: 16px; opacity: .95; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.banner .skills { margin-top: 14px; font-size: 14px; background: rgba(0,0,0,.3); padding: 6px 16px; border-radius: 20px; }

/* 容器 */
.container { max-width: 1100px; margin: 36px auto; padding: 0 20px; }
.section-title { font-size: 22px; border-left: 5px solid #4CAF50; padding-left: 12px; margin-bottom: 20px; color: #2d5016; }

/* 卡片 */
.card { background: #fff; padding: 22px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.06); margin-bottom: 18px; transition: transform .2s, box-shadow .2s; border-top: 3px solid #4CAF50; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.card h3 { color: #2d5016; margin-bottom: 8px; }
.card .meta { color: #999; font-size: 13px; margin-bottom: 10px; }
.card .excerpt { color: #555; margin-bottom: 12px; }
.tag { display: inline-block; background: #E8F5E9; color: #2d5016; padding: 2px 10px; border-radius: 10px; font-size: 12px; margin-right: 6px; }

/* 按钮 */
.btn { display: inline-block; padding: 8px 20px; background: #4CAF50; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; transition: background .2s; }
.btn:hover { background: #388E3C; }
.btn-green { background: #4CAF50; }
.btn-red { background: #f44336; }
.btn-red:hover { background: #d32f2f; }
.btn-gray { background: #9e9e9e; }
.btn-gray:hover { background: #757575; }

/* 社交账号卡片 */
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.social-card { background: #fff; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.06); display: flex; align-items: center; gap: 14px; transition: transform .2s; }
.social-card:hover { transform: translateY(-3px); }
.social-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; flex-shrink: 0; }
.social-info h4 { font-size: 15px; color: #333; margin-bottom: 2px; }
.social-info p { font-size: 13px; color: #888; word-break: break-all; }
.social-info a { color: #4CAF50; }
.bg-douyin { background: #000; }
.bg-bilibili { background: #fb7299; }
.bg-xiaohongshu { background: #ff2442; }
.bg-wechat { background: #07c160; }
.bg-qq { background: #12b7f5; }
.bg-qqgroup { background: #72c6ff; }
.bg-email { background: #ff9800; }
.bg-github { background: #333; }

/* 文章详情 */
.article-detail { background: #fff; padding: 36px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.article-detail h1 { font-size: 26px; color: #2d5016; margin-bottom: 10px; }
.article-detail .meta { color: #999; padding-bottom: 14px; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.article-detail .content { font-size: 16px; line-height: 2; color: #333; }

/* 底部 */
.footer { background: #1a2e1a; color: #aaa; text-align: center; padding: 28px 20px; margin-top: 50px; }
.footer a { color: #81C784; }

/* 后台样式 */
.admin-body { background: #f0f2eb; }
.admin-header { background: #2d5016; color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.admin-header h2 { font-size: 17px; }
.admin-header a { color: #fff; margin-left: 16px; font-size: 14px; }
.admin-layout { display: flex; min-height: calc(100vh - 52px); }
.admin-sidebar { width: 190px; background: #2d5016; padding: 16px 0; }
.admin-sidebar a { display: block; padding: 12px 22px; color: #ccc; font-size: 14px; border-left: 3px solid transparent; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: #4CAF50; color: #fff; border-left-color: #fff; }
.admin-main { flex: 1; padding: 22px; }
.admin-card { background: #fff; border-radius: 8px; padding: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.admin-card h3 { margin-bottom: 14px; color: #2d5016; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #444; font-size: 14px; }
.form-group input[type=text], .form-group input[type=password], .form-group input[type=email], .form-group textarea, .form-group select {
    width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px;
}
.form-group input:focus, .form-group textarea:focus { border-color: #4CAF50; outline: none; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .hint { font-size: 12px; color: #999; margin-top: 4px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 11px; text-align: left; border-bottom: 1px solid #eee; }
table th { background: #f5f5f5; font-weight: bold; color: #444; }

/* 登录页 */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #2d5016, #4CAF50); }
.login-box { background: #fff; padding: 36px; border-radius: 12px; width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.login-box h2 { text-align: center; color: #2d5016; margin-bottom: 26px; }
.login-box .tip { color: #f44336; text-align: center; margin-bottom: 14px; font-size: 14px; }

/* 统计 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 18px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.stat-card .num { font-size: 28px; font-weight: bold; color: #4CAF50; }
.stat-card .label { color: #888; font-size: 13px; margin-top: 4px; }

.logo-preview { max-width: 180px; max-height: 70px; border: 1px solid #eee; border-radius: 6px; padding: 6px; margin-top: 8px; background: #fafafa; }
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-top: 8px; border: 2px solid #4CAF50; }

@media (max-width: 768px) {
    .nav-wrap { flex-direction: column; align-items: flex-start; }
    .nav { width: 100%; overflow-x: auto; }
    .banner h1 { font-size: 24px; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; display: flex; overflow-x: auto; padding: 0; }
    .admin-sidebar a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
}
