/* =========================================================
   CVEWORKS - SUBNET CALCULATOR
   Light / Red / White visual identity
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #f7f7f8;
    color: #202124;
    line-height: 1.6;
}

main {
    flex: 1 0 auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e7;
}

.header-content {
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: inherit;
    text-decoration: none;

    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex-shrink: 0;

    background: #c90000;
    color: #ffffff;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.logo-name {
    color: #202124;
}

.logo-name span {
    color: #c90000;
}


/* =========================================================
   NAVIGATION
========================================================= */

.navigation {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navigation a {
    padding: 0;

    color: #5f6368;
    background: transparent;
    border: 0;

    font-size: 14px;
    font-weight: 600;

    transition: color 0.2s ease;
}

.navigation a:hover {
    color: #c90000;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    padding: 78px 0 55px;

    text-align: center;

    background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
    overflow: hidden;
}

.hero::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    top: -280px;
    left: 50%;

    transform: translateX(-50%);

    background: #d71920;
    opacity: 0.05;

    border-radius: 50%;
}

.hero-badge {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-bottom: 20px;
    padding: 7px 14px;

    background: #fff1f1;
    border: 1px solid #ffd6d6;
    border-radius: 30px;

    color: #c4161c;

    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    position: relative;

    margin-bottom: 18px;

    color: #171717;

    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
}

.hero h1 span {
    color: #d71920;
}

.hero p {
    position: relative;

    max-width: 680px;
    margin: 0 auto;

    color: #666666;

    font-size: 18px;
    line-height: 1.65;
}


/* =========================================================
   CALCULATOR SECTION
========================================================= */

.generator-section {
    padding: 15px 0 75px;
    background: #f7f7f8;
}


/* =========================================================
   CALCULATOR CARD
========================================================= */

.generator-card {
    position: relative;

    max-width: 680px;

    margin: 0 auto;
    padding: 36px;

    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 18px;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.07);
}

.generator-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 35px;
    right: 35px;

    height: 4px;

    background: #d71920;
    border-radius: 0 0 6px 6px;
}


/* =========================================================
   CARD HEADER
========================================================= */

.card-header {
    margin-bottom: 28px;
    text-align: center;
}

.card-header h2 {
    margin-bottom: 8px;

    color: #171717;

    font-size: 25px;
    font-weight: 800;
}

.card-header p {
    color: #777777;
    font-size: 14px;
}


/* =========================================================
   INPUT CONTAINER
========================================================= */

.subnet-input-container {
    width: 100%;
    margin-top: 20px;
}

.subnet-input-container > label {
    display: block;

    margin-bottom: 9px;

    color: #333333;

    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   IPv4 INPUT
========================================================= */

.subnet-full-input {
    display: block;

    width: 100%;

    height: 54px;
    min-height: 54px;

    margin: 0;
    padding: 0 16px;

    background: #fafafa;

    border: 2px solid #dddddd;
    border-radius: 10px;

    color: #222222;

    font-family: "Courier New", monospace;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;

    outline: none;

    appearance: none;
    -webkit-appearance: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


/* =========================================================
   MASK / CIDR
========================================================= */

.subnet-input-row {
    display: flex;
    align-items: stretch;
    gap: 10px;

    width: 100%;
    margin: 0;
}

.subnet-input-row .password-input {
    display: block;

    flex: 1 1 auto;

    width: 100%;
    min-width: 0;

    height: 54px;
    min-height: 54px;

    margin: 0;
    padding: 0 16px;

    background: #fafafa;

    border: 2px solid #dddddd;
    border-radius: 10px;

    color: #222222;

    font-family: "Courier New", monospace;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;

    outline: none;

    appearance: none;
    -webkit-appearance: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


/* =========================================================
   INPUT FOCUS
========================================================= */

.subnet-full-input:focus,
.subnet-input-row .password-input:focus {
    background: #ffffff;
    border-color: #d71920;
    box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.08);
}


/* =========================================================
   INPUT PLACEHOLDER
========================================================= */

.subnet-full-input::placeholder,
.subnet-input-row .password-input::placeholder {
    color: #aaaaaa;
    opacity: 1;

    font-family: "Courier New", monospace;
    font-weight: 400;
}


/* =========================================================
   CALCULATE BUTTON
========================================================= */

.subnet-input-row .copy-button {
    flex: 0 0 auto;

    height: 54px;
    min-height: 54px;

    margin: 0;
    padding: 0 22px;

    background: #f1f1f1;

    border: 1px solid #dddddd;
    border-radius: 10px;

    color: #333333;

    font-size: 14px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}

.subnet-input-row .copy-button:hover {
    background: #fff1f1;
    border-color: #f2bcbc;
    color: #c4161c;
}

.subnet-input-row .copy-button:active {
    transform: scale(0.98);
}


/* =========================================================
   INPUT HELP
========================================================= */

.input-help {
    display: block;

    margin-top: 7px;

    color: #999999;

    font-size: 12px;
    line-height: 1.4;
}


/* =========================================================
   INPUT INFO
========================================================= */

.subnet-input-info {
    min-height: 24px;

    margin-top: 12px;
    padding: 0 2px;

    color: #188038;

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   ERROR
========================================================= */

.subnet-error {
    min-height: 22px;

    margin-top: 7px;

    color: #d71920;

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   RESULTS
========================================================= */

.subnet-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 10px;

    margin-top: 12px;
    padding-top: 20px;

    border-top: 1px solid #eeeeee;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    min-height: 58px;

    padding: 13px 15px;

    background: #fafafa;

    border: 1px solid #eeeeee;
    border-radius: 10px;
}

.result-item span {
    color: #666666;

    font-size: 13px;
    font-weight: 600;
}

.result-item strong {
    color: #171717;

    font-family: "Courier New", monospace;
    font-size: 14px;

    text-align: right;
    word-break: break-word;
}

.result-item:nth-child(1),
.result-item:nth-child(2) {
    background: #fff5f5;
    border-color: #ffd4d4;
}

.result-item:nth-child(1) strong,
.result-item:nth-child(2) strong {
    color: #d71920;
}


/* =========================================================
   CLEAR BUTTON
========================================================= */

.generate-button {
    width: 100%;
    height: 54px;

    margin-top: 24px;

    background: #d71920;
    border: none;
    border-radius: 10px;

    color: #ffffff;

    font-size: 15px;
    font-weight: 800;

    box-shadow: 0 5px 14px rgba(215, 25, 32, 0.20);

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

.generate-button:hover {
    background: #b9151b;
    box-shadow: 0 7px 18px rgba(215, 25, 32, 0.28);
}

.generate-button:active {
    transform: translateY(1px);
}


/* =========================================================
   ABOUT
========================================================= */

.about-section {
    padding: 70px 0;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
}

.about-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    margin-bottom: 18px;

    color: #171717;

    font-size: 28px;
    font-weight: 800;
}

.about-content > p {
    margin-bottom: 10px;

    color: #666666;

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   SECURITY NOTICE
========================================================= */

.security-notice {
    display: flex;
    align-items: flex-start;
    gap: 15px;

    margin-top: 30px;
    padding: 20px;

    background: #fff5f5;

    border: 1px solid #ffd4d4;
    border-left: 4px solid #d71920;
    border-radius: 10px;

    text-align: left;
}

.security-icon {
    font-size: 23px;
}

.security-notice strong {
    display: block;

    margin-bottom: 3px;

    color: #b9151b;
    font-size: 15px;
}

.security-notice p {
    margin: 0;

    color: #666666;
    font-size: 13px;
}


/* =========================================================
   SECTION LABEL
========================================================= */

.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;
}


/* =========================================================
   HACKERDNA AFFILIATE
========================================================= */

.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;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 46px;
    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);
}

.affiliate-button span {
    font-size: 18px;
}


/* =========================================================
   FOOTER
   SOMENTE A FAIXA FINA
========================================================= */

.site-footer {
    width: 100%;
    flex-shrink: 0;

    background: #ffffff;
    border-top: 1px solid #eeeeef;
}

.footer-bottom {
    width: 100%;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 0;

    color: #92969a;
    font-size: 11px;
}

.footer-bottom-inner a {
    color: #c90000;
}

.footer-bottom-inner a:hover {
    text-decoration: underline;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 700px) {

    .container {
        width: min(100% - 28px, 1180px);
    }

    .header-content {
        height: 64px;
    }

    .navigation {
        gap: 16px;
    }

    .hero {
        padding: 55px 0 35px;
    }

    .hero h1 {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 16px;
    }

    .generator-section {
        padding-top: 10px;
    }

    .generator-card {
        padding: 25px 20px;
        border-radius: 14px;
    }

    .generator-card::before {
        left: 20px;
        right: 20px;
    }

    .subnet-input-row {
        flex-direction: column;
    }

    .subnet-input-row .password-input {
        width: 100%;
        flex: none;
    }

    .subnet-input-row .copy-button {
        width: 100%;
    }

    .subnet-results {
        grid-template-columns: 1fr;
    }

    .about-section {
        padding: 50px 0;
    }

    .affiliate-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px;
    }

    .affiliate-button {
        width: 100%;
    }

    .footer-bottom-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {

    .navigation a {
        font-size: 12px;
    }

    .logo-name {
        font-size: 18px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .hero h1 {
        font-size: 31px;
    }

    .generator-card {
        padding: 22px 16px;
    }

    .card-header h2 {
        font-size: 22px;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .result-item strong {
        text-align: left;
    }

    .affiliate-box h2 {
        font-size: 24px;
    }
}