/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 认证页面样式 */
.auth-box {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-box h1 {
    color: #3498db;
    margin-bottom: 20px;
    text-align: center;
}

.auth-box h2 {
    margin-bottom: 20px;
    text-align: center;
}

.auth-box p {
    text-align: center;
    margin-top: 20px;
}

.error-message {
    color: #e74c3c;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
}

/* 头部样式 */
header {
    background-color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #3498db;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* 主链接列表 */
.mainlink-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mainlink-info h3 {
    margin-bottom: 5px;
}

.mainlink-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 3px;
}

.mainlink-actions {
    display: flex;
    gap: 5px;
}

/* 目标链接表格 */
.targets-table {
    width: 100%;
    border-collapse: collapse;
}

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

.targets-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
}

.slug-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slug-preview {
    color: #666;
    font-size: 13px;
    word-break: break-all;
}

/* 统计样式 */
.stats-chart {
    margin-top: 15px;
}

.stats-bar {
    margin-bottom: 10px;
}

.stats-bar-label {
    margin-bottom: 5px;
    font-weight: 500;
}

.stats-bar-fill {
    height: 20px;
    background-color: #3498db;
    border-radius: 10px;
    transition: width 0.5s;
}

.stats-bar-value {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

/* 空状态 */
.empty-state {
    padding: 30px;
    text-align: center;
    color: #999;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .mainlink-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .mainlink-actions {
        margin-top: 10px;
    }
    
    .targets-table th.count-mode-col,
    .targets-table td.count-mode-col {
        display: none;
    }
}