html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --primary: #2563eb;
    --bg-gray: #f8fafc;
    --text-dark: #1e293b;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-gray);
    color: var(--text-dark);
}

/* Navbar Styling */
.navbar-custom {
    background: #0f172a; /* dark navy */
    padding: 12px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.nav-flex {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

    .nav-links a {
        color: #e2e8f0;
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
        padding: 6px 10px;
        border-radius: 6px;
        transition: all 0.3s ease;
    }

        /* Hover effect */
        .nav-links a:hover {
            background: #1e293b;
            color: #38bdf8;
        }

        /* Active link (optional) */
        .nav-links a.active {
            background: #38bdf8;
            color: #0f172a;
        }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        justify-content: center;
        gap: 10px;
    }

        .nav-links a {
            font-size: 14px;
            padding: 5px 8px;
        }
}

/* Tool Section */
.tool-canvas {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-top: 2rem;
}

/* Info Section Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.info-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.feature-list {
    list-style: none;
    padding: 0;
}

    .feature-list li {
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
    }

        .feature-list li::before {
            content: "✓";
            color: #10b981;
            font-weight: bold;
            margin-right: 10px;
        }

/* Footer */
.app-footer {
    margin-top: auto;
    padding: 2rem 0;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    color: #64748b;
}

.sql-app {
    background: #f6f8fb;
}

/* Gradient title */
.gradient-text {
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Toolbar */
.toolbar {
    border-radius: 12px;
}

.toolbar-group label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    display: block;
}

.divider {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
}

/* Highlight toggle */
.highlight label {
    color: #0d6efd;
    font-weight: 600;
}

/* Header */
.editor-header {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    background: #f9fafb;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
}

/* Editors */
.editor {
    flex: 1;
    border: none;
    padding: 16px;
    font-family: 'Cascadia Code', monospace;
    font-size: 14px;
    resize: none;
    outline: none;
}

    .editor.dark {
        background: #0f172a;
        color: #e2e8f0;
    }

/* Buttons */
.action-btn {
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .action-btn:hover {
        transform: translateY(-1px);
    }

/* Copy button */
.copy-btn {
    font-size: 12px;
}

/* Error box */
.error-box {
    border-left: 4px solid #dc3545;
}

.timeline {
    border-left: 2px solid #ccc;
    padding-left: 10px;
}

.timeline-item {
    margin-bottom: 10px;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.8s ease-out forwards;
}

    .animate-fadeIn.delay-200 {
        animation-delay: 0.2s;
    }

.custom-toolbar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.toolbar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toolbar-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
}

.v-divider {
    width: 1px;
    height: 32px;
    background-color: #dee2e6;
    margin: 0 10px;
}

.mode-switch {
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

    .mode-switch:has(input:checked) {
        background: #0d6efd20;
        border: 1px solid #0d6efd;
    }

.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 500px;
}

#inputEditor, #outputEditor {
    border: 1px solid #ccc;
    height: 100%;
}

.toolbar {
    margin-bottom: 10px;
}

.error {
    color: red;
    margin-top: 10px;
}

.query-builder-container {
    background-color: var(--bg);
    min-height: 100vh;
    padding: 2rem;
    font-family: 'Inter', sans-serif;
}

/* Horizontal Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 400px; /* Layout split */
    gap: 2rem;
    align-items: start;
}

/* Light backgrounds for icons/badges */
.bg-primary-soft {
    background-color: rgba(13, 110, 253, 0.1);
}

.bg-secondary-soft {
    background-color: #f8f9fa;
}

/* Icon Square */
.icon-square {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
}

/* Card Hover Animation */
.tool-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 16px;
}

.transition-up:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

/* Make the whole card clickable feel natural */
.tool-card .card-title {
    transition: color 0.2s;
}

.tool-card:hover .card-title {
    color: #0d6efd;
}

/* Modern Pagination */
.page-link {
    border: none;
    margin: 0 5px;
    border-radius: 8px !important;
}

.drop-zone {
    border: 2px dashed #007bff;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.img-box {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 8px;
}

    .img-box img {
        width: 100%;
        transition: 0.3s;
    }

.controls {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.settings-container {
    max-width: 900px;
    margin: 2rem auto;
    font-family: system-ui, -apple-system, sans-serif;
    color: #333;
}

/* Settings Panel */
.config-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Grid Layout */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

/* Image Cards */
.img-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: transform 0.2s, box-shadow 0.2s;
    aspect-ratio: 1 / 1;
}

    .img-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

.img-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .img-wrapper img {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

/* Hover Controls */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    padding: 8px;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.img-card:hover .card-overlay {
    opacity: 1;
}

/* Buttons */
.btn-generate {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 2rem;
    width: 100%;
    font-size: 1.1rem;
}

.icon-btn {
    flex: 1;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    font-size: 0.75rem;
}

    .icon-btn.delete:hover {
        background: #dc3545;
        color: white;
    }

    .icon-btn.rotate:hover {
        background: #007bff;
        color: white;
    }

.margin-control {
    width: 300px;
    margin: 20px 0;
    font-family: sans-serif;
}

.slider {
    width: 100%;
    appearance: none;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
}

    .slider::-webkit-slider-thumb {
        appearance: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #4CAF50;
        cursor: pointer;
        border: none;
    }

    .slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #4CAF50;
        cursor: pointer;
        border: none;
    }

.seo-footer {
    background-color: #f8f9fa; /* Light neutral background */
    padding: 60px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    border-top: 1px solid #e0e0e0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.seo-section h3 {
    color: #007bff; /* Primary brand color */
    font-size: 1.25rem;
    margin-bottom: 20px;
    position: relative;
}

    /* Accent line under headings */
    .seo-section h3::after {
        content: '';
        display: block;
        width: 40px;
        height: 3px;
        background: #007bff;
        margin-top: 8px;
    }

.seo-section p {
    line-height: 1.6;
    color: #666;
    font-size: 0.95rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

    .feature-list li {
        margin-bottom: 12px;
        font-size: 0.9rem;
        position: relative;
        padding-left: 20px;
        color: #555;
    }

        /* Custom Bullet points */
        .feature-list li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: #28a745;
            font-weight: bold;
        }

.step-list {
    list-style: none;
    padding: 0;
}

    .step-list li {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
        font-size: 0.9rem;
    }

    .step-list span {
        background: #007bff;
        color: white;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        margin-right: 12px;
        flex-shrink: 0;
    }

@media (max-width: 768px) {
    .seo-footer {
        padding: 40px 15px;
    }
}

.app-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-main);
}

/* Header */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        font-weight: 800;
    }

    .hero .arrow {
        color: var(--primary);
    }

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grid Layout */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 4rem;
}

@media (max-width: 900px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .action-bar {
        transform: rotate(0deg);
        padding: 1rem 0;
    }
}

/* Editor Cards */
.editor-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 0.75rem 1.25rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

textarea {
    width: 100%;
    min-height: 400px;
    padding: 1.25rem;
    background: transparent;
    border: none;
    color: #02152e;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
}

/* Buttons */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

    .btn-outline:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
}

    .btn-ghost:hover {
        color: var(--text-main);
        background: rgba(0, 191, 255);
    }

/* SEO Content */
.seo-content {
    border-top: 1px solid var(--border);
    padding-top: 3rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

    .seo-content h2, .seo-content h3 {
        color: var(--primary);
        margin-bottom: 1rem;
    }

    .seo-content p {
        line-height: 1.6;
        color: var(--text-muted);
    }

    .seo-content ul {
        list-style: none;
        padding: 0;
    }

    .seo-content li {
        margin-bottom: 0.5rem;
        padding-left: 1.5rem;
        position: relative;
        color: var(--text-muted);
    }

        .seo-content li::before {
            content: "✓";
            position: absolute;
            left: 0;
            color: var(--primary);
        }

.page-container {
    display: flex;
    min-height: 100vh;
}

.card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.badge {
    border-radius: 20px;
    padding: 0.5em 1em;
}

.progress {
    background-color: #e9ecef;
    border-radius: 10px;
}

/* Animation for the numbers */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-body strong {
    display: inline-block;
    animation: countUp 0.5s ease-out;
}

.keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    background: #f0f2f5;
    color: #4a5568;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

    .tag:hover {
        background: #007bff;
        color: white;
        cursor: default;
    }

/* Layout Core */
.dashboard-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden; /* Prevent body scroll */
    background: #f8f9fa;
}

/* Sidebar: Narrower and fixed */
.sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-right: 1px solid #dee2e6;
}

    .sidebar h5 {
        color: #ecf0f1;
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

/* Main Content: Takes remaining space */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important */
}

/* Insights Bar: Horizontal to save space */
.insights-bar {
    display: flex;
    gap: 20px;
    padding: 10px 20px;
    background: white;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
}

/* Tab Navigation */
.tabs-nav {
    display: flex;
    background: #fff;
    padding: 10px 20px 0;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    padding: 8px 20px;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

    .tab-btn.active {
        border-bottom-color: #0d6efd;
        color: #0d6efd;
    }

/* The Scrollable Log Area */
.tab-viewport {
    flex: 1;
    overflow: auto; /* This allows the log table to scroll */
    padding: 20px;
}

.log-table-wrapper {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.custom-log-table {
    margin-bottom: 0;
    font-family: 'Cascadia Code', 'Courier New', monospace; /* Monospace for logs */
    font-size: 0.85rem;
}

/* Logic for the message cell to wrap or handle long text */
.log-msg-cell {
    word-break: break-all;
    white-space: pre-wrap;
}

.json-viewer {
    background: #272822;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
}

/* Color Coding Rows */
.table-danger {
    background-color: #f8d7da !important;
}

.table-warning {
    background-color: #fff3cd !important;
}

/* Container */
.timeline-container {
    position: relative;
    padding: 25px;
    margin-left: 30px;
    border-left: 2px solid #d0d7de;
}

/* Individual items */
.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding-left: 35px;
}

    /* The "Dot" - White center with blue border */
    .timeline-item::before {
        content: "";
        position: absolute;
        left: -11px;
        top: 5px;
        width: 18px;
        height: 18px;
        background-color: #ffffff;
        border: 3px solid #0969da;
        border-radius: 50%;
        z-index: 1;
    }

    /* Timestamp */
    .timeline-item .time {
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        color: #57606a;
        margin-bottom: 5px;
    }

    /* Message Box */
    .timeline-item .msg {
        display: block;
        font-size: 0.9rem;
        color: #24292f;
        line-height: 1.5;
        background: #fcfcfc;
        padding: 12px 18px;
        border-radius: 8px;
        border: 1px solid #d0d7de;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Slight shadow for depth */
    }

    /* Color variations for Level dots */
    .timeline-item.error::before {
        border-color: #cf222e;
    }
    /* Soft red */
    .timeline-item.warn::before {
        border-color: #9a6700;
    }
    /* Soft gold/brown */
    .timeline-item.info::before {
        border-color: #0969da;
    }
    /* Blue */

    /* Hover state */
    .timeline-item:hover .msg {
        background: #f6f8fa;
        border-color: #8c959f;
    }

/* Container for the upload area */
.upload-container {
    position: relative;
    width: 100%;
}

/* The box styling */
.drag-drop-zone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background-color: #f8f9fa;
    transition: all 0.3s ease-in-out;
    text-align: center;
    overflow: hidden;
}

    .drag-drop-zone:hover {
        border-color: #0d6efd;
        background-color: #e9ecef;
    }

/* This makes the actual InputFile invisible but fully clickable over the box */
.file-input-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-content {
    z-index: 1;
}

    .upload-content i {
        display: block;
        margin-bottom: 5px;
    }

/* Font Monospace for the results */
.font-monospace {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
}

.hero {
    text-align: center;
    padding: 30px 10px;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    flex-wrap: wrap;
}

    .toolbar .btn {
        margin-right: 8px;
    }

.file-size {
    background: #f1f5f9;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    text-align: center;
    padding: 25px;
    margin-bottom: 20px;
    cursor: pointer;
    background: #f8fafc;
}

    .upload-box:hover {
        background: #eef2ff;
    }

.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.editor-panel {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 10px 12px;
    font-weight: 600;
    background: #f1f5f9;
    display: flex;
    justify-content: space-between;
}

.output-header {
    background: #111827;
    color: #10b981;
}

.editor {
    flex: 1;
    border: none;
    padding: 15px;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    resize: none;
}

    .editor.input {
        background: #ffffff;
    }

    .editor.output {
        background: #020617;
        color: #22c55e;
    }

.error-box {
    margin-top: 15px;
    padding: 12px;
    background: #fff7ed;
    border-left: 4px solid #f97316;
    border-radius: 6px;
}

/* Buttons */
.btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

    .btn.primary {
        background: #2563eb;
        color: white;
    }

    .btn.warning {
        background: #f59e0b;
        color: white;
    }

    .btn.info {
        background: #0ea5e9;
        color: white;
    }

    .btn.danger {
        background: #ef4444;
        color: white;
    }

    .btn.small {
        font-size: 12px;
        padding: 4px 8px;
    }

/* Responsive */
@media (max-width: 900px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
}

.mode-switch .btn {
    font-weight: 500;
    border-radius: 0;
}

    .mode-switch .btn:first-child {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    .mode-switch .btn:last-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }
