/* 
 * 创意矩阵 - IdeaMatrix Style
 * AI创业项目库
 */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --accent-cyan: #00d4ff;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: #27272a;
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* 背景效果 */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.03) 0%, transparent 70%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 32px;
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-cyan);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 1px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 14px;
    width: 220px;
    transition: all 0.3s;
}

.search-form input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-form button {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-form button:hover {
    background: var(--accent-cyan);
}

/* Hero区域 */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 分类标签 */
.categories {
    padding: 24px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.category-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tabs .tab {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.category-tabs .tab:hover,
.category-tabs .tab.active {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

/* 项目区域 */
.projects, .featured {
    padding: 64px 0;
}

.section-title {
    font-size: 28px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transition: all 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.project-card .card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.project-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.project-card .project-desc {
    flex-grow: 1;
    min-height: 72px;
    max-height: 72px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    line-height: 1.5;
    font-size: 16px;
    margin-bottom: 12px;
}

.project-card .project-score {
    flex-shrink: 0;
    margin-top: auto;
}

.project-desc {
    color: var(--text-secondary);
}

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

.tag {
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    font-size: 12px;
    color: var(--accent-cyan);
}

/* 项目评分 */
.project-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 170, 0, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    margin-bottom: 12px;
}

.project-score .score-star {
    font-size: 14px;
}

.project-score .score-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
}

.project-score .score-max {
    font-size: 12px;
    color: var(--text-muted);
}

/* 强烈推荐标签 */
.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.hot-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    animation: hotPulse 2s ease-in-out infinite;
}

@keyframes hotPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 107, 107, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.8); }
}

.hot-card {
    border-color: rgba(255, 107, 107, 0.5);
    background: linear-gradient(135deg, var(--bg-card), rgba(255, 107, 107, 0.05));
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    flex-shrink: 0;
}

.category {
    font-size: 13px;
    color: var(--accent-purple);
    font-weight: 500;
}

.stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* 精选卡片 */
.featured-card {
    border-color: rgba(234, 179, 8, 0.3);
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #eab308, #f59e0b);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #000;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.page-btn {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--text-muted);
}

/* 页脚 */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
    margin-top: 80px;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 12px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.beian {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.beian a {
    color: var(--text-muted);
    text-decoration: none;
}

.beian a:hover {
    color: var(--accent-cyan);
}

/* 搜索和菜单按钮 */
.menu-toggle,
.search-toggle {
    display: none;
}

/* 响应式 */
@media (max-width: 1024px) {
    .container {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 42px;
    }
    
    .hero p {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    /* 导航栏 */
    .navbar {
        height: 60px;
    }
    
    .navbar .container {
        padding: 0 12px;
        gap: 8px;
    }
    
    .logo {
        gap: 8px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    /* 移动端导航 */
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links a {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-color);
        font-size: 15px;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-links a.active::after {
        display: none;
    }
    
    /* 汉堡菜单按钮 */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        gap: 5px;
    }
    
    .menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* 搜索表单 */
    .search-form {
        order: 4;
        width: 100%;
        margin-top: 8px;
        display: none;
    }
    
    .search-form.active {
        display: flex;
    }
    
    /* 搜索按钮 */
    .search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        font-size: 18px;
        border-radius: 8px;
        transition: background 0.3s;
    }
    
    .search-toggle:active {
        background: var(--bg-card);
    }
    
    .search-form input {
        width: 100%;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .search-form button {
        padding: 10px 14px;
    }
    
    /* Hero区域 */
    .hero {
        padding: 100px 0 50px;
    }
    
    .hero h1 {
        font-size: 28px;
        margin-bottom: 16px;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 15px;
        margin-bottom: 32px;
        padding: 0 10px;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 24px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-item {
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* 分类标签 */
    .categories {
        padding: 16px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0 12px;
        gap: 8px;
    }
    
    .category-tabs .tab {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* 项目网格 */
    .projects-grid,
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .project-card {
        padding: 16px;
        min-height: auto;
        border-radius: 12px;
    }
    
    .project-card h3 {
        font-size: 17px;
        margin-bottom: 8px;
    }
    
    .project-card .project-desc {
        font-size: 14px;
        min-height: 60px;
        max-height: 60px;
        -webkit-line-clamp: 2;
        margin-bottom: 10px;
    }
    
    .project-tags {
        margin-bottom: 12px;
        gap: 6px;
    }
    
    .tag {
        padding: 3px 10px;
        font-size: 11px;
    }
    
    .card-footer {
        padding-top: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .category {
        font-size: 12px;
    }
    
    .stats {
        font-size: 12px;
        gap: 12px;
    }
    
    /* 项目评分 */
    .project-score {
        padding: 4px 10px;
    }
    
    .project-score .score-value {
        font-size: 14px;
    }
    
    /* 徽章 */
    .card-badge {
        top: 12px;
        right: 12px;
        padding: 3px 8px;
        font-size: 11px;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 32px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Section标题 */
    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    /* 项目区域 */
    .projects,
    .featured {
        padding: 32px 0;
    }
    
    /* 空状态 */
    .empty-state {
        padding: 48px 0;
    }
    
    /* 页脚 */
    .footer {
        padding: 32px 0;
        margin-top: 48px;
    }
    
    .footer p {
        font-size: 13px;
    }
    
    .footer-links a {
        display: block;
        margin: 8px 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .hero-stats {
        gap: 16px;
    }
    
    .stat-item {
        min-width: 70px;
    }
    
    /* 更小的屏幕优化项目卡片 */
    .project-card {
        padding: 14px;
    }
    
    .project-card h3 {
        font-size: 16px;
    }
    
    .project-card .project-desc {
        font-size: 13px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover {
        transform: none;
    }
    
    .project-card:active {
        transform: scale(0.98);
    }
    
    .page-btn:active {
        transform: scale(0.95);
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}
