* {
    margin: 0;
    padding: 0;
}

.logo {
    font-weight: 700;
    font-size: 35px;
    color: purple;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

.logo:hover {
    background-color: transparent;
    color: orchid;
}

.logo-icon {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

body {
    min-height: 100vh;
    background-color: lightgray;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    font-family: "Work Sans", sans-serif;
}

nav{
    background-color: white;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.1);
}

nav ul{
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li{
    height: 50px;
}

nav a{
    background: linear-gradient(180deg, orchid, darkslateblue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    height: 100%;
    padding: 0 30px;
    transition: opacity 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: black;
}

nav a:hover{
    opacity: 0.7;
}

nav li:first-child{
    margin-right: auto;
}

.sidebar{
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    z-index: 999;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 10px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar li{
    width: 100%;
}

.sidebar a{
    width: 100%;
}

.menu-button{
    display: none;
}

.centered-content-section{
    margin-top: 40px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
}

.centered-box {
    background-color: white;
    backdrop-filter: blur(6px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 20px;
    font-weight: 600;
    color: #343a40;
    min-height: 150px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.input, .textarea {
    display: flex;               /* horizontal layout */
    align-items: stretch;
    justify-content: center;     /* center group in the box */
    gap: 12px;                   /* space between input and counter */
    flex-direction: column;
}

.input input {
    width: 30ch;                 /* width for ~17 characters */
    max-width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 12px;
    backdrop-filter: blur(6px);
    background-color: rgba(255,255,255,0.8);
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: "Work Sans", sans-serif;
}

.textarea textarea {
    width: 30ch;
    height: 20ch;
    max-width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 12px;
    backdrop-filter: blur(6px);
    background-color: rgba(255,255,255,0.8);
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: "Work Sans", sans-serif;
}

.input input:focus, .textarea textarea:focus {
    border: 1px solid orchid;
    box-shadow: 0 0 10px rgba(186,85,211,0.3);
}

.vin-actions {
    display: flex;
    align-items: center;         /* button and counter side by side */
    gap: 12px;
}

.char-count {
    font-size: 14px;
    color: #555;
    min-width: 40px;   /* ensures counter doesn't collapse */
    text-align: left;  /* aligns numbers nicely */
}

.content-section{
    margin-top: 40px;
    margin-left: 40px;
    margin-right: 40px;
    padding: 20px;
    display: grid;
    gap: 20px;

    /* Automatically creates as many columns as fit side by side */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.box {
    background-color: white;
    backdrop-filter: blur(6px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 15px;
    font-weight: 600;
    color: #343a40;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Make model links look like normal text */
.box ul li a {
    text-decoration: none;
    color: inherit;          /* Uses normal text color */
    font-weight: 500;
    position: relative;
    transition: color 0.25s ease;
}

/* Subtle underline animation on hover */
.box ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.25s ease;
}

.box ul li a:hover {
    color: purple;          /* Hover color */
}

.box ul li a:hover::after {
    width: 100%;
}

/* Optional: smooth list item hover effect */
.box ul li {
    transition: transform 0.2s ease;
}

.box ul li:hover {
    transform: translateX(4px);
}


.box-header {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;

    /* Match the nav bar gradient */
    background: linear-gradient(180deg, orchid, darkslateblue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vehicle-summary{
    font-size: 24px;
    font-weight: bold;
}

.centered-box-decoding-results {
    font-size: 20px;
    font-weight: 100;
}

.country-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 5px; /* space between name and flag */
}

.field-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 5px 0;
    align-items: center;
}

.field-label {
    font-weight: bold;
}

/* Category lines */
.category-line {
    position: relative;
    text-align: center;
    margin: 20px 0 10px 0;
}

.category-line::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ccc;
    z-index: 1;
}

.category-line span {
    position: relative;
    background: #fff;
    padding: 0 10px;
    z-index: 2;
    font-weight: bold;
    color: #333;
}

.flag-medium {
    margin-left: 6px;
    border: 1px solid #999;
}

/* Match the style of links in the vehicle boxes */
.styled-link {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    position: relative;
    transition: color 0.25s ease;
}

.styled-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.25s ease;
}

.styled-link:hover {
    color: purple;
}

.styled-link:hover::after {
    width: 100%;
}

#engineDisplacementL::after {
    content: " L";
}

#enginePowerKw::after {
    content: " kW";
}

#engineTorqueNm::after {
    content: " Nm";
}

#assemblyFlag {
    font-size: 20px; /* adjust size if needed */
}


#Submit {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;

    /* Gradient background matching nav */
    background: linear-gradient(180deg, orchid, darkslateblue);
    color: white;
    transition: transform 0.2s, opacity 0.2s;
}

#Submit:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

#vehicleContainer {
    display: flex;
    flex-wrap: wrap;   /* allow boxes to wrap to next row on smaller screens */
    gap: 20px;         /* spacing between boxes */
}

#vehicleContainer .box {
    flex: 1 1 300px;   /* base width 300px, grow/shrink as needed */
    box-sizing: border-box;
}



@media (max-width: 800px){
    .hideOnMobile{
        display: none;
    }
    .menu-button{
        display: block;
    }
}
