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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

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

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #999;
    font-size: 0.9em;
    margin-top: 5px;
}

.controls {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') no-repeat 15px center;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-filter {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    font-weight: 500;
}

.category-filter:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.category-filter.active {
    background: #667eea;
    color: white;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: #f0f0f0;
    padding: 5px;
    border-radius: 20px;
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s;
    font-size: 14px;
}

.view-btn.active {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
}

.category-title {
    font-size: 1.8em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    font-size: 1.2em;
}

.category-count {
    font-size: 0.9em;
    color: #999;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
}

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

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    background: #fafafa;
}

.project-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-3px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-name {
    font-size: 1.25em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    flex: 1;
}

.project-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #e8eaf6;
    color: #5c6bc0;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.meta-tag.category {
    background: #e3f2fd;
    color: #1976d2;
}

.meta-tag.time {
    background: #fff3e0;
    color: #f57c00;
}

.meta-tag.type {
    background: #e8f5e9;
    color: #388e3c;
}

.project-description {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 48px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85em;
    transition: all 0.3s;
    font-weight: 500;
}

.project-link:hover {
    transform: translateX(3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.project-link.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.bookmark-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    color: #ddd;
}

.bookmark-btn:hover {
    transform: scale(1.2);
}

.bookmark-btn.active {
    color: #ff6b6b;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 40px;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    .category-title {
        font-size: 1.4em;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .stat-number {
        font-size: 2em;
    }
}
