/* Font Face Section */
@font-face {
    font-family: "Satoshi";
    src: url("fonts/Satoshi-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Satoshi";
    src: url("fonts/Satoshi-Medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Satoshi";
    src: url("fonts/Satoshi-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/* Global CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Visually Hidden (kept for screen readers only) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Body Section */
body {
    font-family: "Satoshi", sans-serif;
    letter-spacing: -0.6px;
    background-color: #FBEFEF;
}

body::-webkit-scrollbar {
    display: none;
}

/* Navbar Section */
.navbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    text-align: center;
    top: 0;
    width: 100%;
    padding: 12px 2%;
    font-size: 17px;
    background-color: #F9DFDF;
    border-bottom: 1px solid #CBCBCB;
    z-index: 99999;
}

/* Logo Section */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: auto;
    height: 30px;
}

.logo img:hover {
    animation: spin 2s infinite;
    cursor: pointer;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Menu Section */
.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2em;
}

.menu a {
    text-decoration: none;
    color: #2C3947;
}

.menu a:hover {
    color: #FE0A0B;
}

/* Star Button Section */
.star-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 8px 12px;
    cursor: pointer;
    background-color: #FE0A0B;
    color: white;
    border-radius: 50px;
}

.star-button .fa-star {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

.star-button:hover .fa-star {
    animation: spin 2s infinite;
    cursor: pointer;
}

/* Menu Toggle Section */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px 10px;
    font-size: 17px;
    background-color: #FE0A0B;
    color: white;
    border: 1px solid #FE0A0B;
    border-radius: 8px;
}

/* Container Section */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Form Section */
.form {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    transform: translate(0%, 25%);
}

.hero-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    min-width: 600px;
    max-width: 650px;
    height: auto;
}

.prediction {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 500px;
    max-width: 500px;
    padding: 12px;
    background-color: #F9DFDF;
    border: 1px solid #CBCBCB;
    border-radius: 10px;
}

/* Model Input Section */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    color: #2C3947;
    border-radius: 10px;
}

.input-group {
    width: 100%;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    font-family: "Satoshi", sans-serif;
    letter-spacing: -0.6px;
    font-size: medium;
    padding: 10px;
    background-color: white;
    color: #2C3947;
    border: 1px solid #CBCBCB;
    border-radius: 10px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border: 1px solid #2C3947;
}

.owner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
    border: none;
}

.owner input[type="radio"] {
    display: none;
}

.owner label {
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    cursor: pointer;
    font-size: medium;
    text-align: center;
    padding: 6px;
    background-color: white;
    color: #2C3947;
    border: 1px solid #CBCBCB;
    border-radius: 100px;
    transition: 0.3s all ease-in-out;
}

.owner input[type="radio"]:checked+label {
    background-color: #FE0A0B;
    color: white;
    border: 1px solid #FE0A0B;
}

/* Button Section */
.form-button {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.form-button button {
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    cursor: pointer;
    font-family: "Satoshi", sans-serif;
    letter-spacing: -0.6px;
    font-size: medium;
    text-align: center;
    padding: 10px;
    width: 100%;
    background-color: white;
    color: #2C3947;
    border: 1px solid #CBCBCB;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.form-button button i {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
}

.form-button button:hover {
    background-color: #FE0A0B;
    color: white;
    border: 1px solid #FE0A0B;
}

.form-button button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: white;
    color: #2C3947;
    border: 1px solid #CBCBCB;
}

/* Prediction Result */
.result-box {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-top: 10px;
    font-size: medium;
    color: #2C3947;
    word-wrap: break-word;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-top: 10px;
    font-size: medium;
    color: #2C3947;
    word-wrap: break-word;
}

.loading i {
    margin-right: 6px;
}

.result-success {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-top: 10px;
    font-size: medium;
    color: #0F7B21;
}

.result-error {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-top: 10px;
    font-size: medium;
    color: #FE0A0B;
}

/* Responsive Section */

/* Large Tablet / Small Laptop */
@media (max-width: 1100px) {

    .container {
        padding: 0 20px;
    }

    .form {
        flex-direction: column;
        gap: 30px;
        transform: translate(0, 120px);
    }

    .hero-image {
        flex: none;
    }

    .hero-image img {
        min-width: 0;
        max-width: 500px;
    }

    .prediction {
        width: 100%;
        max-width: 500px;
    }

}

/* Tablet */
@media (max-width: 768px) {

    * {
        -webkit-tap-highlight-color: transparent;
    }

    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
        background-color: #F9DFDF;
        border-bottom: 1px solid #CBCBCB;
    }

    .menu.open {
        display: flex;
    }

    .menu a {
        width: 100%;
        padding: 12px 20px;
        box-sizing: border-box;
    }

    .menu-toggle {
        display: flex;
    }

    .navbar {
        padding: 12px 20px;
        position: relative;
    }

    .form {
        flex-direction: column;
        gap: 30px;
        transform: translate(0, 20px);
    }

    .hero-image img {
        min-width: 0;
        max-width: 420px;
    }

    .prediction {
        width: 100%;
        max-width: 450px;
    }

    .owner {
        grid-template-columns: repeat(4, 1fr);
    }

}

/* Mobile */
@media (max-width: 600px) {

    * {
        -webkit-tap-highlight-color: transparent;
    }

    .container {
        padding: 0 16px;
    }

    .form {
        flex-direction: column;
        transform: translate(0, 20px);
        padding-bottom: 15px;
    }

    .hero-image img {
        max-width: 400px;
    }

    .prediction {
        max-width: 450px;
    }

    .owner {
        grid-template-columns: repeat(4, 1fr);
    }

    .owner label {
        font-size: small;
    }

    .form-button {
        flex-direction: row;
    }

    .form-button button {
        font-size: small;
    }

    .result-box,
    .loading,
    .result-success,
    .result-error {
        font-size: small;
    }

}