/* ========== 搜索结果样式 - 参考sousuo.txt ========== */

/* 基础变量（默认模式）- 调整为更亮的黄金色 */
:root {
    --primary-color: #2b6cb0;
    --primary-hover: #2563eb;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-secondary: #4a5568;
    --bg-interactive: #ebf8ff;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(43, 108, 176, 0.15);
    --gold-border: #f0d060; 
}

/* ========== 核心：资源卡片完整样式 ========== */
.resource-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow-color);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid var(--gold-border);
    z-index: 1;
    width: 300px;
    max-height: 380px;
    transition: all 0.3s ease;
}

/* 卡片边框旋转动画伪元素 */
.resource-card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: linear-gradient(
                45deg, 
                transparent 0%, 
                rgba(99, 179, 237, 0.2) 25%, 
                var(--primary-color) 50%, 
                rgba(99, 179, 237, 0.2) 75%, 
                transparent 100%
            ) border-box;
            -webkit-mask: 
                linear-gradient(#fff 0 0) padding-box, 
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            background-size: 200% 200%;
            animation: borderRotate 3s linear infinite;
            z-index: -1;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
}

/* hover时显示边框动画 + 提升卡片 */
.resource-card:hover::before {
    opacity: 1;
}
.resource-card:hover {
    box-shadow: 0 8px 24px var(--shadow-hover);
    transform: translateY(-5px);
}

/* 边框旋转动画关键帧 */
@keyframes borderRotate {
    0% {
        background-position: 200% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 卡片内部元素样式 */
.resource-card h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.resource-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    max-height: 60px;
    align-items: flex-start;
}
.tag {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--bg-interactive);
    color: var(--primary-color);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.tag:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.tags {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--bg-interactive);
    color: var(--primary-color);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.tags:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

/* 查看详情按钮样式 - 调整为加长、居中 */
.detail-btn {
    display: block;
    width: 80%;
    margin: 0 auto;
    padding: 10px 0;
    background-color: #e8f4f8;
    color: #2b6cb0;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}
.detail-btn:hover {
    background: linear-gradient(
        45deg, 
        #ebf8ff 0%, 
        #e8f4f8 10%, 
        var(--gold-border) 50%, 
        #e8f4f8 90%, 
        #ebf8ff 100%
    );
    background-size: 200% 200%;
    animation: borderRotate 3s linear infinite;
    color: #2563eb;
}

/* ========== Badge 标识样式 ========== */
.badge-list {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow: hidden;
}

.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    color: white;
    letter-spacing: 0.3px;
    text-align: center;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-tutorial {
    background: rgba(64, 158, 255, 0.8);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px 4px 22px;
    border-radius: 4px;
    font-weight: 600;
    backdrop-filter: blur(2px);
    display: inline-flex;
    align-items: center;
    position: relative;
}

.badge-tutorial::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) rotate(35deg);
    width: 12px;
    height: 12px;
    background: #FFEE00;
    box-shadow: 0 0 6px 1px #FFF500;
    clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 57%,
        79% 91%,
        50% 70%,
        21% 91%,
        32% 57%,
        2% 35%,
        39% 35%
    );
}

.badge-recommend {
    background: rgba(64, 158, 255, 0.8);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px 4px 22px;
    border-radius: 4px;
    font-weight: 600;
    backdrop-filter: blur(2px);
    display: inline-flex;
    align-items: center;
    position: relative;
}

.badge-recommend::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) rotate(35deg);
    width: 12px;
    height: 12px;
    background: #FFEE00;
    box-shadow: 0 0 6px 1px #FFF500;
}

/* ========== 金属质感文字样式 ========== */
.metal-text {
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
    position: relative;
    background: linear-gradient(135deg, #b3d9ff 0%, #ffffff 50%, #b3d9ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 
        0 1px 0 #8ab8e6,
        0 2px 0 #99c2ee,
        0 3px 0 #a6cbf5,
        0 4px 10px rgba(0, 80, 160, 0.4);
}
