/* 示例页面专用样式 */
.examples-main {
    padding-top: 80px;
    min-height: 100vh;
}

/* 示例页面英雄区域 */
.examples-hero {
    background: transparent;
    padding: 80px 0;
    text-align: center;
}

.examples-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.examples-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #4a90e2 0%, #50e3c2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.examples-hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 分类筛选 */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 40px;
}

.filter-btn {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #4a90e2 0%, #50e3c2 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

/* 精选示例 */
.featured-examples {
    padding: 80px 0;
}

.examples-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.featured-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.featured-preview {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3), rgba(80, 227, 194, 0.3));
    overflow: hidden;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.2) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.2) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.play-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-icon:hover {
    transform: scale(1.1);
    background: white;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 30px 20px 20px;
    display: flex;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.featured-card:hover .preview-overlay {
    opacity: 1;
    transform: translateY(0);
}

.preview-btn,
.code-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #50e3c2 100%);
    color: white;
}

.code-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-btn:hover,
.code-btn:hover {
    transform: scale(1.05);
}

.featured-info {
    padding: 25px;
}

.featured-info h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.featured-info p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
}

.featured-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag.platformer { background: rgba(76, 175, 80, 0.2); border-color: rgba(76, 175, 80, 0.5); }
.tag.shooter { background: rgba(244, 67, 54, 0.2); border-color: rgba(244, 67, 54, 0.5); }
.tag.puzzle { background: rgba(156, 39, 176, 0.2); border-color: rgba(156, 39, 176, 0.5); }
.tag.arcade { background: rgba(255, 152, 0, 0.2); border-color: rgba(255, 152, 0, 0.5); }
.tag.rpg { background: rgba(63, 81, 181, 0.2); border-color: rgba(63, 81, 181, 0.5); }

.featured-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 示例库 */
.examples-gallery {
    padding: 80px 0;
    background:transparent;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.example-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.example-preview {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(80, 227, 194, 0.2));
}

.preview-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%);
    background-size: 15px 15px;
    background-position: 0 0, 0 7.5px, 7.5px -7.5px, -7.5px 0px;
}

.example-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: all 0.3s ease;
}

.example-card:hover .example-overlay {
    opacity: 1;
}

.play-btn,
.download-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.play-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #50e3c2 100%);
    color: white;
}

.download-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.example-info {
    padding: 20px;
}

.example-info h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.example-info p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.example-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.difficulty {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.difficulty.easy { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.difficulty.medium { background: rgba(255, 152, 0, 0.2); color: #FF9800; }
.difficulty.hard { background: rgba(244, 67, 54, 0.2); color: #F44336; }

.lines {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* 加载更多 */
.load-more {
    text-align: center;
    margin-top: 50px;
}

.load-more-btn {
    padding: 15px 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #4a90e2 0%, #50e3c2 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

/* 代码编辑器 */
.code-playground {
    padding: 80px 0;
}

.playground-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
}

.playground-info h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 20px;
}

.playground-info p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.playground-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.playground-features li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    font-size: 1rem;
}

.playground-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #4a90e2 0%, #50e3c2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.playground-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

/* 代码编辑器模拟 */
.code-editor-mockup {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.editor-header {
    background: rgba(20, 20, 20, 0.9);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-tabs {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab.active {
    background: rgba(74, 144, 226, 0.3);
    color: white;
}

.control-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #4a90e2 0%, #50e3c2 100%);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.editor-content {
    padding: 20px;
    font-family: 'Courier New', monospace;
}

.code-line {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    min-height: 20px;
}

.line-number {
    width: 40px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    text-align: right;
    margin-right: 15px;
}

.code {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* 筛选动画 */
.example-card {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.example-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .examples-hero-title {
        font-size: 2.5rem;
    }
    
    .category-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .examples-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .playground-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .playground-info h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .examples-hero {
        padding: 60px 0;
    }
    
    .examples-hero-title {
        font-size: 2rem;
    }
    
    .featured-card,
    .example-card {
        margin: 0 10px;
    }
    
    .playground-info p {
        font-size: 1rem;
    }
    
    .playground-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}
