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

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

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

header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #306998;
}

.logo i {
    color: #ffd43b;
    margin-right: 8px;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #306998;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.hero {
    background: linear-gradient(135deg, #306998 0%, #ffd43b 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box button {
    padding: 12px 24px;
    background: #ffd43b;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.3s;
}

.search-box button:hover {
    transform: translateY(-2px);
}

.filters {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    background: white;
}

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

.tag {
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.tag:hover {
    background: #e0e0e0;
}

.tag.active {
    background: #306998;
    color: white;
}

.libraries {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.section-title p {
    color: #666;
}

.libraries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.library-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.library-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #306998 0%, #3b7cb0 100%);
    color: white;
    padding: 20px;
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.rating {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 8px;
}

.card-body {
    padding: 20px;
}

.description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

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

.tag-small {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #666;
}

.meta-info {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #666;
}

.meta-info i {
    margin-right: 5px;
}

.card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

.btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: #306998;
    color: white;
}

.btn-primary:hover {
    background: #255a84;
}

.btn-outline {
    background: white;
    border: 1px solid #306998;
    color: #306998;
}

.btn-outline:hover {
    background: #306998;
    color: white;
}

.load-more-btn {
    text-align: center;
}

footer {
    background: #1e2a3a;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-column p, .footer-column ul {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-column a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    font-size: 1.2rem;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.7;
}

.library-detail {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.detail-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.detail-header {
    background: linear-gradient(135deg, #306998 0%, #3b7cb0 100%);
    color: white;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.detail-title-section h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.detail-rating {
    font-size: 1.1rem;
    opacity: 0.9;
}

.detail-rating i {
    color: #ffd43b;
}

.detail-actions {
    display: flex;
    gap: 15px;
}

.btn-github, .btn-docs {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-github {
    background: #24292e;
    color: white;
}

.btn-docs {
    background: #ffd43b;
    color: #333;
}

.btn-github:hover, .btn-docs:hover {
    transform: translateY(-2px);
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 40px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-item i {
    font-size: 2rem;
    color: #306998;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

.detail-description, .detail-tags, .detail-meta, .detail-example {
    padding: 30px 40px;
    border-bottom: 1px solid #e9ecef;
}

.detail-description h2, .detail-tags h2, .detail-meta h2, .detail-example h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.detail-description p {
    line-height: 1.8;
    color: #555;
    font-size: 1.05rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-large {
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #306998;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.meta-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.meta-card i {
    font-size: 1.5rem;
    color: #306998;
}

.meta-card div {
    display: flex;
    flex-direction: column;
}

.meta-card strong {
    font-size: 0.85rem;
    color: #666;
}

.meta-card span {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.code-block {
    background: #2d2d2d;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 15px;
}

.code-block pre {
    margin: 0;
    padding: 20px;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.detail-navigation {
    padding: 30px 40px;
    text-align: center;
    background: #f8f9fa;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.error-message {
    text-align: center;
    padding: 60px 40px;
}

.error-message i {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 20px;
}

.error-message h2 {
    color: #333;
    margin-bottom: 15px;
}

.error-message p {
    color: #666;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        transition: left 0.3s;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .libraries-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .detail-title-section h1 {
        font-size: 1.8rem;
    }
    
    .detail-stats {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .detail-description, .detail-tags, .detail-meta, .detail-example {
        padding: 20px;
    }
    
    .meta-grid {
        grid-template-columns: 1fr;
    }
    
    .code-block {
        font-size: 0.8rem;
    }
}
