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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: #fff;
}

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

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
}

/* Hero */
.hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 14px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

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

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 40px;
}

.hero-search {
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 16px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    color: var(--gray-400);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--gray-800);
}

.search-box kbd {
    padding: 4px 8px;
    background: var(--gray-100);
    border-radius: 4px;
    font-size: 12px;
    color: var(--gray-600);
}

.hero-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tag-label {
    opacity: 0.8;
}

.tag {
    padding: 6px 14px;
    background: rgba(255,255,255,0.2);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.tag:hover {
    background: rgba(255,255,255,0.3);
}

/* Stats Bar */
.stats-bar {
    background: var(--gray-50);
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-200);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    color: var(--gray-600);
    margin-top: 4px;
}

/* Section */
.section {
    padding: 60px 0;
}

.section-alt {
    background: var(--gray-50);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.view-all:hover {
    color: var(--primary-dark);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary);
}

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

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--primary);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-featured {
    background: #fef3c7;
    color: #92400e;
}

.badge-free {
    background: #d1fae5;
    color: #065f46;
}

.badge-oss {
    background: #dbeafe;
    color: #1e40af;
}

.badge-official {
    background: #e0e7ff;
    color: #3730a3;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-desc {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray-500);
}

.card-category {
    padding: 4px 10px;
    background: var(--gray-100);
    border-radius: 4px;
}

.card-stars {
    font-weight: 600;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.category-emoji {
    font-size: 32px;
}

.category-name {
    font-weight: 600;
}

.category-count {
    font-size: 13px;
    color: var(--gray-500);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.blog-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.blog-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.blog-card p {
    color: var(--gray-600);
    margin-bottom: 12px;
}

.blog-date {
    font-size: 13px;
    color: var(--gray-500);
}

/* CTA */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.cta-content h2 {
    font-size: 40px;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 32px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* Ad Section */
.ad-section {
    padding: 40px 0;
    text-align: center;
}

/* Footer */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 60px 0 20px;
}

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

.footer-col h4 {
    color: #fff;
    margin-bottom: 16px;
}

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

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

.footer-col a {
    color: var(--gray-400);
    text-decoration: none;
    transition: 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

.footer-desc {
    color: var(--gray-400);
    line-height: 1.6;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-500);
}

/* Newsletter */
.newsletter-box {
    margin-top: 16px;
}

.newsletter-label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

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

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-700);
    border-radius: 6px;
    background: var(--gray-800);
    color: #fff;
    font-size: 14px;
    min-width: 0;
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--gray-500);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
}

.newsletter-note {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 6px;
}

.newsletter-success {
    color: var(--success);
    font-size: 14px;
    padding: 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
}
