:root {
    --bg-main: #ffffff;
    --bg-secondary: #f9fafb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #000000;
    --border: #e5e7eb;
    --radius: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease;
}

[data-theme="dark"] {
    --bg-main: #000000;
    --bg-secondary: #111111;
    --text-main: #ededed;
    --text-muted: #a1a1a1;
    --accent: #ffffff;
    --border: #333333;
    --shadow: 0 0 0 1px #333333;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.navbar {
    height: 64px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    background: var(--bg-main);
    z-index: 100;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-decoration: none;
}

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

header {
    text-align: center;
    margin-bottom: 4rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

header p {
    color: var(--text-muted);
    font-size: 1.25rem;
}

/* Ad Placements */
.ad-banner {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-height: 120px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    background: var(--bg-main);
}

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

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--text-main);
    color: var(--bg-main);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tool Detail View */
.detail-view {
    display: none;
    padding: 2rem 0;
}

.tool-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
}

button.primary {
    background: var(--accent);
    color: var(--bg-main);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

button.primary:hover {
    opacity: 0.9;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 1.25rem;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 1rem;
}

footer {
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 500;
}

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