* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 60px;
    padding-top: 60px;
}

.default-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.default-image {
    width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 10px;
    border: 2px solid #007bff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 80px;
    /* پدینگ پایین 80px */
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}


h1 {
    text-align: center;
    color: #1567ff;
    font-size: 20px;
}

.input-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
    font-size: 14px;
}

.input-box {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 8px;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

label {
    display: block;
    margin-bottom: 10px;
    color: #7a7a7a;
    font-size: 12px;
}

/* Spinner Hide */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input,
select {
    font-family: 'Vazir FD-WOL', 'Segoe UI', sans-serif;
    width: 100%;
    height: 40px;
    padding: 12px;
    background: #404040;
    border: 1px solid #555;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
}

select {
    padding: 0 12px 0;
}

.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 10px 0;
    flex-wrap: wrap;
}

.bodytypebutton,
.reset-btn {
    flex: 1;
    width: 80px;
    height: 50px;
    background: #04399b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
    font-family: 'Vazir FD-WOL', 'Segoe UI', sans-serif;
}

.bodytypebutton:hover {
    background: #0051b3;
    transform: translateY(-2px);
}

.reset-btn {
    background: #5a0808 !important;

}

.reset-btn:hover {
    background: #ae0b1b !important;
    transform: translateY(-2px);
}

.result-container {
    max-width: 100%;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
    align-items: center;
}

.result-box {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    display: block;

}

.reference-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.reference-tables .table {
    background: #252525;
    padding: 15px;
}

.reference-tables .table h3 {
    font-size: 16px;
    color: #00ccff;
    margin-bottom: 10px;
}

.reference-tables .table p {
    font-size: 14px;
    color: #aaa;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13px;
}

.result-table th,
.result-table td {
    padding: 12px;
    border: 1px solid #444;
    text-align: right;
}

/* tr:nth-child(6) td:nth-child(2),
tr:nth-child(7) td:nth-child(2) {
    background-color: rgba(0, 71, 133, 0.296);
} */

.result-table th {
    background-color: #3f44e47f;
    color: white;
}

.result-table tr:nth-child(even) {
    background-color: #383838;
}

.table {
    background: #2d2d2d;
    border-radius: 10px;
    margin: 20px 0;
    padding: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th,
td {
    padding: 15px;
    text-align: center;
    border: 1px solid #444;
}

th {
    background-color: #3f44e47f;
    color: white;
}

.full-width {
    grid-column: 1 / -1;
}

.small-note {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
    font-style: italic;
}

.body-image {
    width: 180px;
    height: auto;
    margin: 20px auto;
    display: block;
    border-radius: 10px;
    opacity: 0;
    border: 2px solid #007bff;
    transition: opacity 0.5s ease, transform 0.5s ease;
    /* افزودن transform */
    transform: scale(0.95);
    /* حالت اولیه */

}

.body-image.show {
    opacity: 1;
    opacity: 1;
    transform: scale(1);
    /* حالت نهایی */
}

.disclaimer {
    margin-top: 20px;
    color: #a6ff00;
    font-size: 0.9em;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #2d2d2d;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    margin: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ff4757;
}

@media (max-width: 768px) {
    .container {
        padding: 15px 15px 80px;
    }

    .input-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .input-box {
        width: 100%;
    }

    .input-box:nth-child(7) {
        /* شانه هفتمین اینپوت */
        grid-column: 1 / -1;
    }

    .reference-tables {
        grid-template-columns: 1fr;
    }

    .result-table th,
    .result-table td {
        padding: 8px;
        font-size: 14px;
    }

    .result-container,
    .default-content {
        grid-template-columns: 1fr;
    }

    .default-image {
        margin-top: 20px;
    }

    .modal-content {
        padding: 20px;
        width: 85%;
    }
}