/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-card: #1a1a1a;
    --bg-hover: #222222;
    --border-color: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6a6a6a;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Light Mode */
body.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-hover: #f1f3f5;
    --border-color: #e1e4e8;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.9);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

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

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-stats {
    display: flex;
    gap: 16px;
}

.stat-badge {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-badge #toolCount {
    color: var(--accent-primary);
    font-weight: 700;
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

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

.search-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 32px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.search-input {
    width: 100%;
    padding: 18px 56px 18px 56px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.pill {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pill:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.pill.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

/* Filters */
.filters-container {
    max-width: 800px;
    margin: 0 auto 24px;
    position: relative;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.filter-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.filter-badge {
    background: var(--accent-primary);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
}

.filters-panel {
    margin-top: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: none;
}

.filters-panel.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group:last-of-type {
    margin-bottom: 16px;
}

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: var(--bg-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.checkbox-label span {
    color: var(--text-secondary);
    font-size: 14px;
}

.clear-filters-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--danger);
}

/* Results Info */
.results-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 40px;
}

/* Tools Grid */
.tools-section {
    padding-bottom: 80px;
}

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

/* Tool Card */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.tool-card:hover::before {
    opacity: 1;
}

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

.tool-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.external-link-icon {
    font-size: 14px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.tool-card:hover .external-link-icon {
    opacity: 1;
}

.pricing-badge {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pricing-badge.free {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.pricing-badge.affordable {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.tool-summary {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-features {
    margin-bottom: 20px;
}

.features-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.tool-meta {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.meta-item {
    margin-bottom: 12px;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.meta-value {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.pros, .cons {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.pros {
    border-left: 3px solid var(--success);
}

.cons {
    border-left: 3px solid var(--danger);
}

.pros-cons-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pros .pros-cons-label {
    color: var(--success);
}

.cons .pros-cons-label {
    color: var(--danger);
}

.pros-cons-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-results p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 50px 0 40px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

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

    .tool-card {
        padding: 20px;
    }

    .category-pills {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .category-pills::-webkit-scrollbar {
        display: none;
    }

    .pill {
        flex-shrink: 0;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .nav-right {
        gap: 12px;
    }

    .nav-links {
        display: none;
    }

    .nav-stats {
        display: none;
    }

    .logo-text {
        font-size: 16px;
    }

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

    .nav-content {
        padding: 16px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .search-input {
        padding: 16px 48px 16px 48px;
        font-size: 14px;
    }

    .tool-card {
        padding: 16px;
    }

    .tool-name {
        font-size: 18px;
    }

    .tool-summary {
        font-size: 13px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Page Styles for About, Contact, Privacy */
.page-hero {
    padding: 60px 0 40px;
    text-align: center;
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .page-title {
    background: linear-gradient(135deg, #1a1a1a 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.page-content {
    padding: 40px 0 80px;
}

.content-section {
    max-width: 900px;
    margin: 0 auto 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
}

.content-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.content-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
}

.content-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 16px;
}

.content-section ul li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
}

.content-section ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

.content-section a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.content-section a:hover {
    opacity: 0.8;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-input option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-button {
    padding: 14px 32px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.mobile-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-links.active {
    display: flex;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .page-hero {
        padding: 40px 0 30px;
    }

    .page-title {
        font-size: 32px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .content-section {
        padding: 24px;
    }

    .content-section h2 {
        font-size: 24px;
    }

    .content-section h3 {
        font-size: 18px;
    }

    .navbar {
        position: relative;
    }

    .mobile-nav-links .nav-link {
        padding: 12px;
        border-radius: 8px;
        transition: background 0.2s ease;
    }

    .mobile-nav-links .nav-link:hover {
        background: var(--bg-hover);
    }
}
