/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f9fc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

a {
    color: #2c73d2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    margin-bottom: 15px;
    color: #1a3c6e;
}

ul {
    list-style-type: none;
}

.button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #2980b9;
    text-decoration: none;
}

.button.primary {
    background-color: #2c73d2;
}

.button.primary:hover {
    background-color: #1c5eb3;
}

/* 头部样式 */
header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid #e1e5eb;
    padding-bottom: 20px;
}

header h1 {
    font-size: 2.2em;
    color: #2c73d2;
}

header p {
    margin-bottom: 20px;
    color: #666;
}

nav ul {
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    padding: 5px 10px;
    border-radius: 4px;
}

nav ul li a.active {
    background-color: #2c73d2;
    color: #fff;
}

/* 排序选项 */
.sort-options {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f0f2f5;
    border-radius: 4px;
}

.sort-options a {
    margin: 0 5px;
    padding: 5px;
}

.sort-options a.active {
    font-weight: bold;
    color: #1a3c6e;
}

/* 分类样式 */
.category {
    margin-bottom: 40px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category h2 {
    border-bottom: 2px solid #e1e5eb;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.link-item {
    padding: 15px;
    border: 1px solid #e1e5eb;
    border-radius: 6px;
    transition: box-shadow 0.3s, transform 0.3s;
}

.link-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.link-item a {
    display: block;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.link-url {
    display: block;
    color: #888;
    font-size: 0.9em;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #666;
    border-top: 1px solid #e1e5eb;
    padding-top: 8px;
}

.bottom-links {
    margin-top: 30px;
}

.bottom-links h3 {
    font-size: 1em;
    color: #888;
    margin-bottom: 15px;
}

.no-links {
    text-align: center;
    color: #888;
    padding: 20px;
}

/* 表单样式 */
.submit-form {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group .required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

.error-messages {
    background-color: #f2dede;
    color: #a94442;
    padding: 15px;
    border-radius: 3px;
    margin-bottom: 20px;
    border: 1px solid #ebccd1;
}

.error-messages ul {
    list-style-type: disc;
    margin-left: 20px;
}

.success-message {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 15px;
    border-radius: 3px;
    margin-bottom: 20px;
    border: 1px solid #d6e9c6;
}

.success-message h2 {
    color: #27ae60;
}

.code-box {
    background-color: #f8f9fa;
    border: 1px dashed #ddd;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    word-break: break-all;
}

.submit-guide {
    background-color: #0b1821;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.submit-guide ul {
    list-style-type: disc;
    margin-left: 20px;
}

.submit-guide li {
    margin-bottom: 10px;
}

/* 管理后台样式 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5eb;
}

.admin-table th {
    background-color: #f5f7fa;
    font-weight: bold;
}

.admin-table tr:hover {
    background-color: #f9fafc;
}

.actions {
    display: flex;
    gap: 8px;
}

.actions a {
    padding: 5px 8px;
    font-size: 0.85em;
    border-radius: 3px;
}

.actions a.edit {
    background-color: #3498db;
    color: #fff;
}

.actions a.delete {
    background-color: #e74c3c;
    color: #fff;
}

.actions a.approve {
    background-color: #2ecc71;
    color: #fff;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination a.active {
    background-color: #2c73d2;
    color: #fff;
    border-color: #2c73d2;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-card .number {
    font-size: 2em;
    font-weight: bold;
    color: #2c73d2;
    margin-bottom: 10px;
}

.stat-card .label {
    color: #666;
}

/* 登录页面样式 */
.login-form {
    max-width: 400px;
    margin: 50px auto;
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 25px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .links-container {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e1e5eb;
    color: #888;
}

/* 消息样式 */
.info-message {
    background-color: #d9edf7;
    color: #31708f;
    padding: 15px;
    border-radius: 3px;
    margin-bottom: 20px;
    border: 1px solid #bce8f1;
}

/* 管理后台工具样式 */
.admin-tools {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.admin-tools p {
    margin: 0;
    font-style: italic;
    color: #666;
}

.admin-tools .button {
    margin-left: 10px;
}

.low-visits-section {
    margin-top: 40px;
    border-top: 2px solid #e1e5eb;
    padding-top: 30px;
}

.low-visits-section h2 {
    color: #666;
}

.section-desc {
    color: #888;
    margin-bottom: 20px;
    font-style: italic;
}

.link-category {
    display: inline-block;
    background-color: #f0f2f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    margin: 5px 0;
} 