:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-hover: #222633;
    --border: #2a2e3d;
    --text: #e4e6ed;
    --text-muted: #8b8fa3;
    --accent: #6c63ff;
    --accent-hover: #5a52e0;
    --accent-glow: rgba(108, 99, 255, 0.15);
    --green: #4ade80;
    --orange: #fb923c;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}
.logo span { color: var(--text); }
header nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: 0.9rem;
}
header nav a:hover { color: var(--text); }

/* Breadcrumb */
.breadcrumb {
    padding: 14px 0 0;
    font-size: 0.85rem;
}
.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-muted); margin: 0 8px; }
.breadcrumb .current { color: var(--text-muted); }

/* Ad slot */
.ad-slot {
    background: var(--surface);
    border-radius: 8px;
    padding: 8px 0;
    text-align: center;
    margin: 24px auto;
    max-width: 728px;
    min-height: 90px;
    overflow: hidden;
}

/* Tool page */
.tool-hero { padding: 24px 0 8px; }
.tool-hero h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.tool-hero p { color: var(--text-muted); font-size: 1rem; max-width: 650px; }

.tool-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 700px) {
    .tool-area { grid-template-columns: 1fr; }
    .tool-hero h1 { font-size: 1.4rem; }
}

textarea, input[type="text"] {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 14px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 220px;
    outline: none;
}
textarea:focus, input[type="text"]:focus { border-color: var(--accent); }
input[type="text"] { min-height: unset; }

label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.btn-row { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }

.status {
    font-size: 0.85rem;
    color: var(--green);
    min-height: 20px;
    margin-top: 6px;
}

/* Related tools */
.related-tools { padding: 40px 0; border-top: 1px solid var(--border); margin-top: 40px; }
.related-tools h2 { font-size: 1.2rem; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.related-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: block;
}
.related-card:hover { border-color: var(--accent); background: var(--surface-hover); }
.related-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.related-card p { font-size: 0.82rem; color: var(--text-muted); }

/* SEO content */
.seo-content { padding: 30px 0; border-top: 1px solid var(--border); margin-top: 30px; }
.seo-content h2 { font-size: 1.2rem; margin-bottom: 10px; }
.seo-content h3 { font-size: 1rem; margin: 16px 0 6px; color: var(--text); }
.seo-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; max-width: 750px; }

/* FAQ schema */
.faq-section { padding: 30px 0; border-top: 1px solid var(--border); }
.faq-section h2 { font-size: 1.2rem; margin-bottom: 16px; }
.faq-item { margin-bottom: 16px; }
.faq-item h3 { font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
.faq-item p { font-size: 0.88rem; color: var(--text-muted); }

footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 40px;
}

/* Homepage specific */
.hero { text-align: center; padding: 50px 0 30px; }
.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p { color: var(--text-muted); font-size: 1.15rem; max-width: 550px; margin: 0 auto; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 20px 0 40px;
}
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.tool-card:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}
.tool-card .icon {
    width: 42px; height: 42px;
    background: var(--accent-glow);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
}
.tool-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.tool-card p { color: var(--text-muted); font-size: 0.9rem; }
.tool-card .tag {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: 500;
}
