/* Main Container */
.age-calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.age-calculator-container h2 {
    color: #3a3a3a;
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.age-calculator-container h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    border-radius: 3px;
}

.age-calculator-container h3 {
    color: #4a4a4a;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Input Section */
.input-section {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #e9ecef;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #495057;
    font-size: 15px;
}

.form-group label i {
    margin-right: 8px;
    color: #4facfe;
    width: 20px;
    text-align: center;
}

.date-input-container {
    display: flex;
    gap: 10px;
    position: relative;
    padding-top: 18px;
}

/* .date-input-container::before {
    content: "Month";
    position: absolute;
    top: 0;
    left: 0;
    font-size: 12px;
    color: #6c757d;
    width: 33%;
}

.date-input-container::after {
    content: "Day";
    position: absolute;
    top: 0;
    left: 33%;
    font-size: 12px;
    color: #6c757d;
    width: 33%;
}

.date-input-container::after {
    content: "Year";
    left: 66%;
    width: 33%;
} */

.month-select, .day-select, .year-select {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
    height: 48px;
}

.month-select {
    flex: 2;
}

.year-select {
    flex: 1.5;
}

.time-section {
    margin-top: 25px;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-select {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
    height: 48px;
}

.ampm-select {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    width: 80px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
    height: 48px;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.calculate-btn {
    flex: 3;
    padding: 14px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(79, 172, 254, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
}

.calculate-btn:hover {
    background: linear-gradient(to right, #3ca3fd 0%, #00d9e8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 172, 254, 0.4);
}

.reset-btn {
    flex: 1;
    padding: 14px;
    background: #ffffff;
    color: #495057;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
}

.reset-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #ff4444;
    border-color: #ffbbbb;
}

.reset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.calculate-btn i, .reset-btn i {
    font-size: 14px;
}

/* Result Section */
.result-section {
    display: none;
}

.result-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #e9ecef;
}

.age-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.age-item {
    background-color: white;
    padding: 15px 10px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.age-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.age-value {
    font-size: 26px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1;
}

.age-label {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
}

.next-birthday-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.birthday-countdown {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
}

.countdown-number {
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
}

.countdown-text {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.birthday-details {
    flex: 1;
    font-size: 15px;
    color: #495057;
    line-height: 1.5;
}

.birthday-date {
    display: inline-block;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #e9f7fe;
    border-radius: 4px;
    color: #1a73e8;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .age-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .birthday-countdown {
        width: 70px;
        height: 70px;
    }

    .date-input-container {
        flex-direction: column;
        padding-top: 0;
    }

    .date-input-container::before,
    .date-input-container::after {
        display: none;
    }

    .month-select, .day-select, .year-select {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .age-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .time-inputs {
        flex-wrap: wrap;
    }

    .time-select, .ampm-select {
        flex: none;
        width: calc(50% - 4px);
    }

    .button-group {
        flex-direction: column;
    }

    .calculate-btn, .reset-btn {
        width: 100%;
    }

    .next-birthday-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .birthday-countdown {
        margin-bottom: 15px;
    }
}