:root {
    --bg: #eef4ff;
    --bg-soft: #f8fbff;
    --card: #ffffff;
    --line: #d7e2f2;
    --text: #0f233f;
    --text-muted: #597194;
    --primary: #2e7dff;
    --primary-2: #13a5e7;
    --danger: #dc3545;
    --shadow-lg: 0 18px 40px rgba(16, 35, 63, 0.11);
    --shadow-md: 0 10px 26px rgba(16, 35, 63, 0.08);
    --radius-xl: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Lato", "Segoe UI", sans-serif;
    background:
        radial-gradient(1400px 460px at -10% -20%, #d5e6ff 0%, transparent 68%),
        radial-gradient(1200px 420px at 110% -20%, #d0e2ff 0%, transparent 66%),
        var(--bg);
    color: var(--text);
    line-height: 1.45;
}

body::before {
    content: "";
    position: fixed;
    inset: -15% auto auto -15%;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(44, 125, 255, 0.22) 0%, rgba(44, 125, 255, 0) 72%);
    pointer-events: none;
    z-index: -1;
}

.thinkogic-header,
.thinkogic-footer {
    width: min(1200px, 96vw);
    margin: 14px auto 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-md);
    padding: 16px 18px;
}

.thinkogic-footer {
    margin: 16px auto 22px;
    padding: 0;
}

.thinkogic-header-inner,
.thinkogic-footer-inner {
    display: grid;
    gap: 10px;
}

.thinkogic-header-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 12px;
}

.thinkogic-brand img {
    height: 44px;
    width: auto;
    display: block;
}

.header-menu-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid #b8cdf0;
    border-radius: 10px;
    background: #f4f9ff;
    color: #244f86;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.menu-icon {
    position: relative;
    width: 14px;
    height: 10px;
    border-top: 2px solid #2a5ea0;
    border-bottom: 2px solid #2a5ea0;
}

.menu-icon::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 2px solid #2a5ea0;
}

.thinkogic-header-inner.header-open .menu-icon {
    border-top-color: transparent;
    border-bottom-color: transparent;
}

.thinkogic-header-inner.header-open .menu-icon::before {
    transform: translateY(-50%) rotate(45deg);
}

.thinkogic-header-inner.header-open .menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    border-top: 2px solid #2a5ea0;
}

.header-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    justify-self: end;
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown > summary::-webkit-details-marker {
    display: none;
}

.dropdown > summary {
    list-style: none;
}

.dropdown-trigger,
.menu-link {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 11px;
    border: 1px solid #b8cdf0;
    background: #f4f9ff;
    color: #244f86;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.menu-link {
    text-decoration: none;
    justify-content: center;
}

.dropdown:hover .dropdown-trigger,
.dropdown[open] .dropdown-trigger,
.menu-link:hover {
    border-color: #8ab0e9;
    background: #edf5ff;
    color: #1c4479;
}

.dropdown-caret {
    font-size: 0.72rem;
    color: #4b6f9f;
    transition: transform 0.2s ease;
}

.dropdown[open] .dropdown-caret {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    padding: 7px;
    border: 1px solid #c7d9f2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(16, 35, 63, 0.14);
    display: grid;
    gap: 4px;
    z-index: 50;
}

.dropdown-menu a {
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    color: #244f86;
    font-size: 0.86rem;
    font-weight: 700;
}

.dropdown-menu a:hover {
    background: #f2f8ff;
    color: #183f74;
}

.all-tools-cta {
    text-decoration: none;
    color: #edf4ff;
    font-weight: 700;
    border: 1px solid #2f68c4;
    border-radius: 12px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.all-tools-cta:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.tool-shell {
    width: min(1180px, 94vw);
    margin: 24px auto 34px;
    display: grid;
    gap: 16px;
}

.tool-header {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 28px 14px 28px 14px;
    background:
        linear-gradient(120deg, #ffffff 0%, #f6faff 42%, #ecf5ff 100%);
    box-shadow:
        0 14px 34px rgba(16, 35, 63, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    padding: 14px 16px;
}

.tool-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    width: 220px;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, #2e7dff 0%, #13a5e7 100%);
}

.tool-header::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: -64px;
    top: -82px;
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(46, 125, 255, 0.2) 0%, rgba(46, 125, 255, 0.06) 42%, rgba(46, 125, 255, 0) 74%);
    pointer-events: none;
}

.tool-header > * {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    margin: 0 0 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 0.70rem;
    font-weight: 700;
    color: #2456a2;
    border: 1px solid #bdd1ef;
    border-radius: 999px;
    background: #f2f8ff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tool-header h1 {
    margin: 0 0 6px 0;
    font-size: clamp(1.65rem, 2.4vw, 2.35rem);
    letter-spacing: -0.02em;
}

.tool-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.hero-points {
    margin-top: 9px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.hero-point {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(117, 154, 211, 0.35);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 4px 10px rgba(27, 65, 118, 0.08);
    color: #305a92;
    font-size: 0.78rem;
    font-weight: 700;
}

.rating-badge {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid rgba(117, 154, 211, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 10px rgba(27, 65, 118, 0.09);
    color: #2b4f82;
    font-size: 0.84rem;
    font-weight: 700;
}

.rating-stars {
    color: #f5b300;
    letter-spacing: 0.02em;
}

.rating-score {
    color: #1d3c6f;
}

.rating-divider {
    color: #7b93bb;
}

.rating-count {
    color: #2f5289;
}

.card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 16px;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.card-head h2 {
    margin: 0;
    font-size: 1.01rem;
    letter-spacing: -0.01em;
}

.source-actions {
    display: flex;
    gap: 8px;
}

.drop-zone {
    border: 1px dashed #7ea3db;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
    margin-bottom: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.drop-zone.drag-over {
    border-color: #84a9ff;
    background: #e9f3ff;
}

.file-meta {
    display: block;
    margin-top: 6px;
    font-size: 0.84rem;
}

.code-area {
    width: 100%;
    min-height: 250px;
    border: 1px solid #b7cbeb;
    border-radius: 12px;
    background: #0c1a2f;
    color: #dbe8ff;
    font-family: "Lato", "Segoe UI", sans-serif;
    font-size: 0.93rem;
    line-height: 1.5;
    padding: 12px;
    resize: vertical;
}

.code-editor-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    min-height: 250px;
    border: 1px solid #b7cbeb;
    border-radius: 12px;
    background: #0c1a2f;
    overflow: hidden;
}

.code-line-numbers {
    margin: 0;
    padding: 12px 10px 12px 12px;
    min-width: 54px;
    border-right: 1px solid #21385f;
    color: #7b94bf;
    background: #0a1629;
    font-family: "Lato", "Segoe UI", sans-serif;
    font-size: 0.93rem;
    line-height: 1.5;
    text-align: right;
    user-select: none;
    overflow: hidden;
}

.code-area-input {
    border: 0;
    border-radius: 0;
    min-height: 250px;
    padding-left: 10px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 10px;
}

.options-note {
    margin: 0 0 10px 0;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.option-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #324a70;
    min-height: 38px;
}

.option-row-strict {
    padding: 7px 10px;
    border: 1px solid #a9c4ec;
    border-radius: 9px;
    background: #f2f8ff;
}

.actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 4px 0 2px;
}

.status-text {
    margin: 0 0 0 6px;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.status-text.success {
    color: #188548;
}

.status-text.error {
    color: #ba1f2f;
}

.btn {
    border: 1px solid #aec6ea;
    border-radius: 12px;
    padding: 9px 14px;
    font-weight: 600;
    cursor: pointer;
    color: #1f3f75;
    background: #f7fbff;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.btn:hover {
    border-color: #6d9ce7;
    background: #eef5ff;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    border-color: #2d71f0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: #f4f8ff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1f66e6 0%, #0f92cb 100%);
}

.history-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.history-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: #fafcff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.history-meta {
    min-width: 0;
}

.history-title {
    margin: 0;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-sub {
    margin: 3px 0 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.history-load {
    border: 1px solid #95b2e4;
    background: #f4f8ff;
    color: #1f3f75;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.78rem;
    white-space: nowrap;
}

.history-load:hover {
    border-color: #6f9fe8;
    background: #eaf3ff;
}

.testimonials-section h2 {
    margin: 0 0 8px 0;
    font-size: clamp(1.16rem, 1.6vw, 1.48rem);
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 14px;
}

.testimonials-section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 5px;
    height: 1.1em;
    border-radius: 999px;
    background: linear-gradient(180deg, #2e7dff 0%, #12a4e7 100%);
}

.testimonials-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
}

.testimonial-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfeff 0%, #f4f9ff 100%);
    box-shadow: 0 5px 14px rgba(24, 58, 108, 0.07);
    padding: 13px;
}

.testimonial-rating {
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #1d3e70;
}

.testimonial-rating span {
    color: #f5b300;
    letter-spacing: 0.02em;
}

.testimonial-text {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.58;
}

.testimonial-author {
    margin: 12px 0 0 0;
    color: #1e3f72;
    font-weight: 700;
    font-size: 0.92rem;
}

.testimonial-author span {
    display: block;
    margin-top: 3px;
    color: #5e7498;
    font-weight: 600;
    font-size: 0.82rem;
}

.seo-content-section h2 {
    margin: 0 0 8px 0;
    font-size: clamp(1.2rem, 1.7vw, 1.55rem);
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 14px;
}

.seo-content-section h2::before,
.seo-features-section h2::before,
.seo-intent-section h2::before,
.seo-technical-section h2::before,
.seo-best-practice-section h2::before,
.seo-faq-extended-section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 5px;
    height: 1.1em;
    border-radius: 999px;
    background: linear-gradient(180deg, #2e7dff 0%, #12a4e7 100%);
}

.seo-lead {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.seo-block-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 12px;
}

.seo-mini-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfeff 0%, #f4f9ff 100%);
    box-shadow: 0 5px 14px rgba(24, 58, 108, 0.07);
    padding: 13px;
}

.seo-mini-card h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #163a6d;
}

.seo-mini-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.seo-steps {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.6;
}

.seo-faq-list {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.seo-faq-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(24, 58, 108, 0.06);
    padding: 12px 13px;
}

.seo-faq-item h3 {
    margin: 0 0 6px 0;
    font-size: 0.98rem;
    color: #163a6d;
}

.seo-faq-item p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.seo-features-section h2,
.seo-intent-section h2,
.seo-technical-section h2,
.seo-best-practice-section h2,
.seo-faq-extended-section h2 {
    margin: 0 0 8px 0;
    font-size: clamp(1.16rem, 1.6vw, 1.48rem);
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 14px;
}

.seo-feature-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
}

.seo-feature-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfeff 0%, #f4f9ff 100%);
    box-shadow: 0 5px 14px rgba(24, 58, 108, 0.07);
    padding: 13px;
}

.seo-feature-card h3 {
    margin: 0 0 8px 0;
    font-size: 0.99rem;
    color: #163a6d;
}

.seo-feature-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.seo-intent-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 12px;
}

.seo-keyword-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.6;
}

.seo-tech-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
}

.seo-tech-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfeff 0%, #f4f9ff 100%);
    box-shadow: 0 5px 14px rgba(24, 58, 108, 0.07);
    padding: 13px;
}

.seo-tech-card h3 {
    margin: 0 0 8px 0;
    font-size: 0.99rem;
    color: #163a6d;
}

.seo-tech-card p {
    margin: 0 0 6px 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.seo-tech-card p:last-child {
    margin-bottom: 0;
}

.footer {
    background: #1A1A1A;
    color: #FFFFFF;
    padding: 48px 0 16px;
    border: 1px solid #2b2b2b;
    border-radius: 16px;
    box-shadow: none;
}

.footer-container {
    width: min(1200px, 94vw);
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.98rem;
}

.footer-links a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #93C5FD;
    text-decoration: underline;
}

.footer-separator {
    color: #666;
}

.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #333;
    font-size: 1.05rem;
    color: #999;
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 760px) {
    .thinkogic-header,
    .thinkogic-footer {
        width: 95vw;
        padding: 10px;
    }

    .thinkogic-header-inner {
        grid-template-columns: 1fr auto;
        gap: 10px;
        align-items: center;
    }

    .thinkogic-brand {
        grid-column: 1 / 2;
    }

    .header-menu-toggle {
        display: inline-flex;
        grid-column: 2 / 3;
        justify-self: end;
    }

    .header-menu {
        display: none;
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        flex-direction: column;
        grid-column: 1 / -1;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-trigger,
    .menu-link {
        width: 100%;
    }

    .dropdown-trigger {
        justify-content: space-between;
    }

    .menu-link {
        justify-content: flex-start;
    }

    .dropdown-menu {
        position: static;
        margin-top: 6px;
        box-shadow: none;
        border-color: #d3e1f5;
    }

    .dropdown-menu a {
        font-size: 0.84rem;
    }

    .all-tools-cta {
        display: none;
        grid-column: 1 / -1;
        justify-self: stretch;
        text-align: center;
    }

    .thinkogic-header-inner.header-open .header-menu {
        display: flex;
    }

    .thinkogic-header-inner.header-open .all-tools-cta {
        display: inline-flex;
        justify-content: center;
    }

    .tool-shell {
        width: 95vw;
        margin-top: 14px;
    }

    .tool-header {
        padding: 14px;
        border-radius: 18px 12px 18px 12px;
    }

    .tool-header::before {
        left: 14px;
        width: 150px;
    }

    .tool-header::after {
        width: 150px;
        height: 150px;
        right: -52px;
        top: -58px;
    }

    .hero-eyebrow {
        font-size: 0.70rem;
    }

    .hero-point {
        font-size: 0.76rem;
        padding: 6px 10px;
    }

    .rating-badge {
        width: 100%;
        justify-content: center;
        font-size: 0.84rem;
        gap: 8px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .seo-block-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid,
    .seo-feature-grid,
    .seo-intent-grid,
    .seo-tech-grid {
        grid-template-columns: 1fr;
    }

    .card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .source-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .btn {
        width: auto;
    }

    .actions-row .btn {
        flex: 1 1 140px;
    }

    .footer {
        padding: 32px 0 14px;
    }

    .footer-links {
        gap: 10px;
        font-size: 0.88rem;
    }

    .footer-bottom {
        font-size: 0.95rem;
    }
}
