/* =========================================================
   CVEWORKS - BASE64 ENCODER
   File: Base64_Encoder.css
   Light / Red / White visual identity
========================================================= */


/* =========================================================
   RESET / ROOT
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red: #c90000;
    --red-dark: #a90000;
    --red-light: #fff5f5;

    --dark: #202124;
    --text: #333333;
    --muted: #707070;

    --border: #e5e5e7;

    --success: #198754;
    --success-light: #effaf3;

    --error: #c62828;
    --error-light: #fff1f1;

    --neutral: #f7f7f8;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--text);
    background: #ffffff;

    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   GLOBAL CONTAINER
   PADRÃO CVEWORKS
========================================================= */

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
   PADRÃO CVEWORKS
========================================================= */

.site-header {
    position: relative;
    z-index: 100;

    background: #ffffff;

    border-bottom: 1px solid #e5e5e7;
}

.header-inner {
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   HEADER - LOGO
========================================================= */

.logo {
    display: inline-flex;
    align-items: center;

    gap: 10px;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    background: #c90000;
    color: #ffffff;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.5px;

    box-shadow: none;
}

.logo-name {
    color: #202124;

    font-size: 20px;
    font-weight: 800;

    line-height: 1;

    letter-spacing: -0.4px;
}

.logo-cve {
    color: #202124;
}

.logo-work {
    color: #c90000;
}


/* =========================================================
   HEADER - NAVIGATION
========================================================= */

.nav {
    display: flex;
    align-items: center;

    gap: 32px;
}

.nav a {
    color: #5f6368;

    font-size: 14px;
    font-weight: 600;

    transition:
        color 0.2s ease;
}

.nav a:hover {
    color: #c90000;
}


/* =========================================================
   AFFILIATE BANNER
========================================================= */

.affiliate-banner {
    width: min(1136px, calc(100% - 40px));

    margin: 15px auto;

    display: flex;
    justify-content: center;

    overflow: hidden;
}

.affiliate-banner a,
.affiliate-banner img {
    display: block;

    width: 100%;
}

.affiliate-banner img {
    max-width: 1136px;
    height: auto;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    padding: 58px 0 48px;

    text-align: center;

    background:
        linear-gradient(
            to bottom,
            #fff8f8,
            #ffffff
        );

    border-bottom: 1px solid #f0f0f0;
}

.badge {
    display: inline-block;

    margin-bottom: 16px;
    padding: 9px 16px;

    border: 1px solid #f3bcbc;
    border-radius: 999px;

    color: #c90000;
    background: #ffffff;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.hero h1 {
    margin-bottom: 14px;

    color: #202124;

    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;

    letter-spacing: -1.2px;
}

.hero h1 span {
    color: #d71920;
}

.hero p {
    max-width: 760px;

    margin: 0 auto;

    color: #707070;

    font-size: 16px;
}


/* =========================================================
   WORKSPACE SECTION
========================================================= */

.workspace-section {
    padding: 42px 0 30px;
}

.workspace {
    padding: 26px;

    background: #ffffff;

    border: 1px solid #efc9cb;
    border-radius: 16px;

    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.05);
}


/* =========================================================
   WORKSPACE TOP
========================================================= */

.workspace-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.section-label {
    display: inline-block;

    margin-bottom: 18px;
    padding: 9px 16px;

    color: #c90000;

    background: #ffffff;

    border: 1px solid #f3bcbc;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.workspace-top h2,
.section-heading h2,
.info-card h2,
.analysis-heading h2 {
    color: #202124;

    line-height: 1.2;
}

.workspace-top h2 {
    margin-top: 5px;

    font-size: 21px;
}

.workspace-top p,
.section-heading p,
.info-card p,
.privacy-card p {
    color: #707070;

    font-size: 14px;
}


/* =========================================================
   MODE SWITCH
========================================================= */

.mode-switch {
    display: flex;

    gap: 6px;

    padding: 4px;

    background: #f7f7f8;

    border: 1px solid #e5e5e7;
    border-radius: 10px;
}

.mode-btn {
    min-height: 40px;

    padding: 0 15px;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: #555555;

    cursor: pointer;

    font-size: 13px;
    font-weight: 700;
}

.mode-btn.active {
    color: #ffffff;
    background: #c90000;
}


/* =========================================================
   TOOL OPTIONS
========================================================= */

.tool-options {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin-bottom: 20px;
}

.option-field,
.check-option {
    padding: 12px;

    background: #ffffff;

    border: 1px solid #efc9cb;
    border-radius: 10px;
}

.option-field {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.option-field > span,
.check-option strong {
    color: #202124;

    font-size: 12px;
    font-weight: 800;
}

.option-field select {
    width: 100%;
    min-height: 38px;

    padding: 0 10px;

    background: #fafafa;
    color: #333333;

    border: 1px solid #d8d8d8;
    border-radius: 7px;

    outline: none;
}

.option-field select:focus {
    border-color: #c90000;

    box-shadow:
        0 0 0 3px rgba(201, 0, 0, 0.08);
}

.check-option {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    cursor: pointer;
}

.check-option input {
    margin-top: 4px;

    accent-color: #c90000;
}

.check-option span {
    display: flex;
    flex-direction: column;
}

.check-option small {
    color: #707070;

    font-size: 11px;
    line-height: 1.35;
}

.decode-option.is-hidden {
    display: none;
}


/* =========================================================
   QUICK ACTIONS
========================================================= */

.quick-actions {
    position: sticky;
    top: 12px;
    z-index: 45;

    margin: 0 0 18px;
    padding: 12px;

    background: rgba(255, 255, 255, 0.97);

    border: 1px solid #e9b7ba;
    border-radius: 12px;

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.06);

    backdrop-filter: blur(7px);
}

.quick-actions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 9px;
}

.quick-actions-head > div {
    display: flex;
    align-items: center;

    gap: 10px;
}

.quick-actions-head strong {
    color: #202124;

    font-size: 13px;
}

.quick-actions-head > span {
    color: #707070;

    font-size: 11px;

    text-align: right;
}

.quick-actions-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 8px;
}

.quick-action-btn {
    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 9px;

    padding: 8px 11px;

    background: #ffffff;
    color: #292929;

    border: 1px solid #c90000;
    border-radius: 8px;

    cursor: pointer;

    font-size: 12px;
    font-weight: 800;

    text-align: left;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.025);

    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.08s ease;
}

.quick-action-btn:hover,
.quick-action-btn.is-active {
    background: #c90000;
    color: #ffffff;

    box-shadow:
        0 5px 12px rgba(201, 0, 0, 0.16);
}

.quick-action-btn:active {
    transform: translateY(1px);
}

.quick-action-btn:focus-visible {
    outline: 3px solid rgba(201, 0, 0, 0.18);
    outline-offset: 2px;
}

.quick-action-icon {
    min-width: 31px;
    height: 27px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #fff5f5;
    color: #c90000;

    border-radius: 6px;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.2px;
}

.quick-action-btn:hover .quick-action-icon,
.quick-action-btn.is-active .quick-action-icon {
    background: #ffffff;
    color: #c90000;
}


/* =========================================================
   RESULT FLASH
========================================================= */

.editor-card.result-flash {
    animation: resultFlash 0.85s ease;
}

@keyframes resultFlash {

    0%,
    100% {
        box-shadow: none;
    }

    35% {
        box-shadow:
            0 0 0 4px rgba(201, 0, 0, 0.12),
            0 8px 22px rgba(201, 0, 0, 0.10);
    }

}


/* =========================================================
   EDITOR GRID
========================================================= */

.editor-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 20px;
}

.editor-card {
    min-width: 0;

    padding: 20px;

    background: #ffffff;

    border: 1px solid #efc9cb;
    border-radius: 12px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 14px;
}

.card-heading {
    display: flex;
    align-items: flex-start;

    gap: 11px;
}

.step-number {
    min-width: 32px;
    height: 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #fff5f5;
    color: #c90000;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 800;
}

.result-step {
    color: #ffffff;
    background: #c90000;
}

.card-heading h3 {
    color: #202124;

    font-size: 16px;
    line-height: 1.2;
}

.card-heading p {
    margin-top: 4px;

    color: #707070;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   MINI BUTTON / RESULT TYPE
========================================================= */

.mini-btn,
.result-type {
    min-height: 32px;

    padding: 0 10px;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 800;
}

.mini-btn {
    background: #ffffff;
    color: #444444;

    border: 1px solid #d8d8d8;

    cursor: pointer;
}

.mini-btn:hover {
    background: #fff5f5;
    color: #c90000;

    border-color: #c90000;
}

.result-type {
    display: inline-flex;
    align-items: center;

    background: #fff8f8;
    color: #8a4548;

    border: 1px solid #ead0d1;

    white-space: nowrap;
}


/* =========================================================
   EDITOR
========================================================= */

.editor {
    width: 100%;
    min-height: 280px;

    display: block;

    resize: vertical;

    padding: 16px;

    background: #fafafa;
    color: #202020;

    border: 1px solid #d9d9d9;
    border-radius: 10px;

    outline: none;

    font-family:
        Consolas,
        "Courier New",
        monospace;

    font-size: 14px;
    line-height: 1.65;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.editor:focus {
    background: #ffffff;

    border-color: #c90000;

    box-shadow:
        0 0 0 3px rgba(201, 0, 0, 0.10);
}

.editor::placeholder {
    color: #999999;
}

.output-editor {
    background: #f7f7f7;
}


/* =========================================================
   EDITOR STATS
========================================================= */

.editor-stats {
    display: flex;
    flex-wrap: wrap;

    gap: 8px 14px;

    margin-top: 8px;

    color: #777777;

    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   CARD FOOTER / BUTTONS
========================================================= */

.card-footer {
    display: flex;
    flex-wrap: wrap;

    gap: 9px;

    margin-top: 14px;
}

.btn {
    min-height: 42px;

    padding: 0 15px;

    border: 1px solid transparent;
    border-radius: 8px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: #c90000;

    border-color: #c90000;
}

.btn-primary:hover {
    background: #a90000;

    border-color: #a90000;
}

.btn-outline {
    color: #333333;
    background: #ffffff;

    border-color: #d6d6d6;
}

.btn-outline:hover {
    color: #c90000;
    background: #fff5f5;

    border-color: #c90000;
}


/* =========================================================
   STATUS MESSAGE
========================================================= */

.status-message {
    margin-top: 15px;
    padding: 11px 14px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.status-message.success {
    color: #198754;
    background: #effaf3;

    border: 1px solid #bde5ca;
}

.status-message.error {
    color: #c62828;
    background: #fff1f1;

    border: 1px solid #efc1c1;
}

.status-message.info {
    color: #665500;
    background: #fffbe9;

    border: 1px solid #eee0a6;
}


/* =========================================================
   SWAP
========================================================= */

.swap-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 18px;

    color: #707070;

    font-size: 12px;
}

.swap-btn {
    min-height: 38px;

    padding: 0 13px;

    background: #ffffff;
    color: #333333;

    border: 1px solid #d6d6d6;
    border-radius: 8px;

    cursor: pointer;

    font-size: 12px;
    font-weight: 700;
}

.swap-btn:hover {
    color: #c90000;
    background: #fff5f5;

    border-color: #c90000;
}

kbd {
    padding: 2px 5px;

    background: #ffffff;
    color: #555555;

    border: 1px solid #d4d4d4;
    border-bottom-width: 2px;
    border-radius: 4px;

    font-family: inherit;
    font-size: 11px;
}


/* =========================================================
   ANALYSIS PANEL
========================================================= */

.analysis-panel {
    margin-top: 24px;
    padding: 22px;

    background: #ffffff;

    border: 1px solid #efc9cb;
    border-radius: 14px;
}

.analysis-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 14px;
}

.analysis-heading h2 {
    margin-top: 5px;

    font-size: 21px;
}

.analysis-badges {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 14px;
}

.analysis-badge {
    min-height: 30px;

    display: inline-flex;
    align-items: center;

    padding: 0 10px;

    background: #fff5f5;
    color: #8b3438;

    border: 1px solid #efc9cb;
    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
}

.analysis-details {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;
}

.analysis-item {
    padding: 12px;

    background: #fafafa;

    border: 1px solid #e5e5e7;
    border-radius: 9px;
}

.analysis-item span {
    display: block;

    color: #888888;

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}

.analysis-item strong {
    display: block;

    margin-top: 3px;

    color: #222222;

    font-size: 12px;

    word-break: break-word;
}


/* =========================================================
   PREVIEW
========================================================= */

.preview-area {
    margin-top: 16px;
}

.preview-area h3 {
    margin-bottom: 8px;

    color: #202124;

    font-size: 14px;
}

.image-preview {
    display: block;

    max-width: 100%;
    max-height: 320px;

    background: #fafafa;

    border: 1px solid #e5e5e7;
    border-radius: 10px;
}

.text-preview {
    max-height: 280px;

    overflow: auto;

    padding: 14px;

    background: #f8f8f8;
    color: #222222;

    border: 1px solid #e5e5e7;
    border-radius: 10px;

    font:
        12px/1.55
        Consolas,
        "Courier New",
        monospace;

    white-space: pre-wrap;

    word-break: break-word;
}


/* =========================================================
   INFORMATION CARDS
========================================================= */

.info-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 20px;

    margin-top: 22px;
}

.info-card {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    padding: 22px;

    background: #ffffff;

    border: 1px solid #efc9cb;
    border-radius: 12px;
}

.info-icon {
    min-width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #fff5f5;
    color: #c90000;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 800;
}

.info-card h2 {
    margin-bottom: 7px;

    font-size: 18px;
}

.warning-card {
    border-color: #eebfc1;
}


/* =========================================================
   PRIVACY
========================================================= */

.privacy-card {
    display: flex;
    align-items: flex-start;

    gap: 13px;

    margin-top: 22px;
    padding: 16px 18px;

    background: #fff5f5;

    border-left: 4px solid #c90000;
    border-radius: 8px;
}

.privacy-icon {
    font-size: 18px;
}

.privacy-card strong {
    color: #202124;

    font-size: 14px;
}

.privacy-card p {
    margin-top: 3px;

    font-size: 13px;
}


/* =========================================================
   AFFILIATE SECTION
========================================================= */

.affiliate-section {
    padding: 64px 0;

    background: #f7f7f8;
}

.affiliate-box {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;

    padding: 38px 42px;

    background: #ffffff;

    border: 1px solid #e5e5e5;
    border-radius: 14px;

    box-shadow:
        0 3px 15px rgba(0, 0, 0, 0.035);

    overflow: hidden;
}

.affiliate-box::after {
    content: "";

    position: absolute;

    width: 260px;
    height: 260px;

    right: -120px;
    top: -130px;

    background: #d71920;

    border-radius: 50%;

    opacity: 0.035;

    pointer-events: none;
}

.affiliate-content {
    position: relative;
    z-index: 1;

    max-width: 760px;
}

.affiliate-box h2 {
    margin-top: 12px;

    color: #171717;

    font-size: 28px;
    line-height: 1.2;
}

.affiliate-box p {
    margin-top: 8px;

    color: #686868;

    font-size: 14px;
    line-height: 1.7;
}

.affiliate-button {
    position: relative;
    z-index: 1;

    flex-shrink: 0;

    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 0 20px;

    background: #d71920;
    color: #ffffff;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 800;

    box-shadow:
        0 5px 16px rgba(215, 25, 32, 0.18);

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.affiliate-button:hover {
    background: #bd151b;

    transform: translateY(-1px);
}


/* =========================================================
   FOOTER
   PADRÃO CVEWORKS - SOMENTE FAIXA INFERIOR
========================================================= */

.site-footer {
    margin-top: 20px;
    padding: 0;

    background: #ffffff;

    border-top: 1px solid #e4e4e6;
}

.footer-inner {
    min-height: 55px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 0;

    color: #92969a;

    font-size: 11px;
}

.site-footer p {
    margin: 0;

    color: #92969a;

    font-size: 11px;
    line-height: 1.6;
}

.site-footer a {
    color: #c90000;

    font-size: 11px;
    font-weight: 400;
}

.site-footer a:hover {
    text-decoration: underline;
}


/* =========================================================
   RESPONSIVE - 980px
========================================================= */

@media (max-width: 980px) {

    .tool-options {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .quick-actions-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .analysis-details {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =========================================================
   RESPONSIVE - 850px
========================================================= */

@media (max-width: 850px) {

    .workspace-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .editor-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 45px 0 38px;
    }

    .affiliate-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-actions {
        position: static;
    }

    .quick-actions-head {
        align-items: flex-start;
        flex-direction: column;

        gap: 4px;
    }

    .quick-actions-head > span {
        text-align: left;
    }

}


/* =========================================================
   RESPONSIVE - 700px
   PADRÃO DO CABEÇALHO / RODAPÉ
========================================================= */

@media (max-width: 700px) {

    .container {
        width: min(
            100% - 28px,
            1180px
        );
    }

    .header-inner {
        height: 64px;
        min-height: 64px;

        padding: 0;

        flex-direction: row;
        justify-content: space-between;
    }

    .nav {
        gap: 16px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;

        gap: 6px;
    }

}


/* =========================================================
   RESPONSIVE - 650px
========================================================= */

@media (max-width: 650px) {

    .affiliate-banner {
        width: calc(100% - 28px);
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 14px;
    }

    .workspace-section {
        padding: 28px 0 25px;
    }

    .workspace {
        padding: 18px;

        border-radius: 12px;
    }

    .tool-options {
        grid-template-columns: 1fr;
    }

    .editor-card {
        padding: 16px;
    }

    .card-header {
        gap: 8px;
    }

    .editor {
        min-height: 240px;

        padding: 14px;

        font-size: 13px;
    }

    .card-footer {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .btn {
        width: 100%;

        padding: 0 10px;
    }

    .quick-actions-grid,
    .analysis-details {
        grid-template-columns:
            1fr 1fr;
    }

    .swap-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .info-card {
        padding: 18px;
    }

    .affiliate-box {
        padding: 28px 24px;
    }

    .affiliate-box h2 {
        font-size: 23px;
    }

}


/* =========================================================
   RESPONSIVE - 520px
========================================================= */

@media (max-width: 520px) {

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .quick-action-btn {
        min-height: 42px;
    }

    .quick-actions {
        padding: 10px;
    }

}


/* =========================================================
   RESPONSIVE - 480px
   PADRÃO DO CABEÇALHO
========================================================= */

@media (max-width: 480px) {

    .nav a {
        font-size: 12px;
    }

    .logo-name {
        font-size: 18px;
    }

    .logo-badge {
        width: 36px;
        height: 36px;

        font-size: 11px;
    }

}


/* =========================================================
   RESPONSIVE - 420px
========================================================= */

@media (max-width: 420px) {

    .card-footer {
        grid-template-columns: 1fr;
    }

    .mode-switch {
        width: 100%;
    }

    .mode-btn {
        width: 50%;
    }

    .card-header {
        flex-direction: column;
    }

    .mini-btn {
        width: 100%;
    }

    .result-type {
        align-self: flex-start;
    }

}