/* GEO优化平台 - 管理后台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: #f0f2f5; color: #333; }

.app { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: 240px; background: #1a1a2e; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
.sidebar-logo { padding: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.logo-icon { font-size: 24px; }
.logo-text { font-weight: 700; font-size: 16px; }

.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; transition: all 0.2s; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: #2d2d4e; color: #fff; border-right: 3px solid #6c63ff; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-label { white-space: nowrap; }

.sidebar-footer { padding: 15px 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.ai-platforms { display: flex; gap: 10px; font-size: 20px; }
.ai-platforms span { cursor: help; }

/* 主内容 */
.main-content { flex: 1; margin-left: 240px; }
.top-bar { background: #fff; padding: 16px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e8e8e8; position: sticky; top: 0; z-index: 50; }
.page-title { font-size: 18px; font-weight: 600; }
.top-bar-right { display: flex; align-items: center; gap: 15px; }
.target-site { font-size: 13px; color: #666; }
.target-site strong { color: #6c63ff; }

.content-area { padding: 25px 30px; }

/* 仪表盘 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-card .stat-icon { font-size: 28px; margin-bottom: 10px; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: #1a1a2e; }
.stat-card .stat-label { font-size: 13px; color: #888; margin-top: 4px; }
.stat-card.blue { border-left: 4px solid #6c63ff; }
.stat-card.green { border-left: 4px solid #00c48c; }
.stat-card.orange { border-left: 4px solid #ff9f43; }
.stat-card.red { border-left: 4px solid #ee5a6f; }

/* 卡片 */
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 20px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.table th { background: #f8f9fa; font-weight: 600; color: #555; }
.table tr:hover { background: #fafbfc; }

/* 标签 */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-green { background: #e6f9f0; color: #00a86b; }
.badge-red { background: #fce8ea; color: #d63031; }
.badge-yellow { background: #fff8e6; color: #e67e22; }
.badge-blue { background: #eef0ff; color: #6c63ff; }
.badge-gray { background: #f0f0f0; color: #888; }

/* 按钮 */
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: #6c63ff; color: #fff; }
.btn-primary:hover { background: #5a52d5; }
.btn-success { background: #00c48c; color: #fff; }
.btn-success:hover { background: #00a86b; }
.btn-outline { background: transparent; border: 1px solid #ddd; color: #555; }
.btn-outline:hover { border-color: #6c63ff; color: #6c63ff; }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* 表单 */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px; }
.form-input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; transition: border-color 0.2s; }
.form-input:focus { outline: none; border-color: #6c63ff; box-shadow: 0 0 0 3px rgba(108,99,255,0.1); }
textarea.form-input { min-height: 100px; resize: vertical; }
select.form-input { cursor: pointer; }

/* 评分环 */
.score-ring { position: relative; width: 120px; height: 120px; margin: 0 auto 15px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 28px; font-weight: 700; }
.score-ring .score-label { position: absolute; top: 70%; left: 50%; transform: translateX(-50%); font-size: 11px; color: #888; }

/* 进度条 */
.progress-bar { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.progress-bar .progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.progress-fill.green { background: #00c48c; }
.progress-fill.yellow { background: #ff9f43; }
.progress-fill.red { background: #ee5a6f; }

/* 代码块 */
.code-block { background: #1a1a2e; color: #e0e0e0; padding: 20px; border-radius: 8px; font-family: 'Fira Code', monospace; font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 15px 0; position: relative; }
.code-block .copy-btn { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.1); border: none; color: #fff; padding: 5px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.code-block .copy-btn:hover { background: rgba(255,255,255,0.2); }

/* 自媒体矩阵 */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; }
.platform-card { background: #fff; border: 2px solid #f0f0f0; border-radius: 12px; padding: 20px; cursor: pointer; transition: all 0.2s; }
.platform-card:hover { border-color: #6c63ff; transform: translateY(-2px); }
.platform-card.active { border-color: #6c63ff; background: #fafbff; }
.platform-card .platform-icon { font-size: 32px; margin-bottom: 10px; }
.platform-card .platform-name { font-weight: 600; font-size: 15px; }
.platform-card .platform-type { font-size: 12px; color: #888; margin-top: 4px; }

/* 提示 */
.alert { padding: 12px 18px; border-radius: 8px; font-size: 13px; margin-bottom: 15px; }
.alert-info { background: #eef0ff; color: #6c63ff; border-left: 4px solid #6c63ff; }
.alert-success { background: #e6f9f0; color: #00a86b; border-left: 4px solid #00c48c; }
.alert-warning { background: #fff8e6; color: #e67e22; border-left: 4px solid #ff9f43; }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* 动画 */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.card, .stat-card { animation: fadeIn 0.3s ease; }

/* 移动端菜单按钮 */
.mobile-menu-btn { display: none; position: fixed; top: 12px; left: 12px; z-index: 200; background: #1a1a2e; color: #fff; border: none; font-size: 22px; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; }

/* 响应式 */
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
    .sidebar { width: 240px; transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .sidebar.open ~ .mobile-overlay { display: block; }
    .main-content { margin-left: 0; }
    .top-bar { padding: 16px 16px 16px 56px; }
    .content-area { padding: 15px 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .table { font-size: 12px; }
    .table th, .table td { padding: 8px 10px; }
}
