/* Clean Minimalist Modern Theme Tokens (Vercel / Linear Aesthetic) */
:root {
    /* Fresh Light Mode Default */
    --bg-main: #fafafa;
    --bg-card: #ffffff;
    --bg-card-hover: #f4f4f5;
    --bg-input: #ffffff;
    --bg-code: #09090b;
    --border-color: #e4e4e7;
    --border-hover: #d4d4d8;
    
    --btn-primary-bg: #09090b;
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: #f4f4f5;
    --btn-secondary-text: #18181b;
    --btn-secondary-border: #e4e4e7;
    
    --text-main: #09090b;
    --text-muted: #71717a;
    --text-dim: #a1a1aa;
    
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-subtle: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-card: 0 4px 6px -1px rgba(0,0,0,0.03);
}

/* Dark Mode Override */
[data-theme="dark"] {
    --bg-main: #09090b;
    --bg-card: #121215;
    --bg-card-hover: #18181b;
    --bg-input: #18181b;
    --bg-code: #000000;
    --border-color: #27272a;
    --border-hover: #3f3f46;
    
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #000000;
    --btn-secondary-bg: #18181b;
    --btn-secondary-text: #fafafa;
    --btn-secondary-border: #27272a;
    
    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    
    --shadow-subtle: none;
    --shadow-card: none;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography & Helpers */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.brand-accent {
    color: var(--text-muted);
    font-weight: 400;
}

/* Clean Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    height: 65px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.025em;
}

.brand-logo {
    width: 30px;
    height: 30px;
    background: var(--text-main);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-main);
    font-weight: 800;
    font-size: 0.95rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 450;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

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

/* Theme Toggle & Privacy Badges */
.theme-toggle-btn {
    background: var(--btn-secondary-bg);
    border: 1px solid var(--btn-secondary-border);
    color: var(--text-main);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.privacy-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--btn-secondary-bg);
    border: 1px solid var(--btn-secondary-border);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: help;
}

/* Strict Full Viewport Hero (Zero peeking) */
.hero-fullview {
    height: calc(100vh - 65px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
}

.hero-glow-bg { display: none; }

.hero-content {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-subtle);
}

.hero-title {
    font-size: 3.25rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.035em;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.55;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-btn {
    padding: 0.75rem 1.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: var(--shadow-card);
}

/* Tool Subpage Header Layout */
.tool-page-header {
    padding: 2.25rem 0 1.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.tool-page-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    transition: color 0.15s ease;
}

.tool-page-header .back-link:hover {
    color: var(--text-main);
}

.tool-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.tool-page-header .tool-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    max-width: 720px;
    text-align: left;
}

/* Tool Directory Section & Filter Controls Above Grid */
.tool-section-wrapper {
    padding: 5rem 0 6rem;
}

.filter-bar-container {
    max-width: 820px; /* Expanded container so pills sit in a single clean row */
    margin: 0 auto 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 680px;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}

.search-box input {
    width: 100%;
    padding: 0.9rem 1.2rem 0.9rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    box-shadow: var(--shadow-subtle);
    transition: all 0.15s ease;
}

.search-box input:focus {
    border-color: var(--border-hover);
}

.category-pills {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
}

.pill {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.pill:hover {
    color: var(--text-main);
    background: var(--bg-card-hover);
}

.pill.active {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-main);
    box-shadow: var(--shadow-subtle);
}

/* Tool Cards Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: all 0.15s ease;
}

.tool-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.tool-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.tool-info { flex-grow: 1; min-width: 0; }

.tool-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tool-tag {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.tool-badge-popular, .tool-badge-new {
    font-size: 0.675rem;
    background: var(--btn-secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.12rem 0.5rem;
    border-radius: 50px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}

.tool-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.tool-arrow {
    font-size: 1.1rem;
    color: var(--text-dim);
    transition: transform 0.15s ease, color 0.15s ease;
    align-self: flex-start;
    margin-top: 0.1rem;
}

.tool-card:hover .tool-arrow {
    transform: translateX(4px);
    color: var(--text-main);
}

/* Buttons */
.btn-primary, .btn-action {
    background: var(--btn-primary-bg) !important;
    color: var(--btn-primary-text) !important;
    border: 1px solid var(--btn-primary-bg) !important;
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
}

.btn-primary:hover, .btn-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--btn-secondary-bg) !important;
    color: var(--btn-secondary-text) !important;
    border: 1px solid var(--btn-secondary-border) !important;
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.btn-secondary:hover {
    border-color: var(--border-hover) !important;
    background: var(--bg-card-hover) !important;
}

/* Ad Placement Wrapper */
.ad-wrapper {
    margin: 3rem auto;
}

.ad-card {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    position: relative;
}

.ad-label {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ad-placeholder {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.no-results {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.hidden { display: none !important; }

/* Custom Sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border-color);
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-main);
    cursor: pointer;
}

/* About Section */
.about-section {
    padding: 4.5rem 0;
    border-top: 1px solid var(--border-color);
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-card);
}

.about-card h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item { text-align: center; }
.feature-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feature-item h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.feature-item p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; }

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    background: var(--bg-main);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand p {
    color: var(--text-dim);
    font-size: 0.825rem;
    margin-top: 0.3rem;
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: var(--text-main); }

@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-fullview { min-height: 70vh; padding: 2.5rem 0; }
    .tools-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .footer-content { flex-direction: column; text-align: center; }
}
