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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Filters Section */
.filters {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.filters h2 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.filter-section h3 {
    margin-bottom: 1rem;
    color: #4a5568;
    font-size: 1.1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: #4a5568;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.search-section input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-section input:focus {
    outline: none;
    border-color: #667eea;
}

/* Results Section */
.results {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    color: #2d3748;
    font-size: 1.5rem;
}

#project-count {
    color: #667eea;
    font-weight: 600;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-controls label {
    color: #4a5568;
    font-weight: 500;
}

.sort-controls select {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    background: white;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #f9fafb;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.project-card h3 {
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-card h3 a {
    color: #667eea;
    text-decoration: none;
}

.project-card h3 a:hover {
    text-decoration: underline;
}

.github-stars-badge {
    height: 20px;
    vertical-align: middle;
}

.project-description {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.meta-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.platform-tag {
    background: #e6f4ff;
    color: #0066cc;
}

.usecase-tag {
    background: #fff0e6;
    color: #cc6600;
}

.github-stars {
    display: inline-block;
    margin-left: 0.5rem;
    color: #718096;
    font-size: 0.85rem;
}

/* Footer */
footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: #90cdf4;
    text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

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

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: #718096;
    font-size: 1.1rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.no-results h3 {
    color: #4a5568;
    margin-bottom: 0.5rem;
}
