body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #E6E6FA; /* Light Purple (Lavender) */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    color: #4B0082; /* Default text color (Dark Orchid) */
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-sizing: border-box;
}

h1 {
    color: #4B0082; /* Darker purple for heading */
    margin-bottom: 10px;
    font-size: 2em;
    font-weight: 600;
}

.subtitle {
    color: #8A2BE2; /* Blue Violet for subtitle */
    margin-bottom: 25px;
    font-size: 1.0em;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

#dobInput {
    padding: 14px;
    border: 2px solid #DDA0DD; /* Medium Purple border */
    border-radius: 10px;
    font-size: 1.05em;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 100%;
    box-sizing: border-box;
    color: #333;
    /* Ensure the date input text is centered vertically */
    line-height: normal; 
    text-align: center; 
}

#dobInput:focus {
    border-color: #8A2BE2;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
    outline: none;
}

#calculateBtn {
    padding: 14px;
    background-color: #8A2BE2; /* Blue Violet button */
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.15em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%;
    box-sizing: border-box;
}

#calculateBtn:hover {
    background-color: #6A1BAE;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#calculateBtn:active {
    transform: scale(0.98);
}

.result-box {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #DDA0DD;
    border-radius: 10px;
    padding: 20px;
    background-color: #F8F8FF; /* Ghost White background for the box */
    line-height: 1.6;
}

.result-box p {
    color: #8A2BE2;
    font-size: 1.05em;
    text-align: center;
    width: 100%;
    margin: 0;
}

.result-box .age-value {
    color: #4B0082;
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 25px;
        border-radius: 10px;
    }

    h1 {
        font-size: 1.6em;
    }

    .subtitle {
        font-size: 0.95em;
    }

    #dobInput,
    #calculateBtn {
        font-size: 1em;
        padding: 12px;
    }

    .result-box {
        min-height: 60px;
        padding: 15px;
    }
}
