/* =========================
   END PORTAL CALCULATOR
========================= */

.main-card {
    width: min(1000px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 60px;
}

.tool-description {
    margin-top: -8px;
    margin-bottom: 28px;

    text-align: center;

    color: #b8b8b8;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================
   INPUT CARD
========================= */

.input-card {
    padding: 28px;

    background:
        linear-gradient(
            135deg,
            #171d1d,
            #101515
        );

    border: 2px solid #397d79;
    border-radius: 12px;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.3),
        0 0 14px rgba(83, 189, 181, 0.06);
}

.throw-coords {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;

    align-items: end;
}

.throw-1 {
    margin-bottom: 26px;
    padding-bottom: 26px;

    border-bottom: 1px solid rgba(114, 213, 206, 0.18);
}

.throw-2 {
    margin-bottom: 26px;
}

.throw-title {
    grid-column: 1 / -1;

    margin: 0 0 2px;

    color: #72d5ce;
    font-size: 16px;

    text-shadow:
        0 0 6px rgba(114, 213, 206, 0.3);
}

.coord-container,
.angle-container {
    display: flex;
    flex-direction: column;
    gap: 8px;

    min-width: 0;
}

.coord-label {
    color: #dddddd;

    font-size: 12px;
}


/* =========================
   INPUTS
========================= */

.coord-input,
.angle-input {
    box-sizing: border-box;

    width: 100%;

    padding: 12px 14px;

    background-color: #101313;
    color: white;

    border: 1px solid #3d4f4e;
    border-radius: 8px;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.coord-input::placeholder,
.angle-input::placeholder {
    color: #707777;
}

.coord-input:hover,
.angle-input:hover {
    border-color: #4f6966;
}

.coord-input:focus,
.angle-input:focus {
    background-color: #121818;

    border-color: #72d5ce;

    box-shadow:
        0 0 0 2px rgba(114, 213, 206, 0.12);
}


/* Remove Number Input Arrows */

.coord-input::-webkit-outer-spin-button,
.coord-input::-webkit-inner-spin-button,
.angle-input::-webkit-outer-spin-button,
.angle-input::-webkit-inner-spin-button {
    margin: 0;

    -webkit-appearance: none;
}

.coord-input[type="number"],
.angle-input[type="number"] {
    appearance: textfield;
}


/* =========================
   CALCULATE BUTTON
========================= */

.calculate-button-container {
    display: flex;
    justify-content: center;

    margin-top: 4px;
}

.calculate-button {
    padding: 13px 24px;

    background:
        linear-gradient(
            135deg,
            #397d79,
            #2b625f
        );

    color: white;

    border: 2px solid #53bdb5;
    border-radius: 8px;

    font-size: 12px;

    cursor: pointer;

    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.calculate-button:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #459792,
            #34736f
        );

    border-color: #72d5ce;

    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(83, 189, 181, 0.2);
}

.calculate-button:active {
    transform: translateY(0);
}

.calculate-button.error {
    background:
        linear-gradient(
            135deg,
            #8f3535,
            #682626
        );

    border-color: #d95c5c;

    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.25),
        0 0 12px rgba(217, 92, 92, 0.22);
}

.calculate-button.error:hover {
    background:
        linear-gradient(
            135deg,
            #a33d3d,
            #772c2c
        );

    border-color: #ef7373;
}


/* =========================
   RESULTS CARD
========================= */

.results-card {
    position: relative;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;

    margin-top: 24px;
    padding: 26px;

    background:
        linear-gradient(
            135deg,
            #1d1b25,
            #131218
        );

    border: 2px solid #574d70;
    border-radius: 12px;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.28),
        0 0 14px rgba(126, 103, 165, 0.08);
}

.results-card.hidden {
    display: none;
}


/*--Result Title--*/

.result-title {
    grid-column: 1 / -1;

    margin-bottom: 6px;

    text-align: center;

    color: #b9a2df;
    font-size: 20px;

    text-shadow:
        0 0 7px rgba(185, 162, 223, 0.25);
}


/*--Coordinate Boxes--*/

.x-box,
.z-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    padding: 20px 18px;

    background:
        linear-gradient(
            135deg,
            #17151d,
            #100f14
        );

    border: 1px solid #49405e;
    border-radius: 9px;

    box-shadow:
        inset 0 0 12px rgba(185, 162, 223, 0.025);
}


/*--Coordinate Labels--*/

.box-title {
    position: relative;

    width: 80%;

    padding-bottom: 9px;

    color: #b9a2df;

    font-size: 16px;
    text-align: center;
    letter-spacing: 0.08em;
}

.box-title::after {
    content: "";

    position: absolute;

    bottom: 0;
    left: 50%;

    width: 100%;
    height: 1px;

    transform: translateX(-50%);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(185, 162, 223, 0.45),
            transparent
        );
}


/*--Coordinate Results--*/

.box-result {
    color: #ffffff;

    font-size: 26px;

    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.08);
}


/*--Result Disclaimer--*/

.disclaimer {
    grid-column: 1 / -1;

    margin-top: 4px;
    padding-top: 14px;

    text-align: center;

    color: #96919f;

    font-size: 10px;
    line-height: 1.6;

    border-top: 1px solid rgba(185, 162, 223, 0.12);
}


/* =========================
   QUICK STEPS
========================= */

.quick-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;

    margin-top: 38px;
}

.steps-title {
    grid-column: 1 / -1;

    margin: 0 0 6px;

    text-align: center;

    color: white;
    font-size: 18px;
}

.step-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    min-height: 75px;

    padding: 20px 16px;

    background:
        linear-gradient(
            135deg,
            #1b1b1d,
            #141416
        );

    border: 1px solid #3b3b40;
    border-radius: 10px;

    text-align: center;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.step-container:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #202124,
            #17181a
        );

    border-color: #55575d;

    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.22);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 38px;
    height: 38px;

    background-color: #1b2c2b;

    color: #72d5ce;

    border: 1px solid #397d79;
    border-radius: 50%;

    font-size: 13px;

    box-shadow:
        0 0 8px rgba(83, 189, 181, 0.08);
}

.step-description {
    display: block;
    flex: initial;

    color: #c5c5c5;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================
   GUIDE CARD
========================= */

.guide-card {
    box-sizing: border-box;

    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;

    column-gap: 18px;
    row-gap: 5px;

    width: 100%;

    margin-top: 30px;
    padding: 20px 22px;

    background:
        linear-gradient(
            90deg,
            rgba(106, 80, 39, 0.35),
            #252525 42%
        );

    border: 2px solid #78603b;
    border-radius: 12px;

    color: white;
    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.22);

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.guide-card-hook {
    grid-column: 1;
    grid-row: 1;

    color: #ddb86d;

    font-size: 15px;

    text-shadow:
        0 0 6px rgba(221, 184, 109, 0.22);
}

.guide-card-body {
    grid-column: 1;
    grid-row: 2;

    color: #b8b8b8;

    font-size: 12px;
    line-height: 1.5;
}

.guide-card-arrow {
    grid-column: 2;
    grid-row: 1 / 3;

    box-sizing: border-box;

    width: 42px;
    height: 42px;

    padding: 10px;

    background-color: rgba(106, 80, 39, 0.28);

    border: 1px solid #78603b;
    border-radius: 8px;

    object-fit: contain;

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.guide-card:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            90deg,
            rgba(128, 96, 43, 0.5),
            #292929 46%
        );

    border-color: #d1a85c;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.28),
        0 0 12px rgba(209, 168, 92, 0.2);
}

.guide-card:hover .guide-card-arrow {
    transform: translateX(3px);

    background-color: rgba(128, 96, 43, 0.42);

    border-color: #d1a85c;

    box-shadow:
        0 0 8px rgba(209, 168, 92, 0.12);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .main-card {
        width: min(100% - 20px, 1000px);

        padding-top: 28px;
    }

    .input-card {
        padding: 20px;
    }

    .throw-coords {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .results-card {
        grid-template-columns: 1fr;

        padding: 20px;
    }

    .result-title,
    .disclaimer {
        grid-column: 1;
    }

    .quick-steps {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .step-container {
        min-height: auto;

        padding: 18px;
    }

    .step-description {
        flex: initial;
    }

    .guide-card {
        padding: 18px;
    }

    .guide-card-arrow {
        width: 38px;
        height: 38px;

        padding: 9px;
    }
}