/**
 * 统一的项目详情页样式模板
 * 现代化设计，深色主题，响应式布局
 */

/* 全局项目详情容器 */
.project-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f0f 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.project-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffdb70, #ff9f43, #ffdb70);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 返回按钮 */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffdb70;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border: 2px solid #ffdb70;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background: rgba(255, 219, 112, 0.1);
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: #ffdb70;
    color: #1a1a2e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 219, 112, 0.3);
}

/* 项目头部 */
.project-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffdb70 0%, #ff9f43 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.project-description {
    font-size: 1.3rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 项目统计 */
.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 219, 112, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 219, 112, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 219, 112, 0.2);
    box-shadow: 0 10px 25px rgba(255, 219, 112, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffdb70;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 内容区块 */
.content-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffdb70;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-section h2::before {
    content: '';
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, #ffdb70, #ff9f43);
    border-radius: 2px;
}

/* 技术栈标签 */
.tech-stack {
    margin-bottom: 2rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tech-tag {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
    position: relative;
    overflow: hidden;
}

.tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tech-tag:hover::before {
    left: 100%;
}

.tech-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

/* 功能特点网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    padding: 1.5rem;
    background: rgba(255, 219, 112, 0.1);
    border-radius: 12px;
    border-left: 4px solid #ffdb70;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 219, 112, 0.1);
    transition: width 0.3s ease;
}

.feature-item:hover::before {
    width: 100%;
}

.feature-item:hover {
    transform: translateX(10px);
    background: rgba(255, 219, 112, 0.15);
}

.feature-item {
    font-size: 1rem;
    line-height: 1.6;
    color: #e0e0e0;
    position: relative;
    z-index: 1;
}

/* README 内容 */
.readme-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.8;
    color: #e0e0e0;
    white-space: pre-wrap;
    overflow-x: auto;
}

.readme-content h1,
.readme-content h2,
.readme-content h3 {
    color: #ffdb70;
    margin: 1.5rem 0 1rem 0;
}

.readme-content code {
    background: rgba(255, 219, 112, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    color: #ffdb70;
    font-family: inherit;
}

.readme-content pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border-left: 4px solid #ffdb70;
}

/* 底部信息 */
.project-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    border-top: 2px solid rgba(255, 219, 112, 0.3);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
}

.project-footer p {
    color: #b0b0b0;
    margin: 0.5rem 0;
}

.project-footer strong {
    color: #ffdb70;
}

/* GitHub 链接按钮 */
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 1rem 0;
    border: 2px solid #555;
}

.github-link:hover {
    background: linear-gradient(135deg, #555 0%, #777 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .project-detail {
        padding: 1rem;
        margin: 1rem;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .project-description {
        font-size: 1.1rem;
    }
    
    .project-stats {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }
    
    .tech-tags {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .readme-content {
        padding: 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .project-detail {
        padding: 0.75rem;
        margin: 0.5rem;
    }
    
    .project-header {
        padding: 1.5rem;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.4rem;
    }
    
    .tech-tag {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-detail > * {
    animation: fadeInUp 0.6s ease-out forwards;
}

.project-detail > *:nth-child(2) { animation-delay: 0.1s; }
.project-detail > *:nth-child(3) { animation-delay: 0.2s; }
.project-detail > *:nth-child(4) { animation-delay: 0.3s; }
.project-detail > *:nth-child(5) { animation-delay: 0.4s; }

/* 滚动条样式 */
.readme-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.readme-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.readme-content::-webkit-scrollbar-thumb {
    background: #ffdb70;
    border-radius: 4px;
}

.readme-content::-webkit-scrollbar-thumb:hover {
    background: #ff9f43;
}