/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9fdf9;
    background-image: linear-gradient(to bottom, #f1f8f1, #e8f5e8);
}

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

/* 头部样式 */
header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 40px;
    border-bottom: 2px solid #e0f2e0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo i {
    font-size: 36px;
    color: #4CAF50;
    margin-right: 15px;
}

.logo h1 {
    font-size: 36px;
    color: #2e7d32;
    font-weight: 600;
}

.subtitle {
    font-size: 18px;
    color: #66bb6a;
    margin-bottom: 25px;
}

/* 微信按钮样式 */
.wechat-btn-container {
    margin-top: 20px;
}

.wechat-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.wechat-btn:hover {
    background-color: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.wechat-btn i {
    margin-right: 10px;
    font-size: 18px;
}

/* 分类标题 */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-size: 24px;
    color: #2e7d32;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #c8e6c9;
    display: flex;
    align-items: center;
}

.category-title i {
    margin-right: 10px;
}

/* 导航网站网格 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .sites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sites-grid {
        grid-template-columns: 1fr;
    }
}

/* 网站卡片样式 */
.site-card {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    height: 100%;
    border: 1px solid #e0f2e0;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #a5d6a7;
}

.site-icon {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f8f1;
    padding: 20px;
}

.site-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.site-icon i {
    font-size: 48px;
    color: #66bb6a;
}

.site-info {
    padding: 20px;
    flex-grow: 1;
}

.site-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 无内容提示 */
.no-sites {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-sites i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #c8e6c9;
}

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

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    color: #2e7d32;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content h3 i {
    margin-right: 10px;
}

.qrcode-container {
    padding: 20px;
    background-color: #f9fdf9;
    border-radius: 12px;
    margin: 20px 0;
}

.qrcode {
    width: 200px;
    height: 200px;
    border-radius: 8px;
}

.modal-content p {
    margin: 10px 0;
    color: #555;
}

.hint {
    font-size: 14px;
    color: #f44336;
    font-style: italic;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #e0f2e0;
    color: #666;
    font-size: 14px;
}

footer a {
    color: #4CAF50;
    text-decoration: none;
    margin: 0 5px;
}

footer a:hover {
    text-decoration: underline;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    color: #2e7d32;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container h2 i {
    margin-right: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #43a047;
}

/* 后台管理样式 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0f2e0;
}

.admin-actions {
    display: flex;
    gap: 15px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.admin-table th,
.admin-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f8f1;
}

.admin-table th {
    background-color: #e8f5e8;
    color: #2e7d32;
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: #f9fdf9;
}

.admin-table img {
    max-width: 80px;
    max-height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 8px;
}

.edit-btn {
    background-color: #2196F3;
    color: white;
}

.edit-btn:hover {
    background-color: #0b7dda;
}

.delete-btn {
    background-color: #f44336;
    color: white;
}

.delete-btn:hover {
    background-color: #da190b;
}

/* 表单样式 */
.form-container {
    background-color: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.form-container h3 {
    color: #2e7d32;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0f2e0;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-col {
    flex: 1;
    min-width: 250px;
    padding: 0 10px;
    margin-bottom: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
}