/* --- Global Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding-top: 70px; /* Offset for fixed header */
}

main {
    padding: 20px;
}

.container {
    max-width: 900px; /* Wider for tools */
    margin: 20px auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Header for the tool page */
.tool-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.tool-header h1 {
    margin: 0;
    color: #0056b3; /* A nice blue */
}

.tool-header p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 0;
}

/* For SEO content blocks */
.seo-content {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
.seo-content h2 {
    color: #333;
}
.seo-content p {
    color: #555;
    margin-bottom: 15px;
}
.seo-content code {
    background-color: #f1f3f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}
.seo-content ul {
    color: #555;
    padding-left: 20px; /* Indent lists */
}
.seo-content li {
    margin-bottom: 8px;
}
.seo-content ol {
    color: #555;
    padding-left: 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 0 20px;
    position: fixed; /* Fixed header */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0056b3;
    text-decoration: none;
    /* Added for SVG logo alignment */
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #007bff;
}

/* --- Mobile Menu --- */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s;
}

/* Responsive Styles (for mobile/tablet) */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide links by default */
        position: absolute;
        top: 70px; /* Below header */
        left: 0;
        right: 0;
        background-color: #fff;
        width: 100%;
        flex-direction: column;
        text-align: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex; /* Show when toggled */
    }

    .nav-links li {
        margin: 15px 0;
    }

    .menu-toggle {
        display: block; /* Show hamburger */
    }

    /* Animate hamburger to 'X' */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* --- Footer --- */
footer {
    background-color: #333;
    color: #ccc;
    padding: 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* === Blog Page (List) Styles === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
}
.blog-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes card content fill space */
}
.blog-card-content h3 {
    margin: 0 0 10px 0;
}
.blog-card-content h3 a {
    text-decoration: none;
    color: #0056b3;
}
.blog-card-content p {
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1; /* Pushes button to bottom */
}
.read-more {
    text-decoration: none;
    font-weight: bold;
    color: #007bff;
}

/* === Form & Tool Elements === */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

/* Default styles for all inputs/textareas */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="tel"], /* Added tel for contact */
input[type="checkbox"],
textarea,
select {
    width: 100%;
    padding: 12px;
    box-sizing: border-box; /* Important! */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fff;
    color: #333;
}

input[type="checkbox"] {
    width: auto;
    height: auto;
    padding: 0;
}


textarea {
    min-height: 200px;
    font-family: inherit;
}

/* Grid for forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* === Buttons === */
button,
.button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    text-decoration: none; /* For .button links */
    display: inline-block;
    text-align: center;
}
button.primary,
.button.primary {
    background-color: #007bff;
}
button.primary:hover,
.button.primary:hover {
    background-color: #0056b3;
}

/* Secondary button style */
button.secondary,
.button.secondary {
    background-color: #6c757d;
}
button.secondary:hover,
.button.secondary:hover {
    background-color: #5a6268;
}

/* Button Grid (for Case Converter, etc.) */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.utility-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

/* === Word Counter Results === */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.result-box {
    background-color: #f1f3f5;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}
.result-box h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #555;
    text-transform: uppercase;
}
.result-box span {
    font-size: 2em;
    font-weight: bold;
    color: #0056b3;
}

/* === BMI Calculator Styles === */
/* Toggles used by multiple tools */
.toggle-buttons {
    display: flex;
    margin-bottom: 20px;
}
.toggle-buttons button {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    color: #555;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 0;
    font-weight: normal; /* Override button default */
}
.toggle-buttons button:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
.toggle-buttons button:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border-left-width: 0px;
}
.toggle-buttons button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
}
.dual-input { /* For ft/in */
    display: flex;
    gap: 10px;
}
.hidden { /* Utility class */
    display: none !important;
}

.bmi-result-box {
    margin-top: 20px;
    padding: 25px;
    text-align: center;
    border-radius: 5px;
    background-color: #f1f3f5; /* Default background */
}
.bmi-result-box h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}
.bmi-result-box span {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 5px 0 10px 0;
    display: block;
}
.bmi-result-box strong {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

/* === Age Calculator Styles === */
.result-summary {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}
.result-summary h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.result-summary li {
    font-size: 1.1rem;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 8px;
}
.result-summary li strong {
    color: #0056b3;
}

/* === Loan Calculator Styles === */
.input-with-addon {
    display: flex;
}
.input-with-addon span {
    padding: 12px;
    background-color: #e9ecef;
    border: 1px solid #ccc;
    border-right: 0;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    font-weight: bold;
    color: #555;
}
.input-with-addon input,
.input-with-addon select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* === Percentage Calculator Styles === */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.calc-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.calc-card h3 {
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.calc-card p {
    color: #555;
    font-size: 0.9rem;
}
.calc-inputs {
    display: grid;
    grid-template-columns: 1fr auto; /* Default for 2 inputs + equals */
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}
.calc-card .calc-inputs button {
    padding: 12px 15px;
    font-size: 1.2rem;
}
/* Specific for 3-part input */
.calc-card .calc-inputs[data-cols="3"] {
    grid-template-columns: 1fr auto 1fr;
}
.calc-card .calc-inputs input {
    width: 100%; /* Ensure inputs fill grid cell */
}
.calc-result {
    font-size: 1.8em;
    font-weight: bold;
    color: #0056b3;
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    min-height: 30px;
}
.calc-result .increase { color: #28a745; }
.calc-result .decrease { color: #dc3545; }

/* === Tip Calculator Styles === */
.tip-calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.tip-percent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.tip-percent-grid button,
.tip-percent-grid input {
    width: 100%;
    padding: 12px 5px; /* Tighter padding */
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid #0056b3;
    background: #f1f3f5;
    color: #0056b3;
}
.tip-percent-grid button.active {
    background-color: #0056b3;
    color: white;
}
.tip-percent-grid input {
    border-style: dashed;
}
.tip-results {
    background-color: #0056b3;
    color: white;
    padding: 25px;
    border-radius: 8px;
}
.result-card-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.result-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #eee;
}
.result-card span.amount {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0;
}
.result-card p.breakdown {
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
    text-align: right;
}
/* Responsive Tip Calc */
@media (min-width: 768px) {
    .tip-calc-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* === Unit Converter Styles === */
.converter-category {
    margin-bottom: 30px;
}
.converter-category h2 {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.converter-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}
.converter-row span {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}
/* Responsive Unit Converter */
@media (max-width: 500px) {
    .converter-row {
        grid-template-columns: 1fr;
    }
    .converter-row span {
        transform: rotate(90deg);
        margin: -5px 0;
    }
}

/* === JSON Formatter & Developer Tools === */
.formatter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.formatter-col {
    display: flex;
    flex-direction: column;
}
.formatter-col textarea {
    flex-grow: 1; /* Make textareas fill height */
    min-height: 300px;
}
@media (min-width: 768px) {
    .formatter-grid {
        grid-template-columns: 1fr 1fr;
        min-height: 500px;
    }
}
/* Status box for success/error messages */
.status-box {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: bold;
}
.status-box:not(.hidden) {
    display: block;
}
.status-box.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}
.status-box.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* === Image/File Tools === */
.file-input-label {
    display: block;
    padding: 30px;
    background-color: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.2s, border-color 0.2s;
}
.file-input-label:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}
.file-input {
    display: none; /* Hide the actual input */
}
.image-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0;
}
@media (min-width: 600px) {
    .image-options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

input[type="range"] {
    width: 100%;
    padding: 0;
    /* Custom styles for range slider track */
    --slider-track-color: #e9ecef;
    --slider-thumb-color: #007bff;
    --slider-track-height: 8px;
    --slider-thumb-size: 20px;
    
    -webkit-appearance: none;
    appearance: none;
    height: var(--slider-track-height);
    background: var(--slider-track-color);
    border-radius: 5px;
    outline: none;
}
/* Chrome/Safari Thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: var(--slider-thumb-size);
    height: var(--slider-thumb-size);
    background: var(--slider-thumb-color);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px; /* (track_height - thumb_height) / 2 */
}
/* Firefox Thumb */
input[type="range"]::-moz-range-thumb {
    width: var(--slider-thumb-size);
    height: var(--slider-thumb-size);
    background: var(--slider-thumb-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}


.image-preview-box {
    margin-top: 20px;
    max-width: 100%;
    background: #f1f3f5;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
}
.image-preview-box img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 5px;
}
.image-result-info {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 15px;
}

/* === Base64 Output Textarea === */
/* Used by Image-to-Base64 and Base64-to-Image */
.base64-output {
    min-height: 250px; /* Taller textarea */
    font-size: 0.9rem; /* Smaller font for long strings */
    font-family: monospace;
    line-height: 1.5;
    word-break: break-all; /* Wrap the long string */
}

/* === Color Converter === */
.color-converter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 768px) {
    .color-converter-grid {
        grid-template-columns: 200px 1fr; /* Picker | Sliders/Inputs */
    }
}
.color-picker-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
input[type="color"] {
    width: 100%;
    height: 150px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    padding: 0;
    background-color: white; /* Fix for some browsers */
}
.color-preview {
    width: 100%;
    height: 50px;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #ccc;
}
.color-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.color-sliders .input-group {
    margin-bottom: 5px; /* Tighter spacing for sliders */
}

/* === Find and Replace Tool === */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}
.options-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}
.options-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    margin-bottom: 0;
}
/* Responsive Find/Replace Options */
@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
        align-items: flex-end;
    }
    .options-group {
        grid-column: span 2; /* Make options span full width */
    }
}

/* === Markdown Previewer === */
.markdown-preview {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 20px;
    min-height: 500px;
    height: 100%;
    box-sizing: border-box;
}
.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}
.markdown-preview h1 { font-size: 2em; }
.markdown-preview h2 { font-size: 1.5em; }
.markdown-preview h3 { font-size: 1.25em; }
.markdown-preview p {
    margin-bottom: 16px;
    line-height: 1.7;
}
.markdown-preview ul,
.markdown-preview ol {
    margin-bottom: 16px;
    padding-left: 2em;
}
.markdown-preview li {
    margin-bottom: 8px;
}
.markdown-preview code {
    font-family: monospace;
    background-color: #f1f3f5;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 0.9rem;
}
.markdown-preview pre {
    background-color: #f1f3f5;
    padding: 16px;
    border-radius: 5px;
    overflow-x: auto;
}
.markdown-preview pre code {
    padding: 0;
    background: none;
}
.markdown-preview blockquote {
    border-left: 4px solid #007bff;
    padding-left: 15px;
    color: #555;
    margin: 0 0 16px 0;
    font-style: italic;
}
.markdown-preview table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.markdown-preview th,
.markdown-preview td {
    border: 1px solid #ccc;
    padding: 8px 12px;
}
.markdown-preview th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* === Image Color Picker === */
.color-picker-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .color-picker-layout {
        grid-template-columns: 1fr 300px;
    }
}
#imageCanvas {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: crosshair;
}
.color-picker-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.color-preview-zoom {
    width: 100%;
    height: 200px;
    border: 2px solid #333;
    border-radius: 5px;
    /* This makes the pixel art sharp */
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background-color: #f1f3f5;
    /* Checkerboard background */
    background-image: 
        linear-gradient(45deg, #ccc 25%, transparent 25%), 
        linear-gradient(135deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%), 
        linear-gradient(135deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 0, 10px -10px, 0px 10px;
}
.color-value {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
}
.color-value label {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
}
.color-value input[type="text"] {
    font-family: monospace;
    font-size: 1.1rem;
    background: #fff;
    color: #0056b3;
    font-weight: bold;
}

/* === Hash Generator === */
.hash-result-box {
    display: flex;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 10px;
    align-items: center;
}
.hash-label {
    padding: 12px;
    font-weight: bold;
    color: #495057;
    background-color: #e9ecef;
    border-right: 1px solid #e9ecef;
    width: 80px;
    text-align: center;
    flex-shrink: 0;
}
.hash-output {
    flex-grow: 1;
    padding: 12px;
    font-family: monospace;
    font-size: 0.95rem;
    color: #0056b3;
    /* Allow long hash to wrap and break */
    word-break: break-all;
}
.hash-copy-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    flex-shrink: 0;
}

/* === CSS Gradient Generator === */
.gradient-generator-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 768px) {
    /* Controls | Preview */
    .gradient-generator-layout {
        grid-template-columns: 350px 1fr;
    }
}

.gradient-controls {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}
.gradient-controls h3 {
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.gradient-controls .input-group {
    margin-bottom: 20px;
}

/* Color picker inputs */
.color-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.color-input-group input[type="color"] {
    width: 50px;
    height: 50px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    flex-shrink: 0;
}
.color-input-group input[type="text"] {
    flex-grow: 1;
}

/* Gradient preview box */
.gradient-preview-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
#gradientPreview {
    width: 100%;
    min-height: 300px;
    border: 1px solid #ccc;
    border-radius: 8px;
    /* A checkerboard background for transparency */
    background-image: 
        linear-gradient(45deg, #ccc 25%, transparent 25%), 
        linear-gradient(135deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%), 
        linear-gradient(135deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 0, 10px -10px, 0px 10px;
}

#cssCodeOutput {
    min-height: 100px;
    font-family: monospace;
    font-size: 0.95rem;
    color: #0056b3;
    background: #f8f9fa;
}


/* === NEW: Blog Post (Full Page) Styles === */
.blog-post-container {
    /* Use the standard .container styles, but override max-width */
    max-width: 750px; /* Narrower for better reading */
    margin: 20px auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.blog-post-header {
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}
.blog-post-header h1 {
    font-size: 2.5rem;
    color: #333;
    line-height: 1.2;
    margin: 0 0 10px 0;
}
.post-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}
.post-figure {
    margin: 0 0 30px 0;
}
.post-figure img {
    width: 100%;
    border-radius: 8px;
}
.post-figure figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    margin-top: 10px;
}

/* Styles for the article content itself */
.post-content p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.7;
    margin-bottom: 20px;
}
.post-content h2,
.post-content h3,
.post-content h4 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}
.post-content h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.post-content h3 {
    font-size: 1.4rem;
}
.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}
.post-content li {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.7;
}
.post-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 20px;
    margin: 25px 0;
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
}
.post-content pre {
    background-color: #f1f3f5;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 0.95rem;
}
.post-content code {
    font-family: 'Courier New', Courier, monospace;
}
/* Handle inline code differently from code blocks */
.post-content p > code {
    background-color: #f1f3f5;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Responsive for post content */
@media (max-width: 768px) {
    .blog-post-header h1 {
        font-size: 2rem;
    }
    .post-content p, .post-content li {
        font-size: 1rem;
    }
}