/* Demo 页面样式 */
.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

@media screen and (max-width: 400px) {
    .demo-grid {
        grid-template-columns: 1fr;
        padding: 16px 12px;
    }
}

.demo-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.demo-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.demo-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 宽高比 */
    background-color: #000;
    overflow: hidden;
}

.demo-media video,
.demo-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-media video {
    object-fit: contain;
    background-color: #000;
}

.demo-media img {
    transition: transform 0.4s ease;
}

.demo-item:hover .demo-media img {
    transform: scale(1.05);
}

/* 视频播放按钮覆盖层 */
.demo-media .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.demo-item:hover .play-overlay {
    opacity: 1;
}

.play-overlay svg {
    width: 64px;
    height: 64px;
    fill: white;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.demo-content {
    padding: 20px;
}

.demo-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--card-title);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.demo-description {
    font-size: 14px;
    color: var(--card-time);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.demo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.demo-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 16px;
    background-color: var(--body-bg);
    color: var(--card-time);
}

.demo-tag.unity {
    background-color: rgba(0, 113, 227, 0.1);
    color: var(--blue);
}

.demo-tag.houdini {
    background-color: rgba(255, 77, 0, 0.1);
    color: #ff4d00;
}

.demo-tag.shader {
    background-color: rgba(138, 43, 226, 0.1);
    color: #8a2be2;
}

.demo-actions {
    display: flex;
    gap: 12px;
}

.demo-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.demo-btn-primary {
    background-color: var(--blue);
    color: white;
}

.demo-btn-primary:hover {
    background-color: var(--link);
    text-decoration: none;
}

.demo-btn-secondary {
    background-color: var(--body-bg);
    color: var(--card-title);
}

.demo-btn-secondary:hover {
    background-color: var(--border-color);
    text-decoration: none;
}

/* 页面标题 */
.demo-header {
    text-align: center;
    padding: 48px 16px;
    max-width: 800px;
    margin: 0 auto;
}

.demo-header h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--card-title);
    margin: 0 0 16px 0;
}

.demo-header p {
    font-size: 18px;
    color: var(--card-time);
    margin: 0;
}

/* 分类筛选 */
.demo-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 16px 24px;
}

.demo-filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--card-title);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-filter-btn:hover,
.demo-filter-btn.active {
    background-color: var(--blue);
    border-color: var(--blue);
    color: white;
}

/* 空状态提示 */
.demo-empty {
    text-align: center;
    padding: 80px 16px;
    color: var(--card-time);
}

.demo-empty svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.5;
}
