/*
=========================================================
TIBIAVISION WEB
MAIN STYLE
=========================================================
*/


/*
=========================================================
GLOBAL
=========================================================
*/

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    min-height: 100vh;

    background: #11161b;

    color: #f5f7fa;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 14px;

    line-height: 1.45;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}


/*
=========================================================
SIDEBAR
=========================================================
*/

.sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: 175px;

    padding: 22px 14px;

    background: #0d1217;

    border-right:
        1px solid #30363d;

    z-index: 100;
}


/*
=========================================================
LOGO
=========================================================
*/

.logo {
    margin-bottom: 30px;
}

.logo-title {
    color: white;

    font-size: 22px;

    font-weight: 900;

    line-height: 0.85;

    letter-spacing: 0.5px;
}

.logo-subtitle {
    margin-top: 10px;

    color: #23d56b;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 1.5px;
}


/*
=========================================================
NAVIGATION
=========================================================
*/

.sidebar nav {
    display: flex;

    flex-direction: column;

    gap: 7px;
}

.nav-button {
    display: block;

    width: 100%;

    min-height: 34px;

    padding: 9px 11px;

    border: 0;

    border-radius: 5px;

    background: #242b33;

    color: white;

    font-size: 12px;

    font-weight: 700;

    text-align: left;

    text-decoration: none;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.nav-button:hover {
    background: #303842;
}

.nav-button.active {
    background: #29bd5d;

    color: white;
}


/*
=========================================================
CONTENT
=========================================================
*/

.content {
    margin-left: 175px;

    width:
        calc(
            100% - 175px
        );

    min-height: 100vh;

    padding:
        42px 45px
        80px;

    background: #12171c;
}


/*
=========================================================
PAGES
=========================================================
*/

.page {
    display: none;

    max-width: 1080px;
}

.page.active-page {
    display: block;
}

.page h2 {
    margin: 0 0 8px;

    color: #ffffff;

    font-size: 26px;
}

.subtitle {
    margin:
        0 0 30px;

    color: #aebac8;

    font-size: 13px;
}


/*
=========================================================
HOME TOOL GRID
=========================================================
*/

.tool-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 15px;

    margin-top: 28px;
}

.tool-card {
    min-height: 120px;

    padding: 20px;

    border:
        1px solid #343c45;

    border-radius: 7px;

    background: #242a30;

    color: white;

    text-decoration: none;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

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

    border-color:
        #4a5663;

    background: #282f36;
}

.tool-card h3 {
    margin:
        0 0 12px;

    font-size: 15px;
}

.tool-card p {
    margin: 0;

    color: #b8c6d8;

    font-size: 13px;
}


/*
=========================================================
CALCULATOR CARD
=========================================================
*/

.calculator-card {
    margin-top: 25px;

    padding: 22px;

    border:
        1px solid #37404a;

    border-radius: 8px;

    background: #242a30;
}

.calculator-header {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.calculator-header h3 {
    margin:
        0 0 4px;

    color: white;

    font-size: 16px;
}

.calculator-header p {
    margin: 0;

    color: #aebac8;

    font-size: 12px;
}


/*
=========================================================
FORM
=========================================================
*/

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 16px;

    margin-bottom: 18px;
}

.form-field {
    display: flex;

    flex-direction: column;

    gap: 6px;
}

.form-field label {
    color: #b9c9db;

    font-size: 11px;

    font-weight: 700;
}

.number-input,
.select-input {
    width: 100%;

    min-height: 37px;

    padding: 8px 11px;

    border:
        1px solid #3b4652;

    border-radius: 5px;

    outline: none;

    background: #10161b;

    color: white;
}

.number-input:focus,
.select-input:focus {
    border-color: #22c55e;

    box-shadow:
        0 0 0 1px
        rgba(
            34,
            197,
            94,
            0.25
        );
}

.number-input::placeholder {
    color: #738195;
}


/*
=========================================================
BUTTONS
=========================================================
*/

.calculate-button {
    width: 100%;

    min-height: 39px;

    padding: 9px 14px;

    border: 0;

    border-radius: 4px;

    background: #29bd5d;

    color: white;

    font-weight: 800;
}

.calculate-button:hover {
    background: #30ca66;
}

.reset-button {
    padding: 8px 14px;

    border: 0;

    border-radius: 4px;

    background: #343c45;

    color: white;

    font-size: 11px;

    font-weight: 700;
}

.reset-button:hover {
    background: #414b56;
}

.calculator-error {
    min-height: 18px;

    margin-bottom: 8px;

    color: #ef7d7d;

    font-size: 12px;

    font-weight: 700;
}


/*
=========================================================
MANA GEM GRID
=========================================================
*/

.gem-grid {
    display: grid;

    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );

    gap: 13px;
}

.gem-card {
    padding: 14px;

    border:
        1px solid #39434d;

    border-radius: 7px;

    background: #1d2329;
}

.gem-header {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 12px;
}

.gem-icon-box {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        1px solid #35404a;

    border-radius: 5px;

    background: #10161b;
}

.gem-icon {
    max-width: 32px;
    max-height: 32px;

    image-rendering: pixelated;
}

.gem-name {
    color: white;

    font-size: 12px;

    font-weight: 800;
}


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

.result-grid,
.skill-result-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 15px;

    margin-top: 18px;
}

.result-card {
    padding: 20px;

    border:
        1px solid #39434d;

    border-radius: 7px;

    background: #242a30;
}

.primary-result {
    border-left:
        4px solid #29bd5d;
}

.result-label {
    color: #83b2dc;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 1px;
}

.result-value,
.item-large-value {
    margin-top: 6px;

    color: white;

    font-size: 26px;

    font-weight: 900;
}

.primary-result
.result-value,
.primary-result
.item-large-value {
    color: #2ed264;
}

.result-description {
    margin-top: 4px;

    color: #98a9bb;

    font-size: 11px;
}


/*
=========================================================
BREAKDOWN
=========================================================
*/

.breakdown-card {
    margin-top: 18px;

    padding: 20px;

    border:
        1px solid #39434d;

    border-radius: 7px;

    background: #242a30;
}

.breakdown-card h3 {
    margin:
        0 0 16px;

    font-size: 15px;
}

.breakdown-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding:
        9px 0;

    border-bottom:
        1px solid #39414a;

    color: #b5c5d7;

    font-size: 12px;
}

.breakdown-row:last-child {
    border-bottom: 0;
}

.breakdown-row strong {
    color: white;
}


/*
=========================================================
SKILL
=========================================================
*/

.skill-time {
    margin-top: 7px;

    color: #2ed264;

    font-size: 27px;

    font-weight: 900;
}


/*
=========================================================
MAGIC GEM RESULTS
=========================================================
*/

.magic-gem-grid {
    display: grid;

    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );

    gap: 13px;

    margin-top: 18px;
}

.magic-gem-card {
    padding: 14px;

    border:
        1px solid #39434d;

    border-radius: 7px;

    background: #242a30;
}

.magic-gem-value {
    margin-top: 10px;

    color: white;

    font-size: 24px;

    font-weight: 900;
}


/*
=========================================================
ITEM RESULT
=========================================================
*/

.item-result-area {
    margin-top: 18px;
}

.item-profile-card {
    display: flex;

    align-items: center;

    gap: 18px;

    min-height: 95px;

    padding: 18px;

    border:
        1px solid #39434d;

    border-radius: 7px;

    background: #242a30;
}

.item-profile-sprite {
    width: 62px;
    height: 62px;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        1px solid #39434d;

    border-radius: 6px;

    background: #10161b;
}

.item-profile-sprite img {
    max-width: 50px;
    max-height: 50px;

    image-rendering: pixelated;
}

.item-result-name {
    color: white;

    font-size: 20px;

    font-weight: 900;
}

.item-result-category {
    margin-top: 3px;

    color: #9eafc1;

    font-size: 11px;
}

.item-badges {
    display: flex;

    flex-wrap: wrap;

    gap: 5px;

    margin-top: 8px;
}

.item-badge {
    padding: 3px 7px;

    border-radius: 999px;

    font-size: 9px;

    font-weight: 900;
}

.item-badge.rare {
    background:
        rgba(
            216,
            169,
            62,
            0.15
        );

    color: #e8be5b;
}

.item-badge.quest {
    background:
        rgba(
            123,
            94,
            200,
            0.17
        );

    color: #b59aee;
}

.item-badge.djinn {
    background:
        rgba(
            46,
            210,
            100,
            0.12
        );

    color: #50dc80;
}


/*
=========================================================
ITEM VALUE GRID
=========================================================
*/

.item-value-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 15px;

    margin-top: 15px;
}

.custom-value-card {
    grid-column:
        1 / -1;
}

.custom-value-controls {
    display: grid;

    grid-template-columns:
        minmax(180px, 1fr)
        auto
        auto;

    gap: 8px;

    margin-top: 12px;
}

.custom-value-controls
.calculate-button {
    width: auto;
}


/*
=========================================================
TRADE NAV LINK
=========================================================
*/

.trade-nav-link {
    display: block;

    width: 100%;

    padding: 9px 11px;

    margin: 0;

    border: 0;

    border-radius: 5px;

    background: #242b33;

    color: white;

    font: inherit;

    font-size: 12px;

    font-weight: 700;

    text-align: left;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.trade-nav-link:hover {
    background: #303842;
}

.trade-nav-link.active {
    background: #29bd5d;

    pointer-events: none;
}


/*
=========================================================
HOME TRADE CARD
=========================================================
*/

.trade-tool-card {
    display: block;

    color: inherit;

    text-decoration: none;

    cursor: pointer;
}


/*
=========================================================
RESPONSIVE
=========================================================
*/

@media (max-width: 1100px) {

    .tool-grid {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }

    .gem-grid,
    .magic-gem-grid {
        grid-template-columns:
            repeat(
                3,
                1fr
            );
    }
}


@media (max-width: 760px) {

    .sidebar {
        position: relative;

        width: 100%;

        height: auto;
    }

    .content {
        margin-left: 0;

        width: 100%;

        padding: 25px 18px;
    }

    .tool-grid,
    .form-grid,
    .result-grid,
    .skill-result-grid,
    .item-value-grid {
        grid-template-columns:
            1fr;
    }

    .gem-grid,
    .magic-gem-grid {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }

    .custom-value-controls {
        grid-template-columns:
            1fr;
    }
}