/* 网站账号资料管理系统 - 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #333; min-height: 100vh; }
a { color: #1890ff; text-decoration: none; }
a:hover { color: #40a9ff; }

/* 顶部导航 */
.navbar { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.navbar h1 { font-size: 18px; font-weight: 600; }
.navbar .nav-links { display: flex; gap: 20px; }
.navbar .nav-links a { color: rgba(255,255,255,.8); font-size: 14px; padding: 6px 12px; border-radius: 4px; transition: all .2s; }
.navbar .nav-links a:hover, .navbar .nav-links a.active { color: #fff; background: rgba(255,255,255,.12); }
.navbar .nav-links a.nav-locked { position: relative; }
.navbar .nav-links a.nav-locked::after { content: '🔒'; font-size: 10px; position: absolute; top: -2px; right: -4px; }

/* 容器 */
.container { max-width: 1200px; margin: 24px auto; padding: 0 24px; }

/* 卡片 */
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 24px; margin-bottom: 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.card-header h2 { font-size: 18px; font-weight: 600; color: #1a1a2e; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: all .2s; font-weight: 500; }
.btn-primary { background: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #73d13d; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #ff7875; }
.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #ffc53d; }
.btn-info { background: #1890ff; color: #fff; }
.btn-info:hover { background: #40a9ff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-outline { background: transparent; border: 1px solid #d9d9d9; color: #666; }
.btn-outline:hover { border-color: #1890ff; color: #1890ff; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px; }
.form-control { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; transition: border-color .2s; outline: none; }
.form-control:focus { border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.15); }
textarea.form-control { resize: vertical; min-height: 60px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
table th { background: #fafafa; font-weight: 600; color: #555; font-size: 13px; white-space: nowrap; }
table tr:hover { background: #f5f7fa; }

/* 评级条 */
.rating-bar { display: inline-flex; align-items: center; gap: 8px; }
.rating-bar .bar { width: 100px; height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.rating-bar .bar-fill { height: 100%; border-radius: 4px; transition: width .3s; }
.rating-bar .score { font-weight: 600; font-size: 14px; min-width: 32px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: #e6f7ff; color: #1890ff; margin: 2px; transition: background .15s; }
.tag[onclick]:hover { background: #bae7ff; cursor: pointer; }
.tag-green { background: #f6ffed; color: #52c41a; }
.tag-orange { background: #fff7e6; color: #fa8c16; }
.tag-red { background: #fff2f2; color: #ff4d4f; }

/* 模态框 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; display: none; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 90%; max-width: 600px; max-height: 85vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.modal-header { padding: 20px 24px 16px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; padding: 0 4px; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 10px; }

/* 动态参数行 */
.param-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.param-row .form-control { flex: 1; }
.param-row .param-name { flex: 3; }
.param-row .param-value { flex: 7; }
.param-row .btn-remove { flex-shrink: 0; width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 18px; }

/* 空状态 */
.empty-state { text-align: center; padding: 40px 20px; color: #999; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* 提示消息 */
.toast { position: fixed; top: 20px; right: 20px; z-index: 2000; padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 14px; opacity: 0; transform: translateX(100%); transition: all .3s; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { background: #52c41a; }
.toast-error { background: #ff4d4f; }

/* 网站卡片网格 */
.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }
.site-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 20px; transition: all .2s; cursor: pointer; border: 2px solid transparent; }
.site-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); border-color: #1890ff; }
.site-card .site-name { font-size: 18px; font-weight: 600; color: #1a1a2e; margin-bottom: 12px; }
.site-card .site-info { display: flex; gap: 16px; margin-bottom: 12px; font-size: 13px; color: #888; }
.site-card .site-actions { display: flex; gap: 8px; margin-top: 12px; }

/* 详情页区块 */
.section { margin-bottom: 24px; }
.section-title { font-size: 15px; font-weight: 600; color: #1a1a2e; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; display: inline-block; width: 4px; height: 16px; background: #1890ff; border-radius: 2px; }

/* 返回链接 */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #666; margin-bottom: 16px; }
.back-link:hover { color: #1890ff; }

/* 视图切换按钮 */
.view-btn { min-width: 34px; text-align: center; font-size: 16px; line-height: 1; }
.view-btn.active { background: #1890ff; color: #fff; border-color: #1890ff; }

/* 列表行点击效果 */
#sitesListBody tr { transition: background .15s; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 22px; transition: .3s; }
.slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.switch input:checked + .slider { background: #52c41a; }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* 响应式 */
@media (max-width: 768px) {
    .sites-grid { grid-template-columns: 1fr; }
    .container { padding: 0 12px; }
    .card { padding: 16px; }
}
