/* Core Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #f1f5f9;
    --secondary-hover: #e2e8f0;
    --danger-color: #fee2e2;
    --danger-text: #991b1b;
    --text-main: #0f172a;
    --text-light: #475569;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --border: #cbd5e1;
    --radius: 8px;
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

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

/* Header & Navigation */
header {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

/* Main Navigation Styles */
.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap; /* Allows stacking on mobile screens */
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    white-space: nowrap; /* Prevents text breaking onto two lines */
    transition: var(--transition);
}

.main-nav a.home-link {
    color: var(--text-main);
}

.main-nav a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    text-align: center;
    margin: 40px 0 30px;
}

h1 {
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.2;
}

.intro-text {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 750px;
    margin: 0 auto;
}

/* Tool UI */
.tool-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

@media(max-width: 600px) {
    .controls { flex-direction: column; gap: 15px; }
    h1 { font-size: 1.8rem; }
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

select {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    color: var(--text-main);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 140px;
}

.btn.primary { background: var(--primary-color); color: var(--white); }
.btn.primary:hover { background: var(--primary-hover); }

.btn.secondary { background: var(--secondary-color); color: var(--text-main); }
.btn.secondary:hover { background: var(--secondary-hover); }

.btn.danger { background: var(--danger-color); color: var(--danger-text); }
.btn.danger:hover { background: #fecaca; }

.results-box {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-family: monospace;
    resize: vertical;
    background: var(--bg-color);
    color: var(--text-main);
}

.disclaimer {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    background: #fffbeb;
    padding: 12px;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
}

/* Content & Typography */
.content-section { margin-bottom: 50px; }
.content-section h2 { margin: 35px 0 15px; font-size: 1.6rem; color: var(--text-main); }
.content-section h3 { margin: 25px 0 10px; font-size: 1.2rem; color: var(--text-main); }
.content-section p { margin-bottom: 15px; color: var(--text-light); }
.content-section strong { color: var(--text-main); }

.use-cases { margin-left: 20px; margin-bottom: 20px; color: var(--text-light); }
.use-cases li { margin-bottom: 8px; }

/* FAQ Grid */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

.faq-item {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.faq-item h3 { margin-top: 0; }

/* Related Tools Grid */
.related-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.tool-card {
    display: block;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.tool-card h3 { font-size: 1.1rem; margin: 0 0 8px 0; color: var(--primary-color); }
.tool-card p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* Internal Linking Highlight */
.internal-link-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    margin: 40px 0;
}
.internal-link-box h2 { margin-top: 0; color: #1e3a8a; }
.internal-link-box a {
    display: inline-block;
    margin-top: 15px;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
}
.internal-link-box a:hover { background: var(--primary-hover); }

/* Footer */
footer {
    background: var(--white);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}