body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: linear-gradient(to bottom, #e0f7fa, #c2e59d);
    animation: fadeIn 2s ease forwards;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-y: hidden; 
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.container {
    padding: 20px;
    border-radius: 1em;
    box-shadow: 0 0.75em 1.5em rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(200, 200, 200, 0.3);
    background-color: rgba(255, 255, 255, 0.85);
    overflow-y: auto; 
    max-height: calc(100vh - 60px); 
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 0.75em;
    font-weight: 600;
    font-size: 1.5em;
    letter-spacing: 0.03em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.input-group {
    margin-bottom: 1em;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5em;
    color: #444;
    font-weight: 500;
    font-size: 0.875em;
    transition: color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

input {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 0.5em;
    box-sizing: border-box;
    font-size: 0.9em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    color: #333;
    box-shadow: inset 0 0.06em 0.12em rgba(0, 0, 0, 0.02);
    font-family: 'Inter', sans-serif;
    padding-right: 2em;
    position: relative;
    cursor: pointer;
}

input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.25em rgba(76, 175, 80, 0.1);
}

input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 0.5em;
    box-sizing: border-box;
    font-size: 0.9em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    color: #333;
    box-shadow: inset 0 0.06em 0.12em rgba(0, 0, 0, 0.02);
    font-family: 'Inter', sans-serif;
    padding-right: 2em;
    position: relative;
    cursor: pointer;
    text-align: left; 
    text-align-last: left;
}

input[type="date"]:focus,
input[type="time"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.25em rgba(76, 175, 80, 0.1);
}

button {
    width: 100%;
    padding: 0.5em;
    background-color: #4CAF50;
    color: #ffffff;
    border: none;
    border-radius: 0.5em;
    cursor: pointer;
    font-size: 1.125em;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 500;
    margin-top: 0.75em;
    box-shadow: 0 0.375em 0.75em rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
}

button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.15);
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 0.25em rgba(76, 175, 80, 0.3);
}

#result {
    margin-top: 0.75em;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    color: #222;
    padding: 0.5em;
    border-radius: 0.75em;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 0.375em 0.75em rgba(0, 0, 0, 0.05);
    background: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    font-family: 'Inter', sans-serif;
    display: none;
    animation: highlight 1s ease;
}

@keyframes highlight {
    from {
        background-color: rgba(255, 255, 255, 0.8);
    }

    to {
        background-color: rgba(255, 240, 0, 0.3);
    }
}

.error-message {
    color: #e53e3e;
    margin-top: 0.125em;
    text-align: left;
    font-size: 0.75rem;
    padding: 0;
    border-radius: 0;
    border: none;
    font-family: 'Inter', sans-serif;
    display: none;
}

.time-input-group {
    display: flex;
    gap: 0.625em;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.time-input-group>div {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    box-sizing: border-box;
}

.time-input-group input {
    width: 100%;
    padding: 0.75em;
    font-size: 1em;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.timezone-row {
    display: flex;
    justify-content: space-between;
    gap: 0.625em;
    margin-bottom: 0.9375em;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.timezone-row .input-group {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .container {
        width: 80%;
        max-width: 800px;
        padding: 1.875em;
    }

    h1 {
        font-size: 2em;
        margin-bottom: 1.875em;
    }

    .timezone-row {
        flex-direction: row;
        justify-content: space-between;
        gap: 1.5625em;
        margin-bottom: 1.25em;
    }

    .timezone-row .input-group {
        width: 48%;
        margin-bottom: 0;
    }

    .time-input-group {
        flex-direction: row;
        justify-content: space-between;
        gap: 1.5625em;
        width: 100%;
        box-sizing: border-box;
    }

    .time-input-group>div {
        width: 48%;
        margin-bottom: 0;
        box-sizing: border-box;
    }

    label {
        font-size: 1em;
        margin-bottom: 0.625em;
    }

    input {
        padding: 0.875em;
        font-size: 1em;
        box-sizing: border-box;
    }

    button {
        padding: 0.875em;
        font-size: 1.25em;
        margin-top: 1em;
    }

    #result {
        font-size: 1.625em;
        padding: 1.125em;
        gap: 0.9375em;
        margin-top: 1em;
    }

    .error-message {
        font-size: 0.75rem;
        padding-left: 0.4375em;
    }
}

/* Search Styles */
#fromTimeZone,
#toTimeZone {
    padding-left: 2.1875em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-search'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
    background-repeat: no-repeat;
    background-position: left 0.625em center;
    background-size: 1.25em;
    cursor: pointer;
}

input.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 0.125em rgba(229, 62, 62, 0.2);
}

.timezone-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    z-index: 10;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0.5em;
    margin-top: 0.25em;
    overflow-y: auto;
    max-height: 200px;
    box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.05);
    display: none;
    width: 100%;
    padding-inline-start: 20px;
    box-sizing: border-box;
}

.timezone-list li {
    padding: 0.75em;
    font-size: 0.9em;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timezone-list li:hover {
    background-color: #4CAF50;
    color: #fff;
}

.timezone-list li.selected {
    background-color: #4CAF50;
    color: #fff;
}