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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    padding: 50px 0 30px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 1px solid #333;
}
header h1 { font-size: 2.5rem; margin-bottom: 8px; }
.tagline { color: #888; font-size: 1.1rem; }

/* Categories Nav */
.categories {
    padding: 20px 0;
    text-align: center;
    background: #111;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 10;
}
.cat-btn {
    display: inline-block;
    padding: 8px 18px;
    margin: 4px;
    background: #1a1a2e;
    color: #ccc;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.cat-btn:hover { background: #2a2a4e; color: #fff; }

/* Sections */
.category { margin: 40px 0; }
.category h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

/* Tool Cards */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.tool-card {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s;
}
.tool-card:hover { border-color: #4a9eff; }
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.tool-header h3 { font-size: 1.2rem; }
.tool-header h3 a.tool-link {
    color: #e0e0e0 !important;
    text-decoration: none !important;
    border-bottom: 1px dashed #555;
    transition: all 0.2s;
}
.tool-header h3 a.tool-link:hover {
    color: #4a9eff !important;
    border-bottom-color: #4a9eff;
}
.badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
}
.badge.free { background: #1a3a1a; color: #4ade80; }
.badge.paid { background: #3a2a1a; color: #fbbf24; }
.tool-card p { color: #999; font-size: 0.9rem; margin-bottom: 12px; }
.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.tool-meta a {
    color: #4a9eff;
    text-decoration: none;
}
.tool-meta a:hover { text-decoration: underline; }

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #222;
    color: #666;
    font-size: 0.85rem;
}
footer p + p { margin-top: 5px; }

/* Tool Detail Pages */
.logo-link {
    text-decoration: none;
    color: inherit;
}
.logo-link:hover {
    opacity: 0.9;
}
.tool-detail {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
}
.tool-header-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}
.tool-header-detail h1 {
    font-size: 2rem;
    margin-right: auto;
}
.tool-header-detail .rating {
    color: #fbbf24;
    font-size: 1rem;
}
.tool-overview, .tool-features, .tool-pricing, .tool-pros-cons {
    margin-bottom: 30px;
}
.tool-overview h2, .tool-features h2, .tool-pricing h2, .tool-pros-cons h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #4a9eff;
}
.tool-overview p {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.8;
}
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.pricing-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
}
.pricing-card h3 {
    color: #e0e0e0;
    margin-bottom: 10px;
}
.pricing-card .price {
    font-size: 1.5rem;
    color: #4ade80;
    margin-bottom: 15px;
}
.pricing-card ul {
    list-style: none;
    padding: 0;
}
.pricing-card li {
    padding: 5px 0;
    color: #999;
}
.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
.pros h3 { color: #4ade80; }
.cons h3 { color: #f87171; }
.pros ul, .cons ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}
.pros li, .cons li {
    padding: 8px 0;
    color: #aaa;
    border-bottom: 1px solid #222;
}
.tool-features ul {
    list-style: none;
    padding: 0;
}
.tool-features li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #aaa;
    border-bottom: 1px solid #222;
}
.tool-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}
.tool-pricing p {
    color: #aaa;
    font-size: 1rem;
}
.cta-section {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-primary {
    background: #4a9eff;
    color: #fff;
}
.btn-primary:hover {
    background: #3a8eef;
    transform: translateY(-2px);
}
.btn-secondary {
    background: #2a2a3e;
    color: #ccc;
}
.btn-secondary:hover {
    background: #3a3a4e;
    color: #fff;
}

@media (max-width: 640px) {
    header h1 { font-size: 1.8rem; }
    .tools-grid { grid-template-columns: 1fr; }
    .tool-detail { margin: 20px auto; padding: 20px; }
    .tool-header-detail h1 { font-size: 1.5rem; }
    .cta-section { flex-direction: column; }
    .btn-primary, .btn-secondary { text-align: center; }
}

/* Hero Section */
.hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    text-align: center;
    border-bottom: 1px solid #333;
}
.hero-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 700;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: #aaa;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Search Box */
.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 30px;
    gap: 10px;
}
.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #333;
    border-radius: 30px;
    background: #1a1a1a;
    color: #e0e0e0;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.search-input:focus {
    outline: none;
    border-color: #4a9eff;
}
.search-btn {
    padding: 14px 30px;
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}
.search-btn:hover {
    background: #3a8eef;
    transform: translateY(-2px);
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.cta-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
}
.cta-btn.primary {
    background: #4a9eff;
    color: #fff;
}
.cta-btn.primary:hover {
    background: #3a8eef;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 158, 255, 0.3);
}
.cta-btn.secondary {
    background: transparent;
    color: #4a9eff;
    border: 2px solid #4a9eff;
}
.cta-btn.secondary:hover {
    background: rgba(74, 158, 255, 0.1);
    transform: translateY(-3px);
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4a9eff, #9b51e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}
.stat-label {
    color: #888;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Popular Tools Section */
.popular-tools {
    padding: 50px 0;
    background: #111;
    border-bottom: 1px solid #222;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: #fff;
}
.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.popular-card {
    background: linear-gradient(135deg, #1a1a2e, #252540);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.popular-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.1), transparent);
    transition: left 0.5s;
}
.popular-card:hover {
    transform: translateY(-8px);
    border-color: #4a9eff;
    box-shadow: 0 15px 40px rgba(74, 158, 255, 0.2);
}
.popular-card:hover::before {
    left: 100%;
}
.popular-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}
.popular-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #fff;
}
.popular-card p {
    color: #999;
    margin-bottom: 15px;
    line-height: 1.6;
}
.popular-card .rating {
    display: inline-block;
    color: #fbbf24;
    font-size: 0.95rem;
}

/* Responsive for Hero and Popular */
@media (max-width: 640px) {
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 1rem; padding: 0 15px; }
    .search-box { flex-direction: column; }
    .search-input, .search-btn { width: 100%; }
    .stats { gap: 30px; }
    .stat-number { font-size: 2rem; }
    .cta-buttons { flex-direction: column; }
    .cta-btn { width: 100%; text-align: center; }
    .popular-grid { grid-template-columns: 1fr; }
}
