@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Rowdies:wght@300;400;700&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Space+Grotesk:wght@300..700&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Noto+Sans+JP:wght@100..900&family=Space+Grotesk:wght@300..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
}

body {
    background-color: #fff;
    color: #000000;
    overflow-x: hidden;
}

.header {
    width: 100%;
    position: relative;
    background-color: #34495e;
    padding: 10px 0;
}

.row {
    width: 100%;
    padding: 0 5%;
    position: relative;
}

.navbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
}

.navbar h1 {
    color: #fff;
    font-size: clamp(1.3em, 3vw, 1.6em);
    font-weight: bold;
    white-space: nowrap;
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 10px;
    flex-wrap: wrap;
}

.navbar ul li a {
    padding: 10px 18px;
    font-family: sans-serif;
    font-size: clamp(14px, 2vw, 16px);
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.navbar ul li a:hover {
    background-color: #59a8e4;
}

.data-input {
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    max-width: 1300px;
    width: 90%;
    padding: 50px 20px;
    margin: 0 auto;
    line-height: 1.6;
}

.content h1 {
    font-size: clamp(1.8em, 4vw, 2.4em);
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    color: #000000;
    text-align: center;
    margin-bottom: 30px;
}

.predictdata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    grid-column: 1 / -1;
    margin-top: 30px;
}

.card:first-of-type {
    margin-top: 0;
}

.card h3 {
    padding: 20px;
    display: flex;
    align-items: center;
    font-family: "Crimson Text", serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(18px, 3vw, 22px);
    margin-bottom: 15px;
}

.card h3 .icon {
    width: clamp(30px, 5vw, 40px);
    height: clamp(30px, 5vw, 40px);
    margin-right: 10px;
    flex-shrink: 0;
}

.form-row {
    display: flex;
    flex-direction: column;
}

.form-row label {
    padding: 4px;
    font-size: clamp(18px, 2.5vw, 21px);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 5px;
    color: #333;
}

.form-row select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    width: 100%;
    background-color: white;
    font-size: 16px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-row select:focus {
    outline: none;
    border-color: #5da7ed;
}

.form-row input[type="number"] {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    width: 100%;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-row input[type="number"]:focus {
    outline: none;
    border-color: #5da7ed;
}

.predict-button {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 50px;
}

.predict-button button {
    padding: 12px 44px;
    font-size: clamp(1.2em, 3vw, 1.5em);
    font-weight: 400;
    letter-spacing: 2px;
    background-color: #5da7ed;
    border-radius: 7px;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.predict-button button:hover {
    background-color: #4a96dc;
    transform: scale(1.05);
}

.predict-button p {
    padding: 10px;
    margin-top: 15px;
    font-size: clamp(13px, 2vw, 15px);
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 900;
    color: #333;
}

.result {
    padding: 30px 20px;
    margin-top: 50px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #f0e852;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result h2 {
    font-size: clamp(20px, 3vw, 24px);
    color: #333;
    margin-bottom: 15px;
}

.result p {
    font-size: clamp(16px, 2.5vw, 18px);
    color: #555;
    font-weight: bold;
    margin: 10px 0;
}

.footerclass {
    margin-top: 80px;
    background-color: #34495e;
    color: #ffffff;
    text-align: center;
    padding: 30px 5%;
    width: 100%;
}

.footerclass p {
    font-size: clamp(14px, 2vw, 16px);
    margin: 5px 0;
}

/* ===== MEDIA QUERIES ===== */

/* Large tablets and small laptops */
@media (max-width: 1024px) {
    .data-input {
        width: 95%;
        padding: 40px 20px;
    }

    .predictdata {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 18px;
    }

    .predict-button {
        margin-top: 40px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .navbar h1 {
        margin-bottom: 5px;
    }

    .navbar ul {
        justify-content: center;
        gap: 8px;
    }

    .data-input {
        padding: 30px 15px;
    }

    .content h1 {
        margin-bottom: 25px;
    }

    .predictdata {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .card {
        margin-top: 25px;
    }

    .card h3 {
        padding: 15px;
        font-size: 20px;
    }

    .form-row label {
        font-size: 19px;
    }

    .predict-button {
        margin-top: 35px;
    }

    .predict-button button {
        padding: 10px 35px;
    }

    .result {
        padding: 25px 15px;
        margin-top: 40px;
    }

    .footerclass {
        margin-top: 60px;
        padding: 25px 3%;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .row {
        padding: 0 3%;
    }

    .navbar {
        padding: 5px 0;
    }

    .navbar h1 {
        font-size: 1.3em;
    }

    .navbar ul {
        flex-direction: column;
        gap: 5px;
        width: 100%;
        align-items: center;
    }

    .navbar ul li {
        width: 100%;
        text-align: center;
    }

    .navbar ul li a {
        display: block;
        padding: 10px 20px;
        font-size: 14px;
    }

    .data-input {
        width: 95%;
        padding: 25px 10px;
    }

    .content h1 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .predictdata {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        margin-top: 20px;
    }

    .card h3 {
        padding: 12px;
        font-size: 18px;
    }

    .card h3 .icon {
        width: 30px;
        height: 30px;
    }

    .form-row label {
        font-size: 17px;
        margin-bottom: 4px;
    }

    .form-row select,
    .form-row input[type="number"] {
        padding: 8px;
        font-size: 15px;
    }

    .predict-button {
        margin-top: 30px;
    }

    .predict-button button {
        padding: 10px 30px;
        font-size: 1.1em;
        width: 90%;
        max-width: 280px;
    }

    .predict-button p {
        font-size: 12px;
        padding: 8px;
        margin-top: 10px;
    }

    .result {
        padding: 20px 12px;
        margin-top: 30px;
    }

    .result h2 {
        font-size: 18px;
    }

    .result p {
        font-size: 15px;
    }

    .footerclass {
        margin-top: 50px;
        padding: 20px 3%;
    }

    .footerclass p {
        font-size: 13px;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .navbar h1 {
        font-size: 1.2em;
    }

    .navbar ul li a {
        padding: 8px 15px;
        font-size: 13px;
    }

    .content h1 {
        font-size: 1.4em;
    }

    .card h3 {
        font-size: 16px;
        padding: 10px;
    }

    .form-row label {
        font-size: 16px;
    }

    .form-row select,
    .form-row input[type="number"] {
        padding: 7px;
        font-size: 14px;
    }

    .predict-button button {
        padding: 8px 25px;
        font-size: 1em;
    }

    .predict-button p {
        font-size: 11px;
    }

    .result h2 {
        font-size: 16px;
    }

    .result p {
        font-size: 14px;
    }
}

/* Landscape mode for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .data-input {
        padding: 20px 15px;
    }

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

    .navbar ul {
        flex-direction: row;
    }
}