@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    justify-content: flex-start; /* Align items from the start */
    align-items: center; /* Center horizontally */
    min-height: 100vh;
    background: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
    margin: 0;
    color: #333;
    box-sizing: border-box;
    padding: 20px;
    overflow-y: auto; /* Allow vertical scrolling if content overflows */
}

html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

.container {
    background-color: #ffffff;
    padding: 2rem 2.5rem; /* Converted from 30px 40px */
    border-radius: 0.75rem; /* Converted from 12px */
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.25); /* Converted from 10px 30px */
    text-align: center;
    max-width: 45rem; /* Adjusted for larger width */
    width: 95%; /* Increased width for smaller screens */
    margin: auto; /* Center container with auto margins */
    margin-bottom: 20px; /* Add some space before the footer */
    flex-grow: 1; /* Allow container to grow and push footer down */
    transform: translateY(0);
    animation: fadeIn 1s ease-out;
}

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

h1 {
    color: #333;
    margin-bottom: 1rem; /* Decreased margin to reduce height */
    font-size: 2.2rem; /* Adjusted font size */
    font-weight: 700;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.converter-section {
    margin-bottom: 1.5rem; /* Decreased margin to reduce height */
    border: none;
    padding: 1rem; /* Decreased padding to reduce height */
    border-radius: 0.625rem; /* Converted from 10px */
    background-color: #f0f4f8;
    box-shadow: inset 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1); /* Converted from 2px 5px */
}

h2 {
    color: #444;
    margin-top: 0;
    margin-bottom: 0.8rem; /* Decreased margin to reduce height */
    font-size: 1.6rem; /* Adjusted font size */
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 0.9375rem; /* Converted from 15px */
    margin-bottom: 0.8rem; /* Decreased margin to reduce height */
    justify-content: center;
    flex-wrap: wrap;
}

.input-group input[type="number"] {
    padding: 0.75rem;
    border: 1px solid #c0c0c0;
    border-radius: 0.5rem;
    width: 6.25rem; /* Increased width from 5.625rem for year and day */
    text-align: center;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    outline: none;
}

.input-group select {
    padding: 0.75rem;
    border: 1px solid #c0c0c0;
    border-radius: 0.5rem;
    width: 8rem; /* Wider for month names */
    text-align: left;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fcfcfc;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='none' stroke='%23555' stroke-linecap='round' stroke-linejoin='round' stroke-width='16' d='m192 96-64 64-64-64'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.8em;
    padding-right: 2.2rem;
    cursor: pointer;
}

.input-group input[type="number"]:focus,
.input-group select:focus {
    border-color: #2575fc;
    box-shadow: 0 0 0.625rem rgba(37, 117, 252, 0.3);
    transform: translateY(-2px);
}

.input-group button {
    padding: 0.75rem 1.5625rem; /* Converted from 12px 25px */
    background-color: #2575fc;
    color: white;
    border: none;
    border-radius: 0.5rem; /* Converted from 8px */
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.input-group button:hover {
    background-color: #1a5edb;
    transform: translateY(-3px);
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.2); /* Converted from 5px 15px */
}

p {
    font-size: 1.15em; /* Adjusted font size */
    color: #555;
    margin-top: 1rem; /* Decreased margin to reduce height */
}

span {
    font-weight: 600;
    color: #6a11cb;
    background-color: #eef2f9;
    padding: 0.4rem 0.8rem; /* Decreased padding to reduce height */
    border-radius: 0.375rem; /* Converted from 6px */
    display: inline-block;
    margin-top: 0.5rem; /* Decreased margin to reduce height */
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1); /* Converted from 2px 5px */
}

footer {
    /* Removed margin-top, it will be handled by container's margin-bottom or overall flex layout */
    padding: 20px;
    background: linear-gradient(to right, #2575fc, #6a11cb); /* Modern gradient background */
    color: white;
    text-align: center;
    width: 100%;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.25); /* More pronounced shadow */
    position: relative; /* Ensure z-index works if needed */
    z-index: 10; /* Ensure it stays above other elements if there are overlaps */
}

footer p {
    margin: 0;
    font-size: 0.9em;
    font-weight: 300;
    color: white; /* Make the footer text white */
}

footer p span#current-year {
    font-weight: inherit; /* Inherit font-weight from parent paragraph */
    color: inherit; /* Inherit color from parent paragraph */
    background-color: transparent; /* Remove background */
    padding: 0; /* Remove padding */
    border-radius: 0; /* Remove border-radius */
    display: inline; /* Ensure it behaves like inline text */
    margin-top: 0; /* Remove margin-top */
    box-shadow: none; /* Remove box-shadow */
}