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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, hsl(340, 70%, 95%) 0%, hsl(240, 50%, 94%) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.6);
    max-width: 550px;
    width: 100%;
    box-sizing: border-box;
}

h2 {
    text-align: center;
    background: linear-gradient(90deg, hsl(340, 70%, 55%) 0%, hsl(240, 60%, 55%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: hsl(240, 20%, 35%);
    font-size: 0.95em;
}

input[type="text"],
input[type="number"],
input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid hsl(240, 15%, 88%);
    border-radius: 10px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95em;
    color: hsl(240, 20%, 25%);
    background-color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: hsl(240, 60%, 65%);
    box-shadow: 0 0 0 4px rgba(100, 110, 255, 0.12);
}

.hint {
    margin-top: 15px;
    color: hsl(240, 10%, 55%);
    font-size: 0.88em;
    text-align: left;
    line-height: 1.4;
}

.button-group {
    display: flex;
    gap: 4px;
    background-color: hsl(240, 20%, 95%);
    border-radius: 10px;
    padding: 4px;
    box-sizing: border-box;
    margin-bottom: 5px;
}

.button-group button {
    flex: 1;
    padding: 10px;
    background: transparent;
    color: hsl(240, 15%, 45%);
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.25s ease;
}

.button-group button:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.5);
    color: hsl(240, 15%, 25%);
}

.button-group button.active {
    background: linear-gradient(135deg, hsl(340, 65%, 60%) 0%, hsl(240, 55%, 60%) 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(100, 50, 200, 0.12);
}

input:disabled {
    background-color: hsl(240, 20%, 97%);
    border-color: hsl(240, 15%, 92%);
    cursor: not-allowed;
    color: hsl(240, 10%, 65%);
}

.result {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, hsl(340, 60%, 98%) 0%, hsl(240, 60%, 98%) 100%);
    border: 1px dashed hsl(240, 30%, 90%);
    border-radius: 16px;
    text-align: center;
    font-weight: 500;
    color: hsl(240, 20%, 30%);
    display: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

.result-date {
    display: inline-block;
    font-size: 1.25em;
    font-weight: 700;
    margin-top: 5px;
}

.result-date.edd {
    color: hsl(200, 80%, 45%);
}

.result-date.lmp {
    color: hsl(270, 60%, 55%);
}

.result-date.actual {
    color: hsl(150, 60%, 42%);
    font-size: 1.2em;
}

.result-ga {
    display: inline-block;
    font-size: 1.1em;
    font-weight: 600;
    color: hsl(150, 60%, 32%);
    margin-top: 10px;
    background-color: hsl(150, 50%, 96%);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid hsl(150, 30%, 88%);
}

/* Timeline styles */
#timelineContainer {
    margin-top: 60px;
    margin-bottom: 60px;
    position: relative;
    height: 80px;
    width: 100%;
    box-sizing: border-box;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 6px;
    background: linear-gradient(90deg, hsl(270, 40%, 85%) 0%, hsl(200, 40%, 85%) 100%);
    transform: translateY(-50%);
    border-radius: 3px;
}

.timeline-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-color: #007BFF;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #007BFF;
    z-index: 2;
    transition: transform 0.2s ease;
}

.timeline-marker:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.timeline-marker.actual-delivery {
    background-color: hsl(150, 60%, 45%);
    box-shadow: 0 0 0 2px hsl(150, 60%, 45%);
}

.timeline-marker.reference-date {
    background-color: hsl(340, 75%, 60%);
    box-shadow: 0 0 0 2px hsl(340, 75%, 60%);
    z-index: 1;
}

.timeline-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.95em;
    font-weight: bold;
    color: hsl(240, 20%, 30%);
    white-space: nowrap;
    text-align: center;
    line-height: 1.3;
}

.timeline-label.top {
    bottom: 100%;
    margin-bottom: 12px;
}

.timeline-label.bottom {
    top: 100%;
    margin-top: 12px;
}

.timeline-label .date-text {
    font-weight: normal;
    font-size: 0.9em;
    color: hsl(240, 10%, 50%);
    display: block;
}

.timeline-date {
    display: block;
    font-weight: bold;
}

.timeline-date.lmp {
    color: hsl(270, 60%, 55%);
    font-size: 1.25em;
}

.timeline-date.edd {
    color: hsl(200, 80%, 45%);
    font-size: 1.25em;
}

.timeline-date.actual {
    color: hsl(150, 60%, 42%);
    font-size: 1.2em;
}
