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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #1a1a1a;
    background: #F9FAFB;
    min-height: 100vh;
    font-size: 14px;
}

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

.site-footer .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

a {
    text-decoration: none;
    color: #2748C3;
    transition: all 0.2s ease;
}

a:hover {
    color: #5a7df8;
}

/* 头部样式 */
.site-header {
    background: #2748C3;
    color: white;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(112, 152, 254, 0.15);
    position: relative;
    backdrop-filter: blur(10px);
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.logo-area {
    display: flex;
    align-items: center;
    float: left;
    position: relative;
    z-index: 1;
}

.logo img {
    height: 32px;
    margin-right: 12px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.slogan {
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user-area {
    float: right;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.user-area a {
    color: white;
    margin-left: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
}

.user-area a:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
}

/* 清除浮动 */
.site-header::after {
    content: "";
    display: table;
    clear: both;
}

/* Banner样式 */
.banner img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* 搜索框样式 */
.search-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    border: 1px solid rgba(112, 152, 254, 0.1);
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.search-input:focus {
    border-color: #2748C3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(112, 152, 254, 0.1);
    background: white;
}

.search-button {
    padding: 10px 20px;
    background: #2748C3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(112, 152, 254, 0.2);
}

.search-button:hover {
    background: #5a7df8;
    transform: none;
}

/* 导航区域样式 */
.nav-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

.categories-sidebar {
    width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 16px;
    border: 1px solid rgba(112, 152, 254, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 4px;
}

.categories-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #374151;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 13px;
}

.categories-list a:hover, 
.categories-list a.active {
    background: #F9FAFB;
    color: #2748C3;
    border-color: #2748C3;
    transform: none;
}

.resources-main {
    flex: 1;
    min-width: 0;
}

.resources-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid rgba(112, 152, 254, 0.1);
}

.resources-table th, 
.resources-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}

.resources-table th {
    background: #2748C3;
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resources-table tr:hover {
    background: #F9FAFB;
    transition: all 0.2s ease;
}

.resources-table tr:last-child td {
    border-bottom: none;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    list-style: none;
    gap: 4px;
}

.pagination li {
    margin: 0;
}

.pagination a {
    display: block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #2748C3;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.pagination a:hover, 
.pagination a.active {
    background: #2748C3;
    color: white;
    border-color: #2748C3;
    transform: none;
}

/* 登录/注册表单样式 */
.auth-form {
    max-width: 400px;
    margin: 30px auto;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(112, 152, 254, 0.1);
}

.auth-form h2 {
    margin-bottom: 20px;
    color: #2748C3;
    text-align: center;
    font-weight: 600;
    font-size: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 500;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.form-control:focus {
    border-color: #2748C3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(112, 152, 254, 0.1);
    background: white;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2748C3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: #5a7df8;
    color: white;
    text-decoration: none;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-danger {
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
    text-decoration: none;
}

.btn-success {
    background: #10b981;
}

.btn-success:hover {
    background: #059669;
    color: white;
    text-decoration: none;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    border-left: 3px solid;
    font-weight: 500;
    font-size: 13px;
}

.alert-success {
    background: #f0f9ff;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

/* 页脚样式 */
.site-footer {
    background: #2748C3;
    color: white;
    padding: 30px 0;
    width: 100%;
    margin-top: 40px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.footer-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.footer-left {
    flex: 1;
    min-width: 300px;
    padding-right: 30px;
}

.footer-right {
    flex-shrink: 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.footer-logo-img {
    height: 32px;
    margin-right: 12px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.footer-slogan {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.footer-description {
    line-height: 1.5;
    margin: 16px 0;
    color: rgba(255,255,255,0.85);
    max-width: 400px;
    font-size: 13px;
}

.footer-copyright {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}

.footer-copyright a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-copyright a:hover {
    color: #F9FAFB;
    text-decoration: underline;
}

.footer-qrcode {
    text-align: center;
}

.qrcode-img {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.qrcode-img:hover {
    border-color: rgba(255,255,255,0.3);
}

/* 未登录用户提示 */
.guest-notice {
    background: #f0f9ff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    color: #065f46;
    border-left: 3px solid #10b981;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
    font-size: 13px;
}

.guest-notice a {
    color: #059669;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.guest-notice a:hover {
    color: #047857;
    text-decoration: underline;
}

/* 默认资源标记 */
.resource-default {
    position: relative;
}

.resource-default:after {
    content: "示例";
    position: absolute;
    top: 6px;
    right: 6px;
    background: #2748C3;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(112, 152, 254, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo-area, .user-area {
        float: none;
        text-align: center;
        justify-content: center;
    }
    
    .user-area {
        margin-top: 8px;
    }
    
    .nav-container {
        flex-direction: column;
    }
    
    .categories-sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 16px;
        position: static;
    }
    
    .resources-table th, 
    .resources-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-input {
        border-radius: 8px;
        margin-bottom: 0;
    }
    
    .search-button {
        border-radius: 8px;
        align-self: stretch;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left {
        padding-right: 0;
        margin-bottom: 20px;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-copyright {
        text-align: center;
    }
    
    .qrcode-img {
        width: 80px;
        height: 80px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box,
.categories-sidebar,
.resources-table {
    animation: fadeIn 0.3s ease-out;
}

/* 表格行动画 */
.resources-table tr {
    transition: background-color 0.2s ease;
}

/* 加载动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.loading {
    animation: pulse 1.5s infinite;
}