:root {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --text: #172033;
    --muted: #687386;
    --primary: #315ee8;
    --primary-dark: #2449bd;
    --border: #e4e9f2;
    --accent: #eaf0ff;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button,
a,
input,
textarea {
    transition: border-color .2s, background .2s, color .2s;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.7px;
}

.logo-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-size: 19px;
}

.logo-dot {
    color: var(--primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
    font-size: 14px;
}

nav a:hover,
.back-link:hover {
    color: var(--primary);
}

.language-switch {
    display: flex;
    gap: 7px;
    align-items: center;
}

.hero {
    padding: 88px 0 72px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, #e5edff 0%, transparent 65%);
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 780px;
    margin: 16px auto;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.13;
    letter-spacing: -1.8px;
}

.hero p {
    max-width: 580px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 17px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 540px;
    margin: 32px auto 0;
    padding: 0 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: 0 8px 30px #17203308;
}

.search-box span {
    color: var(--muted);
    font-size: 24px;
}

.search-box input {
    width: 100%;
    min-height: 56px;
    border: 0;
    outline: 0;
    background: transparent;
}

.tools-section {
    padding-top: 24px;
    padding-bottom: 90px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 5px 0 0;
    font-size: 28px;
}

.tool-count {
    color: var(--muted);
    font-size: 14px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.tool-card {
    padding: 27px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 5px 18px #17203305;
    display: flex;
    flex-direction: column;
    min-height: 265px;
}

.tool-card:hover {
    border-color: #b8c8ff;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px #1720330b;
}

.tool-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: var(--accent);
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.tool-icon.large {
    margin: 0 auto 16px;
    width: 60px;
    height: 60px;
}

.tool-card h3 {
    margin: 21px 0 8px;
    font-size: 19px;
}

.tool-card p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 14px;
}

.tool-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.tool-link:hover {
    color: var(--primary-dark);
}

.empty-state {
    padding: 20px;
    color: var(--muted);
    text-align: center;
}

.tool-page {
    max-width: 850px;
    padding-top: 36px;
    padding-bottom: 80px;
}

.back-link {
    color: var(--muted);
    font-size: 14px;
}

.tool-intro {
    padding: 35px 0;
    text-align: center;
}

.tool-intro h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.2;
}

.tool-intro p {
    margin: 0;
    color: var(--muted);
}

.workspace {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px #17203306;
}

.workspace label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
}

.workspace textarea,
.workspace input {
    display: block;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfcff;
    color: var(--text);
    outline: none;
}

.workspace textarea {
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.6;
}

.workspace textarea:focus,
.workspace input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #315ee818;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.btn-primary,
.btn-secondary {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 11px 17px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.btn-primary {
    color: white;
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--bg);
}

.status {
    min-height: 24px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.stat-card {
    padding: 18px 8px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcff;
}

.stat-card strong,
.stat-card span {
    display: block;
}

.stat-card strong {
    font-size: 26px;
    color: var(--primary);
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
}

.qr-output {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    overflow-wrap: anywhere;
}

.qr-output img,
.qr-output canvas {
    max-width: 100%;
    height: auto;
}

.muted,
.privacy-note {
    color: var(--muted);
    font-size: 13px;
}

.privacy-note {
    margin-top: 20px;
    text-align: center;
}

.site-footer {
    padding: 35px 0;
    background: white;
    border-top: 1px solid var(--border);
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: var(--muted);
    font-size: 14px;
}

.footer-content small {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 760px) {
    .hero {
        padding: 60px 0 45px;
    }

    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-card {
        padding: 20px;
    }
}

@media (max-width: 520px) {
    .container {
        width: calc(100% - 28px);
    }

    .nav {
        min-height: 66px;
    }

    nav {
        gap: 12px;
        font-size: 12px;
    }

    .logo {
        font-size: 19px;
    }

    .logo-icon {
        width: 29px;
        height: 29px;
        margin-right: 4px;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .section-heading h2 {
        font-size: 24px;
    }

    .workspace {
        padding: 18px;
    }

    .stats-grid {
        gap: 7px;
    }

    .stat-card strong {
        font-size: 22px;
    }
}
[hidden] {
    display: none !important;
}

.seo-intro {
    max-width: 900px;
    margin: 48px auto;
    padding: 0 20px;
    line-height: 1.8;
}

.seo-intro h2 {
    margin-bottom: 12px;
}

.seo-intro p {
    max-width: 760px;
    color: var(--text-muted, #666);
}

/* Video to Audio Converter */
.audio-output {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
}

.audio-output[hidden] {
    display: none;
}

.audio-output audio {
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 16px 0;
}

#videoInput {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 12px 0 20px;
}

#quality {
    width: 100%;
    padding: 18px 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #F7F9FC;
    color: gray;
    font-size: 15px;
}

#videoStatus {
    margin-top: 16px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#videoStatus.error {
    color: #dc2626;
}

#convertVideo:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Static information pages */
.page-content {
    padding-top: 40px;
    padding-bottom: 60px;
    max-width: 900px;
}

.page-heading {
    margin-bottom: 36px;
    text-align: center;
}

.page-heading h1 {
    margin-bottom: 12px;
}

.page-heading p {
    color: #666;
    line-height: 1.7;
}

.content-section {
    margin-bottom: 30px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.content-section h2 {
    margin-top: 0;
    margin-bottom: 14px;
}

.content-section p {
    line-height: 1.8;
}

.content-section .btn {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
}

/* ========================================
   ToolBoxly - Privacy Policy Page
======================================== */

main.container:has(> h1) {
    max-width: 900px;
    margin: 40px auto;
    padding: 36px 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    color: #374151;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* Main title */
main.container:has(> h1) > h1 {
    margin: 0 0 12px;
    color: #111827;
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.25;
    font-weight: 750;
    letter-spacing: -0.7px;
}

/* Last updated */
main.container:has(> h1) > p:first-of-type {
    margin-bottom: 28px;
    padding: 12px 16px;
    background: #f3f6fb;
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    color: #4b5563;
    font-size: 14px;
}

/* Paragraphs */
main.container:has(> h1) p {
    margin: 0 0 18px;
    font-size: 15.5px;
    line-height: 1.85;
}

/* Section headings */
main.container:has(> h1) h2 {
    margin: 34px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 21px;
    line-height: 1.4;
    font-weight: 700;
}

/* Lists */
main.container:has(> h1) ul {
    margin: 14px 0 24px;
    padding-left: 25px;
}

main.container:has(> h1) li {
    margin-bottom: 16px;
    padding-left: 5px;
    line-height: 1.8;
}

main.container:has(> h1) li::marker {
    color: #2563eb;
}

/* Bold text */
main.container:has(> h1) strong {
    color: #111827;
    font-weight: 650;
}

/* Links */
main.container:has(> h1) a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

main.container:has(> h1) a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Keyboard accessibility */
main.container:has(> h1) a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
    border-radius: 3px;
}

/* Mobile responsive */
@media (max-width: 600px) {
    main.container:has(> h1) {
        margin: 20px 12px;
        padding: 24px 18px;
        border-radius: 12px;
    }

    main.container:has(> h1) > h1 {
        font-size: 27px;
    }

    main.container:has(> h1) h2 {
        margin-top: 28px;
        font-size: 19px;
    }

    main.container:has(> h1) p,
    main.container:has(> h1) li {
        font-size: 15px;
    }

    main.container:has(> h1) ul {
        padding-left: 20px;
    }
}

/* =====================================
   ToolBoxly - Contact Page
===================================== */

.contact-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 20px 64px;
    color: #374151;
}

.contact-hero {
    max-width: 720px;
    margin: 0 auto 42px;
    text-align: center;
}

.contact-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 13px;
    border-radius: 30px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact-hero h1 {
    margin: 0 0 16px;
    color: #111827;
    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.2;
    letter-spacing: -0.8px;
}

.contact-hero > p {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
    line-height: 1.8;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 28px;
}

.contact-info,
.contact-form-card {
    min-width: 0;
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
}

.contact-info {
    background: #f8fafc;
}

.contact-info h2,
.contact-form-card h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 23px;
    line-height: 1.4;
}

.contact-info > p,
.contact-form-intro {
    margin: 0 0 26px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.8;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 26px;
}

.contact-icon {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 19px;
    font-weight: 700;
}

.contact-info-item h3 {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 15px;
}

.contact-info-item p,
.contact-info-item a {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.contact-info-item a {
    color: #2563eb;
    text-decoration: none;
}

.contact-info-item a:hover {
    text-decoration: underline;
}

.contact-field {
    margin-bottom: 20px;
}

.contact-field label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.contact-field input,
.contact-field textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-field input {
    min-height: 46px;
}

.contact-field textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: #9ca3af;
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.contact-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 9px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-submit:hover {
    background: #1d4ed8;
}

.contact-submit:active {
    transform: translateY(1px);
}

.contact-submit:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

.contact-privacy-note {
    margin: 18px 0 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.8;
}

.contact-privacy-note a {
    color: #2563eb;
    text-decoration: none;
}

.contact-privacy-note a:hover {
    text-decoration: underline;
}

.contact-alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.contact-alert ul {
    margin: 0;
    padding-left: 20px;
}

.contact-alert-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
}

.contact-alert-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Responsive layout */
@media (max-width: 760px) {
    .contact-page {
        padding: 32px 14px 44px;
    }

    .contact-hero {
        margin-bottom: 28px;
    }

    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .contact-info,
    .contact-form-card {
        padding: 23px 19px;
        border-radius: 12px;
    }

    .contact-info h2,
    .contact-form-card h2 {
        font-size: 21px;
    }
}

/* =====================================
   ToolBoxly - Legal Pages
===================================== */

.legal-page {
    box-sizing: border-box;
    max-width: 900px;
    margin: 40px auto;
    padding: 36px 28px 44px;
    color: #374151;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    overflow-wrap: anywhere;
}

.legal-header {
    margin-bottom: 32px;
}

.legal-header h1 {
    margin: 0 0 18px;
    color: #111827;
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.3;
    letter-spacing: -0.6px;
}

.legal-updated {
    margin-bottom: 24px;
    padding: 12px 16px;
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    background: #f3f6fb;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.legal-page p,
.legal-page li {
    font-size: 15px;
    line-height: 1.9;
}

.legal-page p {
    margin: 0 0 18px;
}

.legal-section {
    margin-top: 32px;
}

.legal-section h2 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 21px;
    line-height: 1.5;
}

.legal-section ul {
    margin: 12px 0 22px;
    padding-left: 25px;
}

.legal-section li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.legal-section li::marker {
    color: #2563eb;
}

.legal-page a {
    color: #2563eb;
    text-decoration: none;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
}

.legal-page a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.legal-page a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
    border-radius: 3px;
}

.legal-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 11px 17px;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.legal-contact-link:hover {
    background: #1d4ed8;
}

.legal-contact-link:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .legal-page {
        margin: 20px 12px;
        padding: 25px 18px 30px;
        border-radius: 12px;
    }

    .legal-header h1 {
        font-size: 27px;
    }

    .legal-section {
        margin-top: 27px;
    }

    .legal-section h2 {
        font-size: 19px;
    }

    .legal-page p,
    .legal-page li {
        font-size: 14px;
        line-height: 1.85;
    }
}
/* Image Compressor */
.image-compressor-controls {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.image-compressor-controls input[type="file"],
.image-compressor-controls select,
.image-compressor-controls input[type="range"] {
    width: 100%;
}

.image-compressor-controls input[type="file"],
.image-compressor-controls select {
    padding: 12px;
    border: 1px solid #d7dce5;
    border-radius: 8px;
    background: #fff;
}

.image-compressor-controls button {
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
}

.image-compressor-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-compressor-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.compressed-image-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e0e5ed;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.compressed-image-card img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    margin: 12px 0;
    background: #f5f6f8;
    border-radius: 8px;
}

.compressed-image-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.image-compressor-note {
    margin-top: 24px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #626b7a;
}

@media (max-width: 600px) {
    .image-compressor-results {
        grid-template-columns: 1fr;
    }
}