/* 全局样式和变量 */
:root {
    --primary-color: #4dabf7;
    --primary-light: #c5e3ff;
    --primary-dark: #1c7ed6;
    --secondary-color: #f8f9fa;
    --text-color: #343a40;
    --border-color: #dee2e6;
    --success-color: #37b24d;
    --error-color: #f03e3e;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo h1 {
    font-size: 28px;
    color: var(--primary-dark);
    margin: 0;
    padding: 0;
}

.logo h1 a {
    text-decoration: none;
    color: var(--primary-dark);
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* 搜索框样式 */
.search-container {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--primary-light);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: var(--primary-dark);
}

/* 统计信息样式 */
.stats-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: 20px;
}

.weekly-update, .total-count {
    font-size: 14px;
    color: #6c757d;
    margin: 0 5px;
}

.number {
    color: #ff0000;
    font-weight: bold;
}

.weekly-update {
    color: var(--primary-dark);
    font-weight: 500;
}

/* 响应式设计 - 手机端显示 */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        align-items: center;
        padding: 20px 10px;
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
    }
    
    .stats-info {
        margin-left: 0;
        margin-top: 15px;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
}

/* 最近更新区域样式 */
.recent-updates {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.recent-updates h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(3, 33.33%);
    gap: 15px;
    width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .updates-grid {
        grid-template-columns: 1fr;
    }
}

.update-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    overflow: hidden;
}

.update-item a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
}

.update-item a:hover {
    color: var(--primary-color);
}

.resource-column h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

/* 简单列表样式 */
.resource-list-simple {
    list-style: none;
}

.resource-list-simple li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.resource-list-simple li:last-child {
    border-bottom: none;
}

.resource-list-simple a {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.resource-list-simple a:hover {
    color: var(--primary-color);
}

.list-date {
    color: #6c757d;
    font-size: 0.85em;
}

.resource-item {
    margin-bottom: 15px;
    padding: 15px;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    transition: transform 0.3s;
}

.resource-item:hover {
    transform: translateY(-5px);
}

.resource-item h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--text-color);
}

.resource-item p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #6c757d;
}

.disk-type {
    display: flex;
    align-items: center;
}

.disk-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.resource-item button {
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.resource-item button:hover {
    background-color: var(--primary-dark);
}

/* 资源列表样式 */
.resource-list {
    margin-bottom: 40px;
}

.resource-list h2 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.resource-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.resource-card:hover {
    transform: translateY(-5px);
}

.no-results-message {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 30px;
    margin: 20px 0;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    color: #6c757d;
    font-size: 18px;
    text-align: center;
    grid-column: 1 / -1; /* 跨所有列 */
}

.resource-card h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;      /* 允许长单词换行 */
    word-break: break-all;      /* 强制在任何字符处换行 */
    max-width: 100%;
    display: -webkit-box;       /* 使用弹性盒模型 */
    -webkit-line-clamp: 2;      /* 限制最多显示2行 */
    -webkit-box-orient: vertical; /* 设置垂直方向 */
    line-height: 1.3;           /* 优化行高 */
}
.resource-info {
    margin-bottom: 15px;
}

.resource-info p {
    margin-bottom: 5px;
    font-size: 14px;
    color: #6c757d;
}

.view-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.view-btn:hover {
    background-color: var(--primary-dark);
}

.load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more button {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.load-more button:hover {
    background-color: var(--primary-dark);
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
}

.close-icon {
    cursor: pointer;
    transition: transform 0.3s;
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 18px;
    color: #666;
}

.close-icon:hover {
    transform: scale(1.1);
    color: #333;
}

.modal-body {
    padding: 20px;
}

.link-container {
    margin-bottom: 20px;
}

.link-container label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-weight: 500;
}

.link-container .disk-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.link-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    font-size: 14px;
}

.button-group {
    display: flex;
    gap: 10px;
}

.button-group button {
    flex: 1;
    padding: 8px 0;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.button-group .copy-btn {
    background-color: var(--primary-color);
}

.button-group .copy-btn:hover {
    background-color: var(--primary-dark);
}

.button-group .jump-btn {
    background-color: var(--success-color);
}

.button-group .jump-btn:hover {
    background-color: #2b9e41;
}

.button-group .close-btn {
    background-color: #6c757d;
}

.button-group .close-btn:hover {
    background-color: #5a6268;
}

.button-group .wechat-btn {
    background-color: #07C160;
}

.button-group .wechat-btn:hover {
    background-color: #06ad56;
}

.qrcode-container {
    text-align: center;
}

.qrcode-container div {
    margin: 0 auto 10px;
}

.qrcode-container p {
    font-size: 14px;
    color: #6c757d;
}

.qrcode-modal .qrcode-container {
    padding: 20px 0;
}

.wechat-qrcode {
    width: 200px;
    height: 200px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.modal-loading {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-error {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.modal-error h2 {
    color: var(--error-color);
    margin-bottom: 20px;
}

.error-qrcode {
    margin: 0 auto 15px;
    display: block;
}

.modal-error button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.modal-error button:hover {
    background-color: var(--primary-dark);
}

.modal-jihuoma{text-align: center;}
.modal-jihuoma button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.modal-jihuoma button:hover {
    background-color: var(--primary-dark);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    color: #6c757d;
}

footer p {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .hot-resources {
        flex-direction: column;
    }
    
    .resource-column {
        margin-bottom: 20px;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .button-group {
        flex-direction: column;
    }
}

/* 消息提醒组件样式 */
.message-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: opacity 0.3s, transform 0.3s;
    animation: message-fade-in 0.3s;
}

.message-notification.success {
    background-color: #f0f9eb;
    border: 1px solid #e1f3d8;
    color: #67c23a;
}

.message-notification.info {
    background-color: #f4f4f5;
    border: 1px solid #e9e9eb;
    color: #909399;
}

.message-notification.warning {
    background-color: #fdf6ec;
    border: 1px solid #faecd8;
    color: #e6a23c;
}

.message-notification.error {
    background-color: #fef0f0;
    border: 1px solid #fde2e2;
    color: #f56c6c;
}

.message-icon {
    margin-right: 10px;
    font-size: 16px;
}

.message-text {
    font-size: 14px;
}

@keyframes message-fade-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 搜索关键词高亮 */
.highlight-keyword {
    color: #ff0000;
    font-weight: bold;
}