* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fbfbfb; /* 改为淡灰色背景 */
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e8e8e8;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 添加阴影效果 */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #4285f4;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background-color: #4285f4;
    border-radius: 50%;
    margin-right: 8px;
}

.logo-text {
    font-size: 18px;
    font-weight: 500;
}

.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 50px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.search-btn {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

/* Main Content */
.main-content {
    display: flex;
    gap: 30px;
    padding: 20px 0;
}

.content-left {
    flex: 1;
}

.content-right {
    width: 300px;
}

/* Breadcrumb - 融合到卡片头部 */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.breadcrumb-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.breadcrumb-left a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-left a:hover {
    color: #4285f4;
}

.breadcrumb-left > span {
    color: #333;
}

/* 面包屑分隔符 */
.breadcrumb-left a::after {
    content: "›";
    color: #ccc;
    margin: 0 6px;
}

/* 分享按钮 */
.share-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background-color: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background-color: #f5f5f5;
    border-color: #4285f4;
    color: #4285f4;
}

.share-btn::before {
    content: "🔗";
    font-size: 14px;
}

/* Detail Card - 基础信息卡片 */
.detail-card {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* 左侧配图 */
.detail-poster {
    width: 150px;
    flex-shrink: 0;
}

.detail-poster img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 右侧信息 */
.detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* 基础信息列表 */
.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    line-height: 1.6;
}

.meta-label {
    /* min-width: 80px; */
    color: #999;
    flex-shrink: 0;
}

.meta-value {
    color: #333;
    flex: 1;
}

.meta-value a {
    color: #4285f4;
    text-decoration: none;
    transition: color 0.2s;
}

.meta-value a:hover {
    color: #1a73e8;
}

/* 资源类型标签 */
.resource-type-tag {
    display: inline-block;
    padding: 2px 10px;
    background-color: #e8f4fd;
    color: #4285f4;
    border-radius: 4px;
    font-size: 13px;
}

/* 资源列表卡片 */
.resource-list-card {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resource-list-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-list-title::before {
    content: "📦";
    font-size: 18px;
}

/* 资源提示话术 */
.resource-tip {
    background-color: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    color: #856404;
    line-height: 1.6;
}

.resource-tip::before {
    content: "⚠️";
    margin-right: 8px;
}

/* 资源项 */
.resource-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.resource-item:last-child {
    border-bottom: none;
}

.resource-item:hover {
    background-color: #f8f9fa;
}

.resource-item-number {
    font-size: 16px;
    font-weight: 600;
    color: #ff6b35;
    width: 30px;
    flex-shrink: 0;
    text-align: center;
}

.resource-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.resource-item-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 6px;
}

.resource-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.resource-item-pan {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    flex-shrink: 0;
}

.resource-item-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.resource-item-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.resource-item-time::before {
    content: "🕒";
    font-size: 12px;
}

.resource-item-author {
    display: flex;
    align-items: center;
    gap: 4px;
}

.resource-item-author::before {
    content: "👤";
    font-size: 12px;
}

.resource-item-desc {
    display: flex;
    align-items: center;
    font-size: 13px;
    gap: 4px;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-item-desc::before {
    content: "📄";
    font-size: 12px;
    flex-shrink: 0;
}

.resource-item-action {
    flex-shrink: 0;
}

/* 资源简介卡片 */
.resource-intro-card {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resource-intro-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-intro-title::before {
    content: "📝";
    font-size: 18px;
}

.resource-intro-content {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    text-align: justify;
}

/* 同类资源卡片 */
.similar-resources-card {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.similar-resources-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.similar-resources-title::before {
    content: "🎬";
    font-size: 18px;
}

.similar-resources-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.similar-resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.similar-resource-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.similar-resource-item a:hover {
    color: #4285f4;
}

.similar-resource-number {
    color: #999;
    font-size: 13px;
    min-width: 20px;
}

/* Sidebar */
.sidebar-section {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-more {
    color: #999;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
}

.sidebar-more:hover {
    color: #4285f4;
}

/* 每日热门使用火焰图标 */
.sidebar-section:first-child .sidebar-title-left::before {
    content: "🔥";
    font-size: 16px;
}

/* 热门推荐使用目标图标 */
.sidebar-section:last-child .sidebar-title-left::before {
    content: "🎯";
    font-size: 16px;
}

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

.sidebar-list li {
    margin-bottom: 15px;
    line-height: 1.6;
}

.sidebar-list a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.sidebar-list a:hover {
    color: #4285f4;
}

.sidebar-list-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-number {
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    min-width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    margin-top: 1px;
}

/* 前三条序号样式 - 橙红色背景 */
.sidebar-list li:nth-child(1) .sidebar-number,
.sidebar-list li:nth-child(2) .sidebar-number,
.sidebar-list li:nth-child(3) .sidebar-number {
    background-color: #ffdad9;
}

/* 后面条目序号样式 - 灰色背景 */
.sidebar-list li:nth-child(n+4) .sidebar-number {
    color: #999;
}

/* Smart Recommendations */
.smart-recommendations {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px; /* 添加圆角 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 添加阴影效果 */
}

.smart-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.smart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.smart-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.smart-number {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    min-width: 20px;
}

.smart-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.smart-link:hover {
    color: #4285f4;
}

/* Resource Content */
.resource-content {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resource-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-title::before {
    content: "📁";
    font-size: 16px;
}

.resource-body {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

.resource-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #4285f4;
    margin-bottom: 15px;
}

.resource-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.resource-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.resource-detail-icon {
    width: 16px;
    height: 16px;
    background-color: #4285f4;
    border-radius: 50%;
    flex-shrink: 0;
}

.resource-description {
    margin-top: 10px;
    padding: 10px 0;
    border-top: 1px solid #eee;
}

/* Detail Actions */
.detail-actions {
    display: flex;
    gap: 15px;
    /*justify-content: center;*/
    margin: 20px 0;
}

.action-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background-color: #e9ecef;
}

/* Footer */
.footer {
    /* background-color: #ffffff; */
    border-radius: 8px;
    /* box-shadow: 0 2px 8px rgba(0,0,0,0.1); */
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 12px;
    /* margin-top: 20px; */
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #4285f4;
    text-decoration: none;
    margin: 0 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        margin: 0;
        max-width: none;
        width: 100%;
    }

    .header-right {
        display: none;
    }

    .main-content {
        flex-direction: column;
        gap: 20px;
    }

    .content-right {
        width: 100%;
    }
    
    /* 移动端资源列表优化 */
    .resource-list-card {
        padding: 15px;
    }
    
    .resource-item {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        margin-bottom: 10px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background-color: #fff;
    }
    
    .resource-item:last-child {
        border: 1px solid #e0e0e0;
        margin-bottom: 0;
    }
    
    .resource-item-number {
        display: none;
    }
    
    .resource-item-left {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .resource-item-icon {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }
    
    .resource-item-content {
        width: 100%;
        gap: 8px;
    }
    
    /* 第一行：图标 + 网盘名称 */
    .resource-item-pan {
        display: flex;
        align-items: center;
        font-size: 15px;
        font-weight: 600;
        color: #333;
    }
    
    /* 第二行：时间 + 分享者 */
    .resource-item-meta {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        font-size: 12px;
        color: #999;
        min-width: 300px;
    }
    
    .resource-item-time,
    .resource-item-author {
        font-size: 12px;
    }
    
    /* 第三行：资源文件 */
    .resource-item-desc {
        width: 100%;
        max-width: none;
        font-size: 13px;
        color: #666;
        line-height: 1.4;
        word-break: break-all;
        white-space: normal;
    }
    
    /* 最后一行：访问下载按钮居右 */
    .resource-item-action {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        margin-top: 8px;
    }
    
    .resource-item-action .action-btn {
        padding: 8px 20px;
        font-size: 14px;
        background-color: #4285f4;
        color: #fff;
        border: none;
        border-radius: 4px;
    }

    /* Mobile layout adjustments - 保持PC端布局 */
    .detail-header {
        flex-direction: row;
        gap: 15px;
    }

    .detail-poster {
        width: 180px;
        flex-shrink: 0;
    }

    .detail-poster img {
        width: 100%;
        height: auto;
    }

    .detail-info {
        flex: 1;
        min-width: 0;
    }

    .similar-resources-list {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .download-links {
        flex-direction: column;
        align-items: center;
    }

    .smart-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* 移动端面包屑优化 */
    .breadcrumb {
        padding: 10px 15px;
        font-size: 13px;
    }

    .breadcrumb-left {
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex: 1;
        min-width: 0;
    }

    .breadcrumb-left::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb-left::before {
        font-size: 14px;
        margin-right: 4px;
    }

    .breadcrumb a {
        padding: 4px 6px;
        font-size: 13px;
        flex-shrink: 0;
    }

    /* 移动端面包屑分隔符 */
    .breadcrumb-left a::after {
        margin: 0 4px;
    }

    .breadcrumb-left > span {
        font-size: 13px;
        display: inline-block;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
    }

    /* 移动端隐藏分享按钮 */
    .share-btn {
        display: none;
    }

    /* 移动端元信息优化 */
    .meta-value {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
    }
}

@media (max-width: 480px) {
    .detail-card {
        padding: 15px;
    }

    .breadcrumb {
        padding: 8px 0px;
    }

    .breadcrumb-left {
        gap: 0;
    }

    .breadcrumb a {
        padding: 3px 4px;
        font-size: 12px;
    }

    /* 480px以下面包屑分隔符 */
    .breadcrumb-left a::after {
        margin: 0 3px;
    }

    .breadcrumb-left > span {
        font-size: 12px;
        max-width: 180px;
    }

    .detail-header {
        gap: 12px;
    }

    .detail-poster {
        width: 140px;
    }

    .detail-title {
        font-size: 16px;
    }

    .meta-item {
        font-size: 13px;
    }

    /* 480px以下元信息优化 */
    .meta-value {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .sidebar-section {
        padding: 15px;
    }
    
    /* 480px以下资源列表微调 */
    .resource-list-card {
        padding: 12px;
    }
    
    .resource-item {
        padding: 10px;
    }
    
    .resource-item-pan {
        font-size: 14px;
    }
    
    .resource-item-desc {
        font-size: 12px;
    }
    
    .resource-item-action .action-btn {
        padding: 7px 16px;
        font-size: 13px;
    }
}

/* 激活弹框样式 */
.activation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.activation-dialog {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 350px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.activation-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.activation-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.activation-qr {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.activation-qr img {
    width: 200px;
    height: 200px;
    border-radius: 6px;
}

.activation-tip {
    font-size: 14px;
    color: #e74c3c;
    margin-bottom: 25px;
    font-weight: 500;
}

.activation-input-section {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.activation-label {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
}

.activation-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.activation-input:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.activation-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.activation-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.activation-btn-cancel {
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.activation-btn-cancel:hover {
    background-color: #e9ecef;
}

.activation-btn-confirm {
    background-color: #4285f4;
    color: white;
}

.activation-btn-confirm:hover {
    background-color: #1a73e8;
}

.activation-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .activation-dialog {
        padding: 20px;
        margin: 20px;
        max-width: none;
    }

    .activation-qr {
        width: 160px;
        height: 160px;
    }

    .activation-qr img {
        width: 160px;
        height: 160px;
    }

    .activation-input-section {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .activation-label {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 13px;
    }

    .activation-input {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        padding: 10px 12px;
    }
}
