.header {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #002332;
    padding: 31.9px 40px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.header.hidden {
    transform: translate(-50%, -150%);
}

.logo {
    max-width: 5.79%;
    height: auto;
    margin-right: 957px;
}


.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: auto;
    position: absolute;
    left: 58%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.nav a {
    font-size: 17px;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #d3d3d3;    

}

body {
    margin-top: 150px;
}

html, body {
    overflow-x: hidden;
    overflow-y: scroll;
    height: 100%;
    scroll-behavior: smooth;
}


.container {
    display: none;
    background-color: #ffffff;   
    width: 970px;
    max-width: 970px;
    padding: 25px;
    border-radius: 6px;
    position: relative;
    left: 50%;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
    transition: opacity 0.5s ease-in-out;
    margin-bottom: 100px;
    margin-top: 50px;

}

.container.active {
    display: block;
    opacity: 1;
}

.switch-btn {
    position: absolute;
    top: 26px;
    right: 50px;
    background-color: #0545ac;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 8px;
    min-width: 80px;
    transition: background 0.3s, color 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.switch-btn:hover {
    background-color: #00264C;
}

html {
    scroll-behavior: smooth;
}

input {
    display: block;
    margin: 10px auto;
    padding: 8px;
    min-width: 250px;
    width: 75%;
    max-width: 400px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 500; /* ✅ Only affects user input */
    text-align: center;
    margin-bottom: 5px;
    transition: box-shadow 0.2s ease-in-out, border 0.3s ease-in-out;
}

input::placeholder {
    font-weight: 400;
    font-style: italic;
}

input:hover,
input:focus {
    outline: none;
    box-shadow: 4px 4px 1px 1px #ECF3FF;
}

.output-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #E3F2FD;
    padding: 8px;
    border-radius: 6px;
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
    font-size: 13px;
    white-space: normal;
    max-width: 65%;
    margin-top: 50px;
    overflow: hidden;
    margin-left: auto;  
    margin-right: auto; 
}

.output-container p {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 30px);
    padding-left: 50px;
}

.output-container i {
    font-size: 18px;
    color: #126CFF;
    cursor: pointer;
    transition: color 0.3s ease;
    flex-shrink: 0;
    margin-right: 20px;
}

.output-container i:hover {
    color: #005BB5;
}


@media screen and (max-width: 1024px) {
    .header {
        flex-direction: column;
        padding: 15px 10px;
        text-align: center;
        height: auto;
    }

    .logo {
        max-width: 20%;
        height: auto;
        margin-right: 0;
    }

    .nav {
        margin-top: 10px;
        gap: 3px;
        position: relative;
        left: auto;
        transform: none;
    }

    .nav a {
        font-size: 14px;
        padding: 6px 10px;
    }

    .container,
    #container1,
    #container2 {
        width: 95%;
        max-width: 90%;
        padding: 15px;
        margin-top: 30px;
    }

    #container1 .form-group {
        flex-direction: column;
    }
}

@media screen and (min-width: 691px) {
    #container1 .form-group {
        flex-direction: row; 
        gap: 20px; 
        justify-content: center;
    }
}

@media screen and (max-width: 690px) {
    #container1 #baseURL,
    #container2 #baseURL {
        width: 90%; 
        max-width: 350px;  
        box-sizing: border-box;
    }

    #container1 .form-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
        width: 100%;
    }

    #container1 .form-group div {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    #container1 .form-group input {
        width: 90%;
        max-width: 350px;
        box-sizing: border-box;
    }

    #container2 input {
        width: 90%;
        max-width: 350px;
    }

    .output-container {
        max-width: 100%;
        overflow: hidden;
        word-wrap: break-word;
        white-space: normal;
    }

    .output-container p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
    }
}
@media screen and (max-width: 429px) {
    .switch-btn {
        font-size: 10px; 
        padding: 4px 8px; 
        min-width: 50px; 
        height: 24px;
        position: relative;
    }
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 buttons per row */
    gap: 15px;
    width: 90%;
    max-width: 700px;
    margin: 30px auto;
}

.button-grid button {
    padding: 6px;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    border-radius: 6px;
    border: 1px solid #D1D5DB;
    background-color: transparent;
    color: #031026;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70px;
}

.button-grid button span {
    font-size: 16px; 
    margin-bottom: -10px;
}

.button-grid button:hover {
    background-color: #f4f9ff; 
}

.button-grid button.selected {
    background-color: #ECF3FF; 
}
